npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

v0-cli

v1.1.6

Published

CLI tool for v0 SDK

Readme

v0 CLI

A developer-friendly command-line tool to interact with the v0 Platform API.

Installation

Option 1: Local Installation (Recommended)

# Clone the repository
git clone [email protected]:emmanuel-martinez-dev/v0-cli.git
cd v0-cli

# Install CLI locally
./cli/install-local.sh

Option 2: Global Installation (Requires administrator permissions)

# Install globally
npm install -g v0-cli

# Or use npx
npx v0-cli --help

Option 3: Development

# Clone and setup for development
git clone [email protected]:emmanuel-martinez-dev/v0-cli.git
cd v0-cli

# Install dependencies
npm install

# Compile
npm run build

# Run directly
node dist/index.js --help

Quick Start

Before using the CLI, configure your API key:

# Interactive setup
v0 config setup

# Or configure manually
v0 config set-api-key YOUR_API_KEY

Get your API key from: https://v0.dev/chat/settings/keys

Usage

Key ideas:

  • Global flags: --api-key, --verbose, --output json|yaml|table.
  • Precedence for API key: --api-key > V0_API_KEY > saved config > interactive prompt.
  • Output format hierarchy: per-command --output > global --output > saved config.

Chats

Create a chat

# Create chat with message
v0 chat create "Create a React component with Tailwind CSS"

# Create interactive chat
v0 chat create

# With additional options
v0 chat create "Message" --system "You are a React expert" --privacy private --model v0-1.5-md --project-id PROJECT_ID --attachment https://example.com/a.png https://example.com/b.txt

List chats

# List all chats
v0 chat list

# List only favorites
v0 chat list --favorite

# Filter by project / privacy / name
v0 chat list --project-id PROJECT_ID --privacy private --name navbar

# Limit results
v0 chat list --limit 5

Get chat details

v0 chat get CHAT_ID

Send message to chat

# Send message
v0 chat message CHAT_ID "Add form validation"

# Send interactive message
v0 chat message CHAT_ID

Update chat

# Rename
v0 chat update CHAT_ID --name "New name"

# Change privacy
v0 chat update CHAT_ID --privacy public

Delete chat

# With confirmation
v0 chat delete CHAT_ID

# Without confirmation
v0 chat delete CHAT_ID --force

Favorites

# Add to favorites
v0 chat favorite CHAT_ID

# Remove from favorites
v0 chat favorite CHAT_ID --remove

Projects

Create project

# Create project with name
v0 project create "My Project"

# Create interactive project
v0 project create

# With description
v0 project create "My Project" --description "An amazing project"

List projects

v0 project list

Get project details

v0 project get PROJECT_ID

Update project

v0 project update PROJECT_ID --name "New Name" --description "New description"

Assign chat to project

v0 project assign PROJECT_ID CHAT_ID

Get project by chat

v0 project get-by-chat CHAT_ID

Deployments

List deployments

# Guided selection (recommended)
v0 deploy list

# Filter by project
v0 deploy list --project-id PROJECT_ID

# Filter by chat
v0 deploy list --chat-id CHAT_ID

Create deployment

# Interactive deployment (recommended)
v0 deploy create

# With specific IDs
v0 deploy create PROJECT_ID CHAT_ID VERSION_ID

# With project and chat names
v0 deploy create --project-name "My Project" --chat-name "My Chat"

# Force interactive mode
v0 deploy create --interactive

Quick deploy from chat

# Interactive chat selection
v0 deploy from-chat

# With chat ID
v0 deploy from-chat CHAT_ID

# With chat name
v0 deploy from-chat --chat-name "My Chat"

Quick deploy (create project, chat and deploy)

# Interactive mode
v0 deploy quick

# With message
v0 deploy quick "Create a React todo app"

# With project name and message
v0 deploy quick "Create a React todo app" --project-name "Todo App"

Get deployment details

v0 deploy get DEPLOYMENT_ID

Delete deployment

v0 deploy delete DEPLOYMENT_ID

View deployment logs

v0 deploy logs DEPLOYMENT_ID

# With timestamp
v0 deploy logs DEPLOYMENT_ID --since 1640995200000

View deployment errors

v0 deploy errors DEPLOYMENT_ID

User

User information

v0 user info

Plan and billing

v0 user plan

Detailed billing information

v0 user billing

# With specific scope
v0 user billing --scope SCOPE

User scopes

v0 user scopes

Rate limits

v0 user rate-limits

# With specific scope
v0 user rate-limits --scope SCOPE

Configuration

Show current configuration

v0 config show

Configure API key

# With argument
v0 config set-api-key YOUR_API_KEY

# Interactive
v0 config set-api-key

Configure default project

v0 config set-default-project PROJECT_ID

Configure output format

v0 config set-output-format json
v0 config set-output-format table
v0 config set-output-format yaml

Clear configuration

v0 config clear

Complete interactive setup

v0 config setup

Global Options

Output Format

# JSON
v0 chat list --output json

# YAML
v0 project list --output yaml

# Table (default)
v0 user info --output table

API Key

# Use specific API key
v0 chat create "Message" --api-key YOUR_API_KEY

Verbose

# Enable detailed logs
v0 chat list --verbose

Usage Examples

Complete Development Workflow

# 1. Configure CLI
v0 config setup

# 2. Create project
v0 project create "My React App"

# 3. Create chat for the project
v0 chat create "Create a React todo app" --project-id PROJECT_ID

# 4. Send additional message
v0 chat message CHAT_ID "Add local persistence"

# 5. Create deployment
v0 deploy create PROJECT_ID CHAT_ID VERSION_ID

# 6. View deployment logs
v0 deploy logs DEPLOYMENT_ID

Quick Deploy Workflow (Recommended)

# 1. Configure CLI
v0 config setup

# 2. Quick deploy everything in one command
v0 deploy quick "Create a React todo app with local storage"

# 3. Or deploy from existing chat
v0 deploy from-chat

# 4. View deployment logs
v0 deploy logs DEPLOYMENT_ID

Automation

# Create chat and get URL
CHAT_URL=$(v0 chat create "Create a navbar" --output json | jq -r '.webUrl')
echo "Chat created: $CHAT_URL"

# List projects in JSON format
v0 project list --output json | jq '.[] | .name'

# Quick deploy with automation
DEPLOYMENT_URL=$(v0 deploy quick "Create a React component" --output json | jq -r '.deployment.webUrl')
echo "Deployment ready: $DEPLOYMENT_URL"

Features

  • Persistent configuration: API key and settings are saved automatically
  • Output formats: JSON, YAML, and developer-friendly tables
  • Better errors: Status/code/message, optional verbose body/stack
  • Interactive UX: Guided prompts when data is missing
  • Smart deployments: Project/chat/version resolution with fallbacks
  • Vercel integration: List and create integration projects
  • Name-based selection: Choose resources by name instead of IDs

Development

Install dependencies

cd cli
npm install

Compile

npm run build

Run in development

npm run dev -- --help

Testing

pnpm test
pnpm test:coverage
npm test

Troubleshooting

Installation Issues

  1. Permission error when installing globally

    # Use local installation instead
    ./cli/install-local.sh
  2. Incompatible Node.js version

    # Update Node.js to version 18 or higher
    # Visit: https://nodejs.org/
  3. Dependency errors

    # Clean and reinstall
    rm -rf node_modules package-lock.json
    npm install

Usage Issues

  1. Invalid API key

    # Check configuration
    v0 config show
       
    # Reconfigure API key
    v0 config set-api-key NEW_API_KEY
  2. Rate limit exceeded

    # Check rate limits
    v0 user rate-limits
       
    # Wait and retry
    sleep 60
    v0 chat create "Message"
  3. Deployment failed

    # View deployment errors
    v0 deploy errors DEPLOYMENT_ID
       
    # View complete logs
    v0 deploy logs DEPLOYMENT_ID

Debugging

v0 --verbose <command>
v0 --output json <command>
# Enable verbose mode
v0 chat list --verbose

# Use JSON format for debugging
v0 chat get CHAT_ID --output json | jq '.'

# View current configuration
v0 config show

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request