Vapi CLI

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:

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

Quick start

1

Authenticate

Connect your Vapi account:

$vapi login

This opens your browser for secure OAuth authentication.

2

Initialize your project

Add Vapi to an existing project:

$vapi init

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

3

Create your first assistant

Build a voice assistant:

$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:

$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:

$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:

$# 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:

$# 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

$# 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>
$# 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>
$# 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>
$# 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:

$# 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:

$# Check for updates manually
$vapi update check
$
$# Update to latest version
$vapi update

Next steps

Now that you have the Vapi CLI installed:


Resources: