feat(stream): video libraries, directory linking, uploads, and video management - #203
Draft
amir-at-bunny wants to merge 3 commits into
Draft
feat(stream): video libraries, directory linking, uploads, and video management#203amir-at-bunny wants to merge 3 commits into
amir-at-bunny wants to merge 3 commits into
Conversation
|
…face Stream error messages Verbose debug logging read every request body as JSON, which would buffer an entire video into memory on octet-stream uploads; non-JSON bodies are now described from their headers instead. Error extraction also learns the Stream API's StatusModel shape (lowercase message), so 400/422/429 responses carry the API's explanation instead of a generic HTTP error.
…management New experimental stream namespace: - stream library: list, create, show, credentials, delete (aliases: libraries, lib) - stream link / unlink: bind a directory to a library via .bunny/stream.json - stream upload: local file via binary PUT, or a URL fetched server side (--header for authenticated origins); library from --lib <id>, the linked directory, or an interactive picker - stream videos: list, show, update, delete by GUID Library CRUD runs on the core API with the account key; uploads and video commands use the library's own Stream API key, resolved automatically. No output format prints API keys (credentials --show-secret is the deliberate reveal path); JSON output strips ApiKey, ReadOnlyApiKey, and the deprecated ApiAccessKey.
…ctions, and captions Restructure: the video group is canonical (videos stays an alias), upload splits into video upload (local files) and video fetch (server-side URL fetch with --header/--collection/--thumbnail-time), and link/unlink move under library. library update: new command for library settings, sharing the encoding and transcribing flags with create (--encoding-tier, --jit, --codecs, --resolutions, --transcribing and its language/generation options); sparse bodies send only the flagged fields, and a no-flag TTY run opens an interactive editor. New video verbs: thumbnail (--url or --file), resolutions, cleanup (full selector surface, confirmed, --dry-run), stats (--heatmap/--play-data), and update gains --collection/--chapters/--moments. New namespaces: collection (create/list/show/rename/delete) and caption (add with the API's validation surfaced, delete). Paid operations: encode enable/reencode, transcribe, and smart, each printing its billing note; smart confirms before implicitly transcribing a caption-less video. Uploads over 2 GiB switch to TUS resumable uploads automatically: 64 MiB chunks, every request signed, offsets driven by the server, and resume via HEAD after transient failures. openapi-client: verbose debug logging redacts secret-shaped fields (keys, passwords, tokens, authorization headers) from request and response body dumps. Hardening from review: pagination drains tolerate absent or misreported totalItems, --force disables pickers on paid commands too, collection show requests the preview URLs it documents, and video show reports captions.
amir-at-bunny
force-pushed
the
feat/stream
branch
from
September 4, 2026 12:21
1d2704d to
65772e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new experimental
streamnamespace for managing bunny.net Stream, plus a smallopenapi-clientfix (verbose logging skips binary request bodies, redacts secret-shaped fields, and surfaces Stream API error messages).Commands
bunny stream library(aliaseslibraries,lib)list,create,show,update,deletecredentials: retrieve a library's Stream API keys (masked unless--show-secret)link/unlink: bind the current directory to a library via.bunny/stream.jsonso other stream commands can omit--libcreate/updatecarry the encoding and transcribing settings:--encoding-tier,--jit,--codecs,--resolutions,--transcribing,--transcribing-languages, and the generation togglesbunny stream video(aliasvideos)upload <file>: create-and-upload in one command; files over 2 GiB upload resumably via TUSfetch <url>: server-side fetch of a remote video, with--headerfor authenticated originslist(--search,--collection),show,update(--title,--collection,--chapters,--moments),deletethumbnail(--urlor--file),resolutions,cleanup,stats(--heatmap,--play-data)uploadandfetchaccept--collectionand--thumbnail-timebunny stream collection(aliascollections)create,list,show,rename,deletebunny stream caption(aliascaptions)add <video> <lang> --file(.vtt/.srt),delete <video> <lang>Paid operations
bunny stream encode enable/encode reencodebunny stream transcribe <video>(--languages,--source-language,--generate-*,--force)bunny stream smart <video>(--title,--description,--chapters,--moments)All commands support
--output json|csv|markdown, resolve the library from--lib <id>, the linked directory, or an interactive picker, and take--forceto skip confirmations non-interactively.