Skip to content

docs(skills): stream commands in the agent skill - #254

Merged
jamie-at-bunny merged 2 commits into
mainfrom
stream-skills
Oct 15, 2026
Merged

jamie-at-bunny merged 2 commits into
mainfrom
stream-skills

Conversation

@jamie-at-bunny

Copy link
Copy Markdown
Member

Adds the stream commands and import reference to the bunny-cli agent skill, plus a hosted agent-setup.md prompt that walks coding agents through installing the CLI, signing in, installing the skill, and verifying with whoami.

@changeset-bot

changeset-bot Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e2afcb3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@bunny.net/cli Patch
@bunny.net/cli-darwin-arm64 Patch
@bunny.net/cli-darwin-x64 Patch
@bunny.net/cli-linux-arm64 Patch
@bunny.net/cli-linux-x64 Patch
@bunny.net/cli-windows-x64 Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jamie-at-bunny jamie-at-bunny changed the title docs(skills): stream commands in the agent skill and an agent setup prompt docs(skills): stream commands in the agent skill Oct 12, 2026
@jamie-at-bunny
jamie-at-bunny marked this pull request as ready for review October 12, 2026 13:11
@bunnynet-devops

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T13:22:05.495061Z ed85d0e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ed85d0eb20

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread skills/bunny-cli/references/stream.md Outdated
**Ctrl-C** stops queuing new videos, lets a hand-off already sent to Bunny finish so it is recorded, prints the `--resume` command, and exits 130. A second Ctrl-C exits at once.
- **`upload`** creates the entry, then sends the bytes. Files over 2 GB switch to resumable TUS uploads automatically. If the byte upload fails, an entry that never received bytes is deleted; one that may hold the upload is kept with a warning naming its GUID. Encoding continues after the command returns, so the status is usually `Uploaded` or `Processing`.
- **`fetch`** returns once the fetch is queued and reports no video ID; the video shows up in `video list` once fetched.
- **`cleanup`** deletes renditions, MP4 fallbacks, or the original, and requires at least one selector (`--resolutions`, `--non-configured`, `--all`, `--original`, `--mp4`, `--outputs hls|mp4|all`). `--dry-run` lists what would go and skips the confirmation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat --outputs as a modifier, not a selector

When an agent follows this list and runs cleanup with only --outputs hls|mp4|all, the command fails with “Nothing selected to clean up.” cleanupQuery() deliberately excludes outputs from its selector check; this flag only scopes a real selector such as --resolutions, --non-configured, or --all, so the reference should not present it as sufficient by itself.

Useful? React with 👍 / 👎.

Comment thread skills/bunny-cli/references/stream.md Outdated
- `--transcribing` bills per use on every new upload and re-encode.
- `--add-replication-regions` is add-only: regions can never be removed.
- `--content-tagging` is accepted on `update` only.
- `--force` is required for `update`, `unlink`, `delete`, and `credentials --rotate` without a TTY.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Do not require --force for flagged updates

For non-interactive library update calls that already provide a change flag, --force is not required and no confirmation is performed; the option only disables the interactive editor and resource picker. Listing update alongside destructive operations as requiring --force teaches agents to add an unnecessary flag and misstates the command's automation contract.

Useful? React with 👍 / 👎.

Comment thread skills/bunny-cli/references/stream.md Outdated
## Resolving the library

The library's own Stream API key is read from the account automatically; nothing extra to configure, and it is never printed.
`library` commands take the library as an optional positional (name or numeric ID). Every other stream command takes it as `--lib` (alias `--library`), because its positional is a video GUID, a collection ID, or a local file path. When omitted, the library resolves in this order:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Limit the positional-library rule to targeted commands

Not every library command accepts a library positional: library list accepts none, and library unlink operates only on the linked .bunny/stream.json manifest. With strict argument parsing, an agent following this blanket rule and running bunny stream library unlink <name-or-id> gets an unexpected-argument error, so this should be qualified to commands that actually target an existing library.

Useful? React with 👍 / 👎.

Comment thread skills/bunny-cli/references/stream.md Outdated
Reads the saved run (pass `--source` when more than one platform was imported into the library), asks Bunny for the current state of every video it queued, and prints Bunny's status, encode percentage, size, and when each was queued. A video still processing with no data after 30 minutes is marked `(stalled?)`: delete it in the dashboard and re-run the import. Exits 1 when any video failed, so it works as a poll in scripts. JSON: `{ library, source, status, completed, processing, failed, stalled, stalledAfterMinutes, saved, videos }`.
All three state the cost before running.

- **`encode enable`** bills per output codec per minute; `--jit`, `--codecs`, `--resolutions` apply in the same request. `encode reencode` bills at the same rate.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Qualify re-encoding charges by the library tier

When the selected library is on the free encoding tier, encode reencode does not incur the Premium Encoding per-codec rate; even the command's runtime warning qualifies that Premium rates apply only on the premium tier. Saying that re-encoding is billed “at the same rate” unconditionally misrepresents a free-tier re-encode as a paid operation.

Useful? React with 👍 / 👎.


```bash
bunny stream import list --source vimeo # folders: ID, name, video count
bunny stream import list --source vimeo --videos # every video, with folder, duration, size

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge State the 10,000-video cap for import list

For a source containing more than 10,000 videos, import list --videos does not list “every video”: the CLI invokes the tool with MAX_PLAN_LIMIT and the result slices the array to 10,000 while setting truncated. An agent using this command for an exhaustive inventory can silently omit the remaining videos unless this example calls out the cap.

Useful? React with 👍 / 👎.


**Re-running is safe.** Every imported video carries a per-source metaTag (`vimeoId`, `s3Source`, `wistiaId`, `muxAssetId`, `cfStreamId`, `jwPlayerId`, `brightcoveId`). A re-run skips tagged videos Bunny has finished, leaves ones still encoding alone, and imports again only the ones Bunny failed on. Source folders become Stream collections of the same name. Videos the source reports as beyond Bunny's limits (over 72 hours, or above 2160p) are flagged before you confirm.

**Progress** is saved to `$XDG_STATE_HOME/bunnynet/stream-import/<account>/<source>-<library>.json` (default `~/.local/state/...`). `--resume` retries failed videos, works outstanding ones, and keeps the `--folder` scope the run started with. It does **not** retry videos Bunny rejected for a reason the same file cannot get past (over limits, invalid framerate, corrupt original), ones no longer at the source, or ones that failed 3 times; use `--clean-failed` for those. Two imports cannot share one state file.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not prescribe --clean-failed for a missing source video

When a resumed journal entry is no longer listed by the source, --clean-failed cannot retry it: without rediscovering the source video or finding an existing Bunny copy, the entry is excluded from the queue and is marked permanently failed again. This sentence groups that case with rejected and three-attempt failures and tells users to use --clean-failed for all of them; the missing-source case instead requires restoring the source video.

Useful? React with 👍 / 👎.

…ands

Plural libraries, videos, and collections namespaces; captions, encode,
transcribe, and smart under videos; stream link, unlink, and regions;
the new create, credentials, and rotate flags; and drop the preview label.
@jamie-at-bunny
jamie-at-bunny merged commit b91d4a4 into main Oct 15, 2026
5 checks passed
@jamie-at-bunny
jamie-at-bunny deleted the stream-skills branch October 15, 2026 15:03
@github-actions github-actions Bot mentioned this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants