Skip to main content
CLI support for bunny stream is in Public Preview. Commands and flags may change during this period.
bunny stream manages Bunny Stream video libraries and the videos in them.

Choosing a library

Library commands take the library’s name or numeric ID as an argument (bunny stream libraries show my-library). Other commands take it with --lib or --library (bunny stream videos list --lib 12345). If you leave it out, the CLI uses the library linked to the current directory, and otherwise asks you to pick one. Run bunny stream link to link a directory. It writes .bunny/stream.json, so every video, collection, and caption command in that directory targets the same library. You don’t need a library’s Stream API key. The CLI looks it up from your account.

Libraries

bunny stream libraries also answers to library and lib.

bunny stream libraries create

Create a video library. The main storage region is always DE. The command asks whether to replicate the library to other regions, with SG, LA, and NY preselected. Pass --replication-regions to choose without the prompt. Run bunny stream regions to see every region code.
After it creates the library, the command offers to:
  1. Link the current directory to the new library.
  2. Save BUNNY_STREAM_LIBRARY_ID and BUNNY_STREAM_API_KEY to .env. The Stream examples read these names.
  3. Add videos, by importing them from another platform or uploading a file.
It then prints the commands to upload a video, import videos, and show the library’s credentials. Use the flags below to answer the offers up front. When the command can’t prompt, it skips any offer you didn’t set with a flag. libraries create also accepts every library settings flag.
Replication regions can’t be removed once they’re enabled. See Replication.

bunny stream libraries list

List your video libraries with their video count, storage, traffic, and replication regions.

bunny stream libraries show

Show one library’s settings. API keys are never printed here, in any output format.

bunny stream libraries update

Change a library’s settings. The command changes only the settings you pass flags for. Without flags, it walks you through the settings interactively.
libraries update also accepts every library settings flag.

Library settings flags

libraries create and libraries update share these flags. Boolean flags take a --no- prefix to turn a setting off, such as --no-jit.

bunny stream libraries credentials

Show a library’s ID and Stream API key. The key is masked unless you pass --show-secret.

bunny stream libraries player

Show, update, or reset a library’s player settings. player update without flags edits the settings interactively.

bunny stream libraries security

Show or update a library’s security settings. security update without flags edits the settings interactively.
security show takes --show-secret to reveal the token authentication key, and --rotate to reset it. --rotate asks for confirmation, which --force skips.
--rotate resets the key used for both CDN and embed view tokens. Every signed URL issued with the old key stops working.
Link the current directory to a library so video, collection, and caption commands can leave out --lib. bunny stream libraries link and bunny stream libraries unlink do the same.

bunny stream regions

List the region codes a library can store and replicate videos in. DE is the fixed main region, and SG, LA, and NY are the suggested replication regions.

bunny stream libraries delete

Delete a library and every video in it. Pass --force to skip the confirmation, which is required when running non-interactively.

Videos

bunny stream videos also answers to video. Every video command accepts --lib / --library to pick a library. Commands that take a [video] argument expect the video’s GUID, and prompt you to pick a video when you leave it out.

bunny stream videos upload

Upload a local file. Files over 2 GB upload through TUS, which retries and resumes automatically.

bunny stream videos fetch

Have bunny.net download a video from a URL, server side. See URL Fetch.
videos fetch takes the same flags as videos upload, plus --header "Name: value" (repeatable).

bunny stream videos list

List the videos in a library with their ID, title, status, size, length, views, and upload date.

bunny stream videos show

Show one video’s details, including its caption languages and Direct Play URL.

bunny stream videos update

Change a video’s title, collection, chapters, or moments.
Pass --collection "" to remove the video from its collection.

bunny stream videos thumbnail

Set a video’s thumbnail from a local file or a URL.

bunny stream videos embed

Print the player embed URL. When the library requires embed view tokens, the URL is signed.

bunny stream videos stats

Show a video’s views and watch time. See Statistics.
The range defaults to the last 30 days.

bunny stream videos resolutions

Show which resolutions the library enables, and which ones the video has encoded and stored.

bunny stream videos cleanup

Delete encoded resolutions, MP4 fallback files, or the stored original to free up storage.

bunny stream videos delete


Captions

bunny stream videos captions uploads your own .vtt or .srt caption file for one language, or removes one.
captions add takes the caption file first, then the video and the language code. The player shows --label in its caption menu, and it defaults to the language code. When you leave out the language, captions remove lets you pick one of the video’s caption languages. Pass --force to skip the confirmation, which is required when running non-interactively. To generate captions from the audio instead, use bunny stream videos transcribe.

Encoding

Turn on Premium Encoding

Switch a library to Premium Encoding with libraries update. Set the codecs, resolutions, and just-in-time encoding in the same command.

bunny stream videos encode

Re-encode a video with the library’s current encoding settings. It works from the stored original file, so the library needs --keep-original turned on when the video was uploaded.
Re-encoding is billed like the original encode. If the library transcribes new uploads automatically, the video is transcribed again too.

Transcribing and Smart Generate

Both commands are billed. videos transcribe prints a cost estimate when it queues the job. See Stream pricing.

bunny stream videos transcribe

Transcribe a video’s audio into captions with transcribing.

bunny stream videos smart

Generate a title, description, chapters, or moments from a video’s existing captions with Smart Generate.

Collections

bunny stream collections also answers to collection. Organize a library’s videos into collections. Add a video to one with --collection on videos upload, videos fetch, or videos update.
Deleting a collection also deletes every video inside it.

Importing from another platform

bunny stream import moves an existing video library into Stream from Vimeo, AWS S3 (or an S3-compatible provider), Wistia, Mux, Cloudflare Stream, JW Player, or Brightcove. bunny.net fetches each file directly from the source, so nothing passes through your machine. Source folders become Stream collections of the same name. For a full walkthrough, see the migration guides for Vimeo, Mux, and Cloudflare Stream.
You can run an import again safely. It skips finished videos, leaves videos that are still encoding, and imports failed ones again.

Source credentials

The CLI reads the source’s credentials from environment variables and never takes them as flags. In an interactive run, it asks for any required value that isn’t set, then offers to save what you typed for the active CLI profile, so later runs don’t ask again. If you leave out --source, the CLI uses the one source whose credentials are all set, and otherwise asks you to pick one. For S3, leave both AWS keys unset to use the default AWS credential chain, such as a profile, SSO, or an instance role. The IAM policy needs s3:ListBucket and s3:GetObject.

bunny stream import

The command exits 0 when every video was queued, 1 when any video failed, and 130 when you press Ctrl-C. After Ctrl-C, it prints the --resume command to continue.

bunny stream import list

Browse a source’s folders and videos before importing.

bunny stream import status

Show Stream’s encoding status for every video an import queued. It exits 1 when any video failed, so you can poll it from a script.
A video still processing with no data after 30 minutes is marked (stalled?). Run the import again with --retry-stalled to replace it.
Last modified on October 20, 2026