Complete command, flag, and environment-variable reference for the agent-video CLI — login, chunked resumable uploads, video/chapter management, machine tokens, and the stdio MCP server.
$ agent-video loginBrowser OIDC login; stores a refresh token in ~/.agent-video.
$ agent-video upload session.mp4 --title "Sprint demo" --tag demoChunked resumable upload with a title and a tag.
$ agent-video edit abc123 --privacy unlistedChange a video's privacy tier without touching anything else.
$ agent-video chapters abc123 --add "1:30=Intro"Append one chapter marker.
$ agent-video token mint --label "CI runner"Mint a machine bearer token for a headless runner or agent.
$ agent-video installWire ./.mcp.json to run `agent-video mcp`.
agent-video is the standalone Go CLI for Agent Video
— a self-hosted video-sharing product. It logs you in over OIDC, uploads local
video files with a chunked resumable protocol, manages a video's metadata and
chapters, mints machine bearer tokens, wires Claude Code's ./.mcp.json to a
stdio MCP server, and prints usage.
The CLI source lives in src/agent-video/ (a separate Go module from the
Next.js server). See the releases page.
agent-video <command> [options]
login Log in to an Agent Video server (OIDC loopback browser flow)
upload Chunked resumable upload [FILE]
video List your videos [aliases: videos, list, ls]
show Show one video's metadata [ID]
edit Update title/description/privacy/password [ID]
chapters Set or add chapter markers [ID] [alias: chapter]
rm Delete a video [ID] [aliases: delete, remove]
token Manage machine bearer tokens (mint/list/revoke) [alias: tokens]
mcp Run the stdio MCP server (upload/list/show tools)
install Wire ./.mcp.json to run `agent-video mcp` [aspire]
version Print the CLI version [--version, -v]
help Show usage [-h, --help]
| Variable | Default | Purpose |
|---|---|---|
AGENT_VIDEO_SERVER | https://video.agentics.dk | Server base URL the CLI talks to. |
AGENT_VIDEO_ISSUER | https://login.agentics.dk/realms/agentics | OIDC issuer used for login. |
AGENT_VIDEO_CLIENT_ID | agentics-video-desktop | OIDC client id for the loopback flow. |
AGENT_VIDEO_HOME | ~/.agent-video (or ~/.agent-video-aspire) | Config + credential directory. See note below. |
AGENT_VIDEO_TOKEN | (none) | Bearer token that skips OIDC entirely — CI / agents with no browser. |
USE_ASPIRE | (unset) | When truthy, use the local Aspire dev cred home/tunnel for every command. |
OIDC login requests scopes openid profile email offline_access.
Config/credential dir. The default is ~/.agent-video. When USE_ASPIRE
is truthy (or install aspire is used), the CLI uses ~/.agent-video-aspire
instead so a local login never clobbers your production credentials. Override
the location with AGENT_VIDEO_HOME.
Logs in to an Agent Video server using an OIDC loopback (browser) flow, then
saves the refresh token, your sub, and your display name to the credential
store. After saving, it sanity-checks the token with a videos-list call
(warns but doesn't fail if the server is unreachable).
| Flag | Default | Description |
|---|---|---|
--server | stored host → https://video.agentics.dk | Server base URL to log in to. |
Stale or dead refresh tokens auto re-login inline when running on a TTY; non-interactively the CLI prints copy-paste re-login instructions.
Uploads a local video file using a chunked (8 MiB), resumable protocol. The
file is streamed — never buffered whole in memory — via io.SectionReader
per chunk. Each chunk retries up to 5 times with exponential backoff
(500ms → 30s cap). A TTY shows a live progress line (percent, bytes,
throughput, ETA); a non-TTY (CI/log) gets one plain line per 10% crossed.
| Flag | Default | Description |
|---|---|---|
--title <text> | the file name | Video title. |
--description <text> | — | Video description. |
--privacy <tier> | unlisted | public | unlisted | password | private. |
--password <text> | — | Required when --privacy password (or implies it if set alone). |
--tag <text> | — | Attach a tag. Repeatable: --tag a --tag b. |
--wait | — | Block until server-side processing leaves processing/uploading (10 min timeout). |
--json | — | Print the resulting video as JSON. |
Resumability. The CLI keys local resume state off a hash of
(absolute path, size, mtime). If you re-run the exact same command against
the same unmodified file after an interruption, it asks the server how many
chunks it actually received (GetUploadStatus) and continues from there —
never re-sending data the server already has. If the server has forgotten the
session (past its retention window), the CLI safely abandons it and starts a
fresh upload.
agent-video upload session.mp4 --title "Sprint demo" --tag demo --wait
Lists your videos, newest first: id, status, privacy, title.
| Flag | Description |
|---|---|
--json | Print videos as JSON. |
--limit <n> | Cap the number of videos returned. |
Prints one video's full metadata: title, description, privacy, status, duration, tags, chapters, view count, share URL, created-at.
| Flag | Description |
|---|---|
--json | Print the video as JSON. |
Updates a video's title, description, privacy, and/or password. Only the
flags you actually pass are sent — an unset --title never clobbers the
stored title.
| Flag | Description |
|---|---|
--title <text> | New title. |
--description <text> | New description. |
--privacy <tier> | public | unlisted | password | private. |
--password <text> | Required when --privacy password. |
--json | Print the resulting video as JSON. |
At least one of --title/--description/--privacy/--password is
required; passing none is a usage error.
agent-video edit abc123 --privacy password --password "letmein"
Sets or appends chapter markers on a video. Pass exactly one of --set or
--add.
| Flag | Description |
|---|---|
--set <file.json> | Replace all chapters from a JSON array of {timestamp, title}. |
--add "MM:SS=Title" | Append a single chapter. Accepts SS, MM:SS, or H:MM:SS. |
--json | Print the resulting video as JSON. |
agent-video chapters abc123 --add "1:30=Intro"
agent-video chapters abc123 --set chapters.json
chapters.json:
[
{ "timestamp": 0, "title": "Intro" },
{ "timestamp": 90, "title": "Deep dive" }
]
Deletes a video.
| Flag | Description |
|---|---|
--force | Skip the confirmation prompt. |
Without --force, the CLI prompts Delete "<title>" (<id>)? on a TTY; a
non-interactive run (no TTY on stdin) refuses outright rather than silently
deleting or silently proceeding.
agent-video rm abc123 --force
Manages machine bearer tokens — issued for CI runners or agents that can't
run an interactive browser login. Minting/listing/revoking a token always
requires a real OIDC login (ownerAccess); a machine token itself can
never be used to mint more machine tokens, so a leaked token has no way to
self-escalate.
Mints a token and prints it once.
| Flag | Default | Description |
|---|---|---|
--label <text> | agent-video token <YYYY-MM-DD> | Name the token (findable later). |
--json | — | Print the token as JSON. |
agent-video token mint --label "CI runner"
Lists your machine tokens: id, label, and relative last-used time.
| Flag | Description |
|---|---|
--json | Print tokens as JSON. |
Revokes a token by id.
agent-video token revoke <ID>
Runs the stdio MCP server exposing upload, list, and show as tools, so a
coding agent can publish a video with no shell access. Auth is resolved
exactly like every other command: AGENT_VIDEO_TOKEN wins when set, otherwise
the stored OIDC login is used (auto-refreshed) — no secret needs to live in
the MCP config itself. Progress output is suppressed (silent reporter) so no
terminal control sequences leak into the stdio JSON-RPC stream.
See the MCP tools reference for the full tool catalog and argument shapes.
Wires ./.mcp.json (Claude Code's project-scoped MCP config) to run
agent-video mcp, preserving any other servers already in the file. No
secret is written to the file — auth comes from your stored login (or
AGENT_VIDEO_TOKEN in the environment) — so it's safe to commit.
agent-video install # wires the hosted/production server (default)
Wires ./.mcp.json to a local Aspire resource instead of production. The
resource defaults to video. The CLI runs aspire describe <resource> --format Json, prefers the resource's PUBLIC_BASE_URL (falling back to the
loopback URL), pulls OIDC_ISSUER if set, and points AGENT_VIDEO_HOME at
~/.agent-video-aspire so a local login doesn't clobber prod credentials.
agent-video install aspire video
agent-video version # also --version, -v → prints "agent-video <version>"
agent-video help # also -h, --help
./.mcp.json is project-scoped Claude Code config. Every path that writes it
(install, install aspire) writes no secret — auth is always your
stored login (or AGENT_VIDEO_TOKEN from the environment at run time), so the
file is safe to commit.