Skip to content

Vercel CLI Commands

Comprehensive Vercel CLI commands and workflows for deployment and serverless development.

Installation and Setup

CommandDescription
npm install -g vercelInstall Vercel CLI globally
yarn global add vercelInstall with Yarn
vercel loginLogin to Vercel account
vercel logoutLogout from Vercel
vercel whoamiShow current user
vercel --versionShow CLI version
vercel --helpShow help information

Project Management

CommandDescription
vercelDeploy current directory
vercel --prodDeploy to production
vercel --prebuiltDeploy prebuilt static files
vercel initInitialize new project
vercel linkLink local directory to Vercel project
vercel unlinkUnlink project
vercel lsList all deployments
vercel rm <deployment>Remove deployment

Deployment Commands

CommandDescription
vercel deployDeploy project
vercel --name <name>Deploy with custom name
vercel --target productionDeploy to production
vercel --target previewDeploy to preview
vercel --build-env KEY=valueSet build environment variable
vercel --env KEY=valueSet runtime environment variable
vercel --regions <regions>Deploy to specific regions
vercel --forceForce new deployment

Environment Variables

CommandDescription
vercel env lsList environment variables
vercel env add <name>Add environment variable
vercel env rm <name>Remove environment variable
vercel env pullDownload environment variables
vercel env pull .env.localPull to specific file

Domain Management

CommandDescription
vercel domains lsList all domains
vercel domains add <domain>Add custom domain
vercel domains rm <domain>Remove domain
vercel domains inspect <domain>Inspect domain configuration
vercel alias <deployment> <domain>Set domain alias
vercel alias rm <alias>Remove alias

Project Configuration

CommandDescription
vercel projects lsList all projects
vercel projects add <name>Create new project
vercel projects rm <name>Remove project
vercel switch <project>Switch to project
vercel inspect <deployment>Inspect deployment details

Logs and Monitoring

CommandDescription
vercel logs <deployment>View deployment logs
vercel logs --followFollow logs in real-time
vercel logs --since 1hShow logs from last hour
vercel logs --until 2hShow logs until 2 hours ago
vercel logs --output rawShow raw log output

Secrets Management

CommandDescription
vercel secrets lsList all secrets
vercel secrets add <name> <value>Add secret
vercel secrets rm <name>Remove secret
vercel secrets rename <old> <new>Rename secret

Teams and Organizations

CommandDescription
vercel teams lsList teams
vercel teams switch <team>Switch to team
vercel teams add <email>Invite team member
vercel teams rm <email>Remove team member

Development Server

CommandDescription
vercel devStart local development server
vercel dev --listen 3000Start on specific port
vercel dev --debugStart with debug mode
vercel dev --confirmSkip confirmation prompts

DNS Management

CommandDescription
vercel dns ls <domain>List DNS records
vercel dns add <domain> <type> <value>Add DNS record
vercel dns rm <record-id>Remove DNS record
vercel dns import <domain> <file>Import DNS records

Certificates

CommandDescription
vercel certs lsList SSL certificates
vercel certs add <domain>Add SSL certificate
vercel certs rm <cert-id>Remove certificate
vercel certs issue <domain>Issue new certificate

Build Configuration

CommandDescription
vercel buildBuild project locally
vercel --build-env NODE_ENV=productionSet build environment
vercel --no-buildSkip build process
vercel --debugEnable debug output

Git Integration

CommandDescription
vercel git connectConnect Git repository
vercel git disconnectDisconnect Git repository
vercel git lsList connected repositories

Functions and API Routes

CommandDescription
vercel functions lsList serverless functions
vercel functions inspect <function>Inspect function details
vercel functions logs <function>View function logs

Deployment Aliases

CommandDescription
vercel alias lsList all aliases
vercel alias set <deployment> <alias>Set deployment alias
vercel alias rm <alias>Remove alias

Project Settings

CommandDescription
vercel --scope <team>Run command in team scope
vercel --token <token>Use specific auth token
vercel --global-config <path>Use custom config path
vercel --local-config <path>Use local config file

Advanced Deployment

CommandDescription
vercel --archive=tgzCreate deployment archive
vercel --publicMake deployment public
vercel --regions allDeploy to all regions
vercel --regions sfo1,iad1Deploy to specific regions

Troubleshooting

CommandDescription
vercel --debugEnable debug mode
vercel --verboseEnable verbose output
vercel doctorRun diagnostic checks
vercel statusCheck Vercel service status

Configuration Files

FileDescription
vercel.jsonProject configuration
.vercelignoreFiles to ignore during deployment
.env.localLocal environment variables
.env.productionProduction environment variables

Integration Commands

CommandDescription
vercel integrations lsList integrations
vercel integrations add <integration>Add integration
vercel integrations rm <integration>Remove integration

Performance Optimization

CommandDescription
vercel --prod --regions sfo1Deploy to single region
vercel --build-env NEXT_TELEMETRY_DISABLED=1Disable telemetry
vercel --no-clipboardDisable clipboard copy