Deploy web projects to Vercel using the official CLI. Supports preview deployments, production promotion, domain management, and environment variables.
When to Use
Use when the user asks to deploy a site, push to Vercel, check deployment status, manage Vercel domains, or set environment variables.
Prerequisites
The user must have the Vercel CLI installed and authenticated:
npm i -g vercel
vercel loginDeployment Workflow
1. Preview deployment (default — safe)
cd /path/to/project
vercel --yesThis creates a preview URL. Share it with the user for review.
2. Production deployment
Only after user confirms the preview looks good:
vercel --prod --yes3. Deploy a specific directory
vercel ./dist --yes
vercel ./out --prod --yesEnvironment Variables
vercel env ls
vercel env add VARIABLE_NAME
vercel env pull .env.localDomain Management
vercel domains ls
vercel domains add example.com
vercel domains inspect example.comCheck Deployments
vercel ls
vercel inspect <deployment-url>Response Format
After deployment, always provide:
- ✅ Deployment URL (preview or production)
- ⏱ Build time if visible
- Any build errors or warnings in full
Rules
- Always do a preview deployment first. Never go straight to production unless explicitly asked.
- Confirm with the user before promoting to production.
- If the build fails, show the full error log and suggest fixes.
- Never hardcode secrets in commands — use
vercel env addfor sensitive values. - If
vercelCLI is not found, guide the user through installation.