> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vapi.ai/llms.txt.
> For full documentation content, see https://docs.vapi.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vapi.ai/_mcp/server.

# Vapi CLI

> Command-line interface for building voice AI applications faster

## Overview

The Vapi CLI is the official command-line interface that brings world-class developer experience to your terminal and IDE. Build, test, and deploy voice AI applications without leaving your development environment.

**In this guide, you'll learn to:**

* Install and authenticate with the Vapi CLI
* Initialize Vapi in existing projects
* Manage assistants, phone numbers, and workflows from your terminal
* Forward webhooks to your local development server
* Turn your IDE into a Vapi expert with MCP integration

## Installation

Install the Vapi CLI in seconds with our automated scripts:

```bash
curl -sSL https://vapi.ai/install.sh | bash
```

```powershell
iex ((New-Object System.Net.WebClient).DownloadString('https://vapi.ai/install.ps1'))
```

```bash
docker run -it ghcr.io/vapiai/cli:latest --help
```

## Quick start

Connect your Vapi account:

```bash
vapi login
```

This opens your browser for secure OAuth authentication.

Add Vapi to an existing project:

```bash
vapi init
```

The CLI auto-detects your tech stack and sets up everything you need.

Build a voice assistant:

```bash
vapi assistant create
```

Follow the interactive prompts to configure your assistant.

## Key features

### 🚀 Project integration

Drop Vapi into any existing codebase with intelligent auto-detection:

```bash
vapi init
# Detected: Next.js application
# ✓ Installed @vapi-ai/web SDK
# ✓ Generated components/VapiButton.tsx
# ✓ Created pages/api/vapi/webhook.ts
# ✓ Added environment template
```

Supports React, Vue, Next.js, Python, Go, Flutter, React Native, and dozens more frameworks.

### 🤖 MCP integration

Turn your IDE into a Vapi expert with Model Context Protocol:

```bash
vapi mcp setup
```

Your IDE's AI assistant (Cursor, Windsurf, VSCode) gains complete, accurate knowledge of Vapi's APIs and best practices. No more hallucinated code or outdated examples.

### 🔗 Local webhook testing

Forward webhooks to your local server for debugging:

```bash
# Terminal 1: Create tunnel (e.g., with ngrok)
ngrok http 4242

# Terminal 2: Forward webhooks
vapi listen --forward-to localhost:3000/webhook
```

**Important:** `vapi listen` is a local forwarder only - it does NOT provide a public URL. You need a separate tunneling service (like ngrok) to expose the CLI's port to the internet. Update your webhook URLs in Vapi to use the tunnel's public URL.

### 🔐 Multi-account management

Switch between organizations and environments seamlessly:

```bash
# List all authenticated accounts
vapi auth status

# Switch between accounts
vapi auth switch production

# Add another account
vapi auth login
```

### 📱 Complete feature parity

Everything you can do in the dashboard, now in your terminal:

* **Assistants**: Create, update, list, and delete voice assistants
* **Phone numbers**: Purchase, configure, and manage phone numbers
* **Calls**: Make outbound calls and view call history
* **Workflows**: Manage conversation flows (visual editing in dashboard)
* **Campaigns**: Create and manage AI phone campaigns at scale
* **Tools**: Configure custom functions and integrations
* **Webhooks**: Set up and test event delivery
* **Logs**: View system logs, call logs, and debug issues

## Common commands

```bash
# List all assistants
vapi assistant list

# Create a new assistant
vapi assistant create

# Get assistant details
vapi assistant get <assistant-id>

# Update an assistant
vapi assistant update <assistant-id>

# Delete an assistant
vapi assistant delete <assistant-id>
```

```bash
# List your phone numbers
vapi phone list

# Purchase a new number
vapi phone create

# Update number configuration
vapi phone update <phone-number-id>

# Release a number
vapi phone delete <phone-number-id>
```

```bash
# List recent calls
vapi call list

# Make an outbound call
vapi call create

# Get call details
vapi call get <call-id>

# End an active call
vapi call end <call-id>
```

```bash
# View system logs
vapi logs list

# View call-specific logs
vapi logs calls <call-id>

# View error logs
vapi logs errors

# View webhook logs
vapi logs webhooks
```

## Configuration

The CLI stores configuration in `~/.vapi-cli.yaml`. You can also use environment variables:

```bash
# Set API key via environment
export VAPI_API_KEY=your-api-key

# View current configuration
vapi config get

# Update configuration
vapi config set <key> <value>

# Manage analytics preferences
vapi config analytics disable
```

## Auto-updates

The CLI automatically checks for updates and notifies you when new versions are available:

```bash
# Check for updates manually
vapi update check

# Update to latest version
vapi update
```

## Next steps

Now that you have the Vapi CLI installed:

* **[Initialize a project](/cli/init):** Add Vapi to your existing codebase
* **[Set up MCP](/cli/mcp):** Enhance your IDE with Vapi intelligence
* **[Test webhooks locally](/cli/webhook):** Debug webhooks with tunneling services
* **[Manage authentication](/cli/auth):** Work with multiple accounts

***

**Resources:**

* [GitHub Repository](https://github.com/VapiAI/cli)
* [Report Issues](https://github.com/VapiAI/cli/issues)
* [Discord Community](https://discord.gg/vapi)