yt_cli 3.2.0
yt_cli: ^3.2.0 copied to clipboard
A CLI tool for the YouTube Data, Live Streaming, and Analytics APIs.
Changelog #
3.2.0 #
Added #
-
Full CLI parity with the
ytpackage — added top-level commands for the eight remaining services that previously had no CLI surface:yt playlist-items— list / insert / update / delete playlist itemsyt channel-banners— upload a channel banner imageyt channel-sections— list / insert / update / delete channel sectionsyt captions— list / insert / update / delete / download caption tracksyt i18n-languages— list YouTube application languagesyt i18n-regions— list YouTube content regionsyt playlist-images— list / insert / update / delete custom playlist imagesyt third-party-links— list / insert / update / delete third-party links
Every subcommand follows the existing
--bodyJSON /--fileupload conventions and routes errors throughDioExceptionUsageExceptionso output is consistent with the rest of the CLI.
Changed #
- Bumped
ytdependency to^3.2.0to pick up the newYt.captionsgetter that exposes the existingCaptionsservice on theYtfacade.
3.1.0 #
Changed #
- Bumped
ytdependency to^3.1.0to pick up the latest upstream changes:AnalyticsGroupmodel completeness —snippet.publishedAtand the fullcontentDetailsblock (itemCount,itemType) are now exposed, bringing parity with the YouTube Analytics API v2 Group resource.- OAuth interactive flow now uses explicit PKCE (RFC 7636 §4.1) with
a cryptographically random
code_verifier, hardening the loopback redirect against authorization-code interception. - Loopback callback uses an OS-allocated ephemeral port when the registered redirect URI does not pin one (RFC 8252 §7.3).
- Sanitized error messages from OAuth file parsing — raw exception
text is no longer surfaced when
client_secrets.jsonoraccess_tokens.jsoncannot be parsed. - Response body size cap added to
LoggingInterceptors— responses whoseContent-Lengthexceeds 50 MiB are rejected asDioException(badResponse)before reaching callers. Chat.insertandYoutubeApiHelper.buildPartsnow throwArgumentError(instead of bareException) for clearer programmer-error semantics.
Removed #
- BREAKING (transitive): The upstream
ytpackage removed theChat.sendconvenience helper and theEmojiFormatterutility. Theyt_clidoes not invoke either symbol, so no CLI command surface is affected; this is documented for downstream library consumers only.
3.0.2 #
Changed #
- Bumped
ytdependency to^3.0.2to pick up the upstream repository URL migration (github.com/cdavis-code/yt→github.com/cdavis-code/yt_workspace) and tightenedjson_annotation/json_serializableconstraints. No code or behavioral changes inyt_cli.
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