yt_cli 3.0.1
yt_cli: ^3.0.1 copied to clipboard
A CLI tool for the YouTube Data, Live Streaming, and Analytics APIs.
Changelog #
3.0.1 #
Added #
-
Configurable credential file paths —
yt authorizeand all CLI commands now honor two new environment variables that point at the exact file path for each credential file:Variable Default YT_CLIENT_SECRETS_FILE./client_secret.json(current working directory)YT_ACCESS_TOKENS_FILE./youtube_server_tokens.json(current working directory)Each variable is resolved from the runtime environment first, then from a
.envfile in the current working directory. Leading~is expanded against the user's home directory. Either variable may be set independently — unset variables keep the existing default location, so behavior is fully backward compatible. An explicit--credentials-fileargument always takes precedence overYT_CLIENT_SECRETS_FILE. -
--tokens-fileflag foryt authorize— A new-t/--tokens-fileoption lets users specify exactly where the OAuth token file should be written, overridingYT_ACCESS_TOKENS_FILEfor a single invocation. This complements the existing--credentials-file(-c) option and enables convenient multi-account workflows.
Changed #
-
BREAKING: Replaced
googleapis_authdependency with the cross-platformoauth2: ^2.0.5package. Aligns with the same change inyt: ^3.0.1. -
BREAKING: The on-disk access tokens file format has changed.
yt authorizenow writes tokens viaoauth2.Credentials.toJson(). Existing token files written byyt_cli < 3.0.0are no longer readable — re-runyt authorizewith--overwrite-credentials(-o) to force a new flow:yt authorize \ --credentials-file ~/.yt/client_secrets.json \ --tokens-file ~/.yt/access_tokens.json \ --overwrite-credentials -
youtube_helper_commandnow builds anoauth2.Clientfrom the stored credentials and passes it toYt.withOAuth(oauthClient: ...). The custom_ServerTokenGeneratorinterceptor has been removed; refresh and header injection are handled inside the library. -
youtube_authorize_commandpersistsclient.credentials.toJson()directly — the previous conversion togoogleapis_auth.AccessCredentialsis no longer required.
2.3.0+1 #
Changed #
- Security hardening: path validation, token file permissions, credential JSON schema validation, OAuth callback validation
- example/ replaced with README.md showing CLI usage examples
2.2.6+5 #
- publication readiness: LICENSE, .pubignore, topics, funding, version sync
- YouTube Analytics, members/memberships, video abuse report reasons support