v0-cli Star on GitHub

cli.

Agent-first command-line wrapper for the v0 Platform API.

v0-cli bash
$ v0 "landing page with hero + pricing"
$ v0 deploy
$ v0 doctor
Install

One command for the binary. One for the skill.

CLI binary
bun install -g @crafter/v0-cli
v0 doctor

Needs V0_API_KEY. Self-contained binary, no post-install step.

Agent skill
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.

Workflow

Human first. JSON for agents.

By default every command prints readable output. Add --json and the same command returns a stable envelope that pipes cleanly into jq.

human
# Start from a prompt. Shorthand for chat create.
v0 "landing page with hero + pricing"

# Or init from files you already have.
v0 chat init --source ./my-template

# Iterate.
v0 msg send <chat-id> "swap the hero copy"

# Ship.
v0 deploy <chat-id> <version-id>
agent
# Preflight. Agents run this first.
v0 doctor --json

# Init, capture the id.
CHAT=$(v0 chat init --source ./my-template --json | jq -r '.data.id')

# Resolve newest version, deploy with terminal polling.
VER=$(v0 version list "$CHAT" --limit 1 --json | jq -r '.data.data[0].id')
v0 deploy create "$CHAT" "$VER" --yes --wait --json
Trust ladder

Four levels. Safety readable from the command name.

Reads are silent. Writes log. Destructive operations want a confirmation, or a single-use intent token that only works for the exact action and params it was minted for.

T0

Auto.

Silent reads. v0 doctor, auth whoami, project list, schema, every list and show.

T1

Log.

Audit only, no prompt. chat create, chat init, msg send, env set (plain keys), project create.

T2

Confirm.

TTY prompt or --yes. Exits 2 in JSON mode without --yes. Covers deploy create, env list --decrypted, chat delete.

T3

Killswitch.

Single-use intent token bound to action + hash(params). Expires. Cannot be reused. Cannot be retargeted. hook delete, deploy delete, env delete (bulk).

Why a CLI, not raw API calls

Stable JSON.

Every command returns {data} or {error}. No schema drift.

Validated before fetch.

--params bodies are checked against bundled OpenAPI. Typos exit 2 without spending a request.

Audit every run.

Two-phase JSONL at ~/.v0cli/audit/. Pending flips to ok or error. API keys redacted to a prefix.

Rate-limit preflight.

Writes consult /rate-limits first. Exits 3 below threshold. Exponential backoff on 429.

Offline schema.

v0 schema <operationId> prints the request and response shape without hitting the API.

Killswitch.

v0 killswitch on blocks every T2 and T3 op instantly. T0 and T1 keep working.