← Back to tools

Vercel CLI

Deploy to Vercel's edge network from the command line

Cloud & Services Development linuxmacoswindows TypeScript Apache-2.0

Description

The Vercel CLI enables deploying frontend applications and serverless functions to Vercel's global edge network directly from the terminal. It supports frameworks like Next.js, Nuxt, SvelteKit, and more, with automatic preview deployments, environment variable management, and instant rollbacks.

Install

npmnpm i -g vercel

AI Summary

Deploy frontend apps and serverless functions to Vercel's edge network. Instant preview deployments, automatic SSL, and seamless Next.js integration from the terminal.

Capabilities

  • + Deploy applications with zero configuration
  • + Create preview deployments for every branch and pull request
  • + Manage environment variables across development, preview, and production
  • + Link local projects to Vercel projects
  • + Pull remote environment variables for local development
  • + Instantly roll back to previous deployments

Use When

  • Deploying frontend applications or static sites to Vercel
  • Testing preview deployments from feature branches
  • Managing environment variables for Vercel projects
  • Need instant, zero-config deployments for Next.js or other frameworks

Avoid When

  • x Deploying backend services that need persistent servers (use flyctl or Heroku)
  • x Managing complex multi-service infrastructure (use Terraform or AWS CLI)
  • x Need full control over server configuration (use a VPS provider)

Usage Patterns

Deploy to production

vercel --prod

Builds and deploys the current directory to the production URL

Create a preview deployment

vercel

Deploys to a unique preview URL for testing

Pull environment variables locally

vercel env pull .env.local

Downloads project environment variables for local development

Input / Output

stdin: Not typically used
stdout: Deployment URLs, build output, and status information
Exit codes:
0 Success
1 Error

Typical Pipelines

vercel --prod 2>&1 | tail -1
vercel ls --json | jq '.[] | {url, state, created}'
git push origin feature && vercel --confirm

Related Tools

View AGENTS.md for Vercel CLI