Create, iterate, and deploy v0 chats from the terminal. Streaming render, parallel generations in background, stable JSON for agents.
# Prompt → chat create.
v0 "landing page with hero + pricing"
# Path → chat init (no tokens, seeds a chat from local code).
v0 ./my-project
# Iterate.
v0 msg send <chat> "swap the hero copy"
# Ship.
v0 deploy <chat> <version> # Preflight. Agents run this first.
v0 doctor --json
# Capture ids for later steps.
CHAT=$(v0 chat init --source . --json | jq -r '.data.id')
VER=$(v0 version list "$CHAT" --limit 1 --json \
| jq -r '.data.data[0].id')
# Deploy and wait for terminal status.
v0 deploy create "$CHAT" "$VER" --yes --wait --json {
"data": {
"id": "chat_8kwbm",
"object": "chat",
"latestVersion": {
"id": "ver_14lmv",
"files": [{ "name": "app/page.tsx" }]
}
}
}
Single v0 binary maps the entire v0 Platform API.
Chats, versions, deployments, env vars, webhooks, MCP servers — all covered.
TTY gets a formatted output. Pipe or add --json and
the same command returns a stable envelope ready for jq.
--background returns a chat id in under a second.
Fire N generations at once, keep working, reattach later with
chat wait or
chat watch.
bun install -g @crafter/v0-cli
v0 doctor
Needs V0_API_KEY. Self-contained, no post-install step.
npx skills add Railly/v0-cli Teaches Claude Code, Cursor, or any agent the preflight recipe, the JSON contract, the trust ladder, and how intent tokens work.
Default output is readable. Add --json and the
exact same command returns a stable envelope that pipes cleanly into
jq.
# Prompt → chat create.
v0 "landing page with hero + pricing"
# Path → chat init (no tokens, seeds a chat from local code).
v0 ./my-project
# Iterate.
v0 msg send <chat> "swap the hero copy"
# Ship.
v0 deploy <chat> <version> # Preflight. Agents run this first.
v0 doctor --json
# Capture ids for later steps.
CHAT=$(v0 chat init --source . --json | jq -r '.data.id')
VER=$(v0 version list "$CHAT" --limit 1 --json \
| jq -r '.data.data[0].id')
# Deploy and wait for terminal status.
v0 deploy create "$CHAT" "$VER" --yes --wait --json v0 <arg> picks the right verb based on what you pass.
Paths, URLs, and template ids route to chat init. Bare prompts route to
chat create.
v0 . → chat init (cwd) v0 ./mi-proyecto → chat init (files) v0 ~/code/app → chat init (files) v0 https://github.com/foo/bar → chat init (repo) v0 https://example.com/dist.zip → chat init (zip) v0 https://example.com/registry.json → chat init (registry) v0 https://v0.app/templates/optimus-… → chat init (template) v0 template_abc → chat init (template) v0 "landing page with hero" → chat create (prompt)
Each v0 generation takes 30–60s. Agents that serialize burn time doing nothing.
--background detaches a worker and returns the
chat_id immediately. Persisted across crashes.
Reattach from any terminal.
# Fire three chats. Each returns in <1s.
v0 "hero section" --background --json
v0 "pricing table" --background --json
v0 "footer" --background --json
# Do other work. Then join.
v0 chat pending --json # list all in-flight
v0 chat wait chat_abc --json # block until ready
v0 chat watch chat_def # live stream render v0 binary that wraps the v0 Platform API.
It mirrors the entire SDK surface, enforces a trust ladder, emits stable JSON for agents, and keeps
an audit trail for every run.
action + hash(params), single-use, with a default
15-minute TTL.
/rate-limits before dispatching and
exit 3 when under threshold. On HTTP 429 or 5xx the CLI retries with exponential backoff plus jitter,
up to four attempts.
--json is the canonical contract,
exit codes are stable (0 ok, 1 API, 2 validation, 3 rate-limited, 4 killswitch, 5 intent required/invalid,
6 network). Every run writes a two-phase entry (pending then ok or error) to
~/.v0cli/audit/.
V0_API_KEY in your shell or save it to a profile with
v0 auth login.