# Vercel CLI
> Deploy to Vercel's edge network from the command line

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

## When to Use
- 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

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

## Key Flags
- `deploy`: Deploy the current project to Vercel (default command)
- `--prod`: Deploy directly to the production domain
- `env pull`: Download environment variables to a local .env file
- `dev`: Start a local development server that mirrors the Vercel environment
- `link`: Link the current directory to a Vercel project

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

## Installation
- **npm**: `npm i -g vercel`

## Related Tools
- [netlify-cli](/tools/netlify-cli) (alternative): Netlify CLI is a competing platform with similar deployment workflow
- [wrangler](/tools/wrangler) (alternative): Wrangler deploys to Cloudflare's edge network instead
- [flyctl](/tools/flyctl) (complementary): flyctl for backend services, Vercel for frontend deployments

---
Source: https://littlescripts.sh/tools/vercel
