← Back to CLIs

v0-cli
Manage v0 Platform API via CLI - chats, projects, deployments, hooks, mcp-servers, integrations, user, reports, rate-limits. Use when user mentions 'v0', 'v0 chat', 'generate UI', 'deploy v0 app', 'v0 project', 'AI code generation', or wants to interact with the v0 API.
Install
$ npx api2cli install Anthony-Faria-dos-santos/v0-cliDetails
README
v0-cli
CLI for the v0 Platform API — generate, deploy, and manage AI-built apps. Made with api2cli.dev.
Install
# via npm
npm i -g @nixshade/v0-cli
# or run directly
npx @nixshade/v0-cli --help
# via api2cli
npx api2cli install Anthony-Faria-dos-santos/v0-cli
Usage
v0-cli auth set "your-v0-api-key"
v0-cli auth test
v0-cli --help
Get your API key at v0.dev/chat/settings/keys.
Resources
| Resource | Description |
|---|---|
chats | Create AI chats, send messages, manage versions, import code |
projects | Organize chats into projects with env vars and instructions |
deployments | Deploy chat versions, view logs and errors |
hooks | Manage webhooks for v0 events |
mcp-servers | Register MCP servers for extended AI tool use |
integrations | Link v0 projects to Vercel |
user | View profile, billing, plan, and scopes |
reports | Usage analytics and user activity reports |
rate-limits | View API rate limits |
Examples
# Create a chat with AI prompt
v0-cli chats create --message "Create a responsive navbar" --json
# Import a GitHub repo into v0
v0-cli chats init --type repo --repo-url "https://github.com/user/repo" --json
# Deploy a chat version
v0-cli deployments create --project-id pid --chat-id cid --version-id vid --json
# Check deployment logs
v0-cli deployments logs <deploymentId> --json
# View usage reports
v0-cli reports usage --start-date 2025-01-01 --end-date 2025-01-31 --json
Global Flags
All commands support: --json, --format <text|json|csv|yaml>, --verbose, --no-color, --no-header
Exit codes: 0 = success, 1 = API error, 2 = usage error