Skip to content
Merged
5 changes: 5 additions & 0 deletions .changeset/create-next-steps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bunny.net/cli": patch
---

`bunny stream library create` now offers to link the directory, save the library ID and API key to `.env`, and import or upload videos, then prints next steps. `storage zones create`, `sites create`, and `pz create` link to the matching examples.
5 changes: 5 additions & 0 deletions .changeset/stream-commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bunny.net/cli": minor
---

Add `bunny stream` commands to manage Stream video libraries and videos: `stream libraries` (create, list, show, update, credentials, player and security settings), `stream videos` (upload, fetch, update, thumbnails, stats, embed URLs, encode, transcribe, and Smart Generate), `stream collections`, `stream captions`, `stream link`, and `stream regions`.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,28 +85,28 @@ bun ny sites domains add example.com # attach a custom production domain
bun ny sites ssl --no-force-ssl # stop forcing HTTPS on the site's b-cdn.net system host
bun ny sites open # open the site's live URL in the browser
bun ny sites ci init # add a GitHub Actions workflow (push to main goes live)
bun ny stream library list # list Stream video libraries (videos, storage, traffic, replication regions)
bun ny stream library create my-library # create a video library in DE, replicated to SG, LA and NY by default (omit the name to be prompted; --name also works)
bun ny stream library create my-library --replication-regions NY,SG # replicate to New York and Singapore instead (DE is always the main region; DE alone means no replication)
bun ny stream library show my-library # show one library (accepts a name or ID; omit it to use the linked library, or to pick interactively when nothing is linked). API keys are never printed here, in any output format
bun ny stream library update my-library --resolutions 720p,1080p # edit library settings; omit the flags to edit interactively (encoding tier, codecs, transcribing all have flags)
bun ny stream library credentials my-library --show-secret # deliberately retrieve a library's Stream API key (--read-only for the read-only key; masked without --show-secret)
bun ny stream library player update my-library --color "#FF7755" --heatmap # player settings (show/update/reset)
bun ny stream library security update my-library --embed-token --allow-referrer example.com # security settings (show/update/reset-token)
bun ny stream library delete my-library # delete a library and all of its videos (--force skips the confirmation, and is required non-interactively)
bun ny stream library link my-library # link the directory to a library so video commands can omit it (bun ny stream library unlink removes the link)
bun ny stream video upload ./video.mp4 # upload a local video to the linked library (--title sets the title; files over 2 GB upload resumably via TUS, retried and resumed automatically)
bun ny stream video fetch https://example.com/video.mp4 --lib 12345 # let bunny.net fetch the video server side (--header "Name: value" for an origin that needs auth)
bun ny stream video list # list the videos in the linked library (ID, title, status, size, length, views, upload date)
bun ny stream video show 1a2b3c4d-... # show one video by GUID, including its Direct Play URL
bun ny stream video thumbnail 1a2b3c4d-... --file ./thumb.jpg # set a thumbnail (--url has bunny.net download one instead)
bun ny stream video stats 1a2b3c4d-... # views and watch time for one video (--heatmap, --play-data for the other views)
bun ny stream video embed 1a2b3c4d-... # print the player embed URL, signed when the library requires embed view tokens
bun ny stream video cleanup 1a2b3c4d-... --non-configured --dry-run # preview deleting renditions the library no longer configures
bun ny stream collection list # list a library's collections (create/show/rename/delete too; videos join one with --collection, and deleting a collection deletes the videos inside it)
bun ny stream caption add 1a2b3c4d-... en --file ./captions.vtt # upload your own caption file for one language
bun ny stream transcribe 1a2b3c4d-... --languages en,de # paid: transcribe the audio into captions ($0.10 per language-minute, counting the source-language transcript and each target language)
bun ny stream smart 1a2b3c4d-... --title --chapters # paid: generate a title and chapters from the transcript (offers to transcribe first if the video has no captions)
bun ny stream libraries list # list Stream video libraries (videos, storage, traffic, replication regions)
bun ny stream libraries create my-library # create a video library in DE, replicated to SG, LA and NY by default (omit the name to be prompted)
bun ny stream libraries create my-library --replication-regions NY,SG # replicate to New York and Singapore instead (DE is always the main region; DE alone means no replication)
bun ny stream libraries show my-library # show one library (accepts a name or ID; omit it to use the linked library, or to pick interactively when nothing is linked). API keys are never printed here, in any output format
bun ny stream libraries update my-library --resolutions 720p,1080p # edit library settings; omit the flags to edit interactively (encoding tier, codecs, transcribing all have flags)
bun ny stream libraries credentials my-library --show-secret # deliberately retrieve a library's Stream API key (--read-only for the read-only key; masked without --show-secret)
bun ny stream libraries player update my-library --color "#FF7755" --heatmap # player settings (show/update/reset)
bun ny stream libraries security update my-library --embed-token --allow-referrer example.com # security settings (show/update; show --rotate resets the token key)
bun ny stream libraries delete my-library # delete a library and all of its videos (--force skips the confirmation, and is required non-interactively)
bun ny stream link my-library # link the directory to a library so video commands can omit it (also `libraries link`; bun ny stream unlink removes the link)
bun ny stream videos upload ./video.mp4 # upload a local video to the linked library (--title sets the title; files over 2 GB upload resumably via TUS, retried and resumed automatically)
bun ny stream videos fetch https://example.com/video.mp4 --lib 12345 # let bunny.net fetch the video server side (--header "Name: value" for an origin that needs auth)
bun ny stream videos list # list the videos in the linked library (ID, title, status, size, length, views, upload date)
bun ny stream videos show 1a2b3c4d-... # show one video by GUID, including its Direct Play URL
bun ny stream videos thumbnail 1a2b3c4d-... --file ./thumb.jpg # set a thumbnail (--url has bunny.net download one instead)
bun ny stream videos stats 1a2b3c4d-... # views and watch time for one video (--heatmap, --play-data for the other views)
bun ny stream videos embed 1a2b3c4d-... # print the player embed URL, signed when the library requires embed view tokens
bun ny stream videos cleanup 1a2b3c4d-... --non-configured --dry-run # preview deleting renditions the library no longer configures
bun ny stream collections list # list a library's collections (create/show/update/delete too; videos join one with --collection, and deleting a collection deletes the videos inside it)
bun ny stream videos captions add ./captions.vtt 1a2b3c4d-... en # upload your own caption file for one language
bun ny stream videos transcribe 1a2b3c4d-... --target-languages en,de # paid: transcribe the audio into captions ($0.10 per language-minute, counting the source-language transcript and each target language)
bun ny stream videos smart 1a2b3c4d-... --title --chapters # paid: generate a title and chapters from the transcript (offers to transcribe first if the video has no captions)
```

Every deploy is published as the live site. Deploys are immutable under their own ID, so `bun ny sites deployments publish` rolls back to any earlier one without re-uploading. Preconfigure the `sites` block in `bunny.jsonc` (`name`, `build`, `dir`, `spa`) so a deploy needs no flags: `bun ny sites deploy --build`. `bun ny sites ci init` writes the same `build` and `dir` into the generated workflow. See [`examples/sites/`](examples/sites/) for ready-to-copy configs (Vite, Astro, Next.js static export, Hugo, plain HTML, and a combined app + site file).
Expand Down
Loading
Loading