Vercel CLI Overview

Vercel CLI Overview

Vercel gives you multiple ways to interact with and configure your Vercel Projects. With the command-line interface (CLI) you can interact with the Vercel platform using a terminal, or through an automated system, enabling you to retrieve logs, manage certificates, replicate your deployment environment locally, manage Domain Name System (DNS) records, and more.

If you'd like to interface with the platform programmatically, check out the REST API documentation.

Installing Vercel CLI

To download and install Vercel CLI, run the following command:

```bash pnpm i vercel ``` ```bash yarn i vercel ``` ```bash npm i vercel ``` ```bash bun i vercel ```

Updating Vercel CLI

When there is a new release of Vercel CLI, running any command will show you a message letting you know that an update is available.

If you have installed our command-line interface through npm or Yarn, the easiest way to update it is by running the installation command yet again.

```bash pnpm i vercel ``` ```bash yarn i vercel ``` ```bash npm i vercel ``` ```bash bun i vercel ```

If you see permission errors, please read npm's official guide. Yarn depends on the same configuration as npm.

Checking the version

The --version option can be used to verify the version of Vercel CLI currently being used.

vercel --version

Using the `vercel` command with the `--version` option.

Using in a CI/CD environment

Vercel CLI requires you to log in and authenticate before accessing resources or performing administrative tasks. In a terminal environment, you can use vercel login, which requires manual input. In a CI/CD environment where manual input is not possible, you can create a token on your tokens page and then authenticate using one of these methods:

Using the VERCEL_TOKEN environment variable is recommended for CI/CD because it avoids exposing the token in command-line arguments, which can be visible in process lists and logs. If both are provided, the --token flag takes precedence over the environment variable.

Experimental native CLI binaries

Native CLI binaries are also available as an experimental opt-in install.

Native CLI binaries can reduce setup in environments where installing and maintaining Node.js is unnecessary or inconvenient, including lightweight containers, CI jobs, or managed developer workspaces.

To install the native binary, run:

pnpm i -g @vercel/vc-native -f

The -f flag is required because the native package installs the same global bin names as the standard CLI. It allows pnpm to replace existing global vercel and vc bin links. Once installed, vercel and vc run the native binary matched to your OS and CPU architecture, across macOS, Linux, and Windows on x64 and arm64.

Platform-specific packages are also available when you need a specific binary:

pnpm i -g @vercel/vc-native-darwin-x64 -f

Available Commands

activity

View activity events for your Vercel project or team, filtered by type, date range, and project.

vercel activity
vercel activity ls --all --since 30d
vercel activity ls --type deployment --since 7d

Learn more about the activity command

agent

Generate an AGENTS.md file in the current project with Vercel deployment best practices for coding agents.

vercel agent init
vercel agent init --yes

Learn more about the agent command

ai-gateway

Manage AI Gateway resources, including API keys, from the CLI.

vercel ai-gateway api-keys create
vercel ai-gateway api-keys create --name my-key --budget 500 --refresh-period monthly

Learn more about the ai-gateway command

alerts

List recent alerts for a linked project, a specific project, or an entire team.

vercel alerts
vercel alerts --all
vercel alerts --project [project-name]

Learn more about the alerts command

alias

Apply custom domain aliases to your Vercel deployments.

vercel alias set [deployment-url] [custom-domain]
vercel alias rm [custom-domain]
vercel alias ls

Learn more about the alias command

api

Make authenticated HTTP requests to the Vercel API from your terminal. This is a beta command.

vercel api [endpoint]
vercel api /v2/user
vercel api /v9/projects -X POST -F name=my-project

Learn more about the api command

bisect

Perform a binary search on your deployments to help surface issues.

vercel bisect
vercel bisect --good [deployment-url] --bad [deployment-url]

Learn more about the bisect command

blob

Interact with Vercel Blob storage to upload, download, list, delete, and copy files.

vercel blob list
vercel blob put [path-to-file]
vercel blob get [url-or-pathname]
vercel blob del [url-or-pathname]
vercel blob copy [from-url] [to-pathname]

Learn more about the blob command

build

Build a Vercel Project locally or in your own CI environment.

vercel build
vercel build --prod

Learn more about the build command

buy

Purchase Vercel products like credits, addons, subscriptions, and domains directly from the CLI.

vercel buy credits v0 100
vercel buy addon siem 1
vercel buy pro
vercel buy domain example.com

Learn more about the buy command

cache

Manage cache for your project (CDN cache and Data cache).

vercel cache purge
vercel cache purge --type cdn
vercel cache purge --type data
vercel cache invalidate --tag foo
vercel cache dangerously-delete --tag foo

Learn more about the cache command

certs

Manage certificates for your domains.

vercel certs ls
vercel certs issue [domain]
vercel certs rm [certificate-id]

Learn more about the certs command

contract

View contract commitment information for your Vercel account.

vercel contract
vercel contract --format json

Learn more about the contract command

crons

Manage Cron Jobs for a project: add cron entries to vercel.json, list them, and trigger them on demand. This command is in beta.

vercel crons ls
vercel crons add --path /api/cron --schedule "0 10 * * *"
vercel crons run /api/cron

Learn more about the crons command

curl

Make HTTP requests to your Vercel deployments with automatic deployment protection bypass. This is a beta command.

vercel curl [path]
vercel curl /api/hello
vercel curl /api/data --deployment [deployment-url]

Learn more about the curl command

deploy

Deploy your Vercel projects. Default command when no subcommand is specified.

vercel
vercel deploy
vercel deploy --prod

Learn more about the deploy command

deploy-hooks

Manage Deploy Hooks: list, create, and remove deploy hook URLs that trigger new deployments when called.

vercel deploy-hooks ls
vercel deploy-hooks create cms-rebuild --ref main
vercel deploy-hooks rm hook_abc123

Learn more about the deploy-hooks command

dev

Replicate the Vercel deployment environment locally and test your project.

vercel dev
vercel dev --port 3000

Learn more about the dev command

dns

Manage your DNS records for your domains.

vercel dns ls [domain]
vercel dns add [domain] [name] [type] [value]
vercel dns rm [record-id]

Learn more about the dns command

domains

Buy, sell, transfer, and manage your domains.

vercel domains ls
vercel domains add [domain] [project]
vercel domains rm [domain]
vercel domains buy [domain]
vercel domains price [domain] [...domain]
vercel domains check [domain] [...domain]

Learn more about the domains command

edge-config

Manage Edge Config stores: list, create, inspect, update, remove, and manage items and read tokens.

vercel edge-config list
vercel edge-config add flags
vercel edge-config items flags --key betaUiEnabled
vercel edge-config tokens flags --add "Production read"

Learn more about the edge-config command

env

Manage environment variables in your Vercel Projects.

vercel env ls
vercel env add [name] [environment]
vercel env update [name] [environment]
vercel env rm [name] [environment]
vercel env pull [file]
vercel env run -- <command>

Learn more about the env command

firewall

Manage your Vercel Firewall: view changes, publish, manage IP blocks, system bypass entries, custom rules, attack mode, and system mitigations.

vercel firewall overview
vercel firewall publish
vercel firewall ip-blocks block <ip>
vercel firewall rules list
vercel firewall attack-mode enable

Learn more about the firewall command

flags

Manage feature flags for your Vercel Project.

vercel flags list
vercel flags create [slug]
vercel flags set [flag] --environment [environment] --variant [variant]
vercel flags open [flag]

Learn more about the flags command

git

Manage your Git provider connections.

vercel git ls
vercel git connect
vercel git disconnect [provider]

Learn more about the git command

guidance

Enable or disable guidance messages shown after CLI commands.

vercel guidance enable
vercel guidance disable
vercel guidance status

Learn more about the guidance command

help

Get information about all available Vercel CLI commands.

vercel help
vercel help [command]

Learn more about the help command

httpstat

Visualize HTTP request timing statistics for your Vercel deployments with automatic deployment protection bypass.

vercel httpstat [path]
vercel httpstat /api/hello
vercel httpstat /api/data --deployment [deployment-url]

Learn more about the httpstat command

init

Initialize example Vercel Projects locally from the examples repository.

vercel init
vercel init [project-name]

Learn more about the init command

inspect

Retrieve information about your Vercel deployments.

vercel inspect [deployment-id-or-url]
vercel inspect [deployment-id-or-url] --logs
vercel inspect [deployment-id-or-url] --wait

Learn more about the inspect command

install

Install a marketplace integration and provision a resource. Alias for vercel integration add.

vercel install <integration-name>

Learn more about the install command

integration

Manage marketplace integrations: provision resources, discover available integrations, view setup guides, check balances, and manage individual resources with the nested resource subcommand.

vercel integration add <integration-name> [--claim | --no-claim]
vercel integration list [project]
vercel integration discover
vercel integration guide <integration-name>
vercel integration balance <integration-name>
vercel integration open <integration-name> [resource-name]
vercel integration remove <integration-name>
vercel integration resource connect <resource-name> [project]
vercel integration resource disconnect <resource-name> [project]
vercel integration resource remove <resource-name>
vercel integration resource create-threshold <resource-name> <minimum> <spend> <limit>
vercel integration resource claim [resource-name]

The resource subcommand is also available as vercel integration-resource <subcommand> and vc ir <subcommand> (backward-compatible aliases).

Learn more about the integration command

Link a local directory to a Vercel Project.

vercel link
vercel link [path-to-directory]

Learn more about the link command

list

List recent deployments for the current Vercel Project.

vercel list
vercel list [project-name]

Learn more about the list command

login

Login to your Vercel account through CLI.

vercel login
vercel login [email]
vercel login --github

Learn more about the login command

logout

Logout from your Vercel account through CLI.

vercel logout

Learn more about the logout command

logs

List runtime logs for a specific deployment.

vercel logs [deployment-url]
vercel logs [deployment-url] --follow

Learn more about the logs command

mcp

Set up MCP client configuration for your Vercel Project.

vercel mcp
vercel mcp --project

Learn more about the mcp command

metrics

Query observability metrics and inspect available metrics, dimensions, and aggregations.

vercel metrics vercel.request.count
vercel metrics schema
vercel metrics schema vercel.request

Learn more about the metrics command

microfrontends

Work with microfrontends configuration.

vercel microfrontends pull
vercel microfrontends pull --dpl [deployment-id]

Learn more about the microfrontends command

oauth-apps

Register Vercel Apps (OAuth) and manage team installations: register new apps, list and dismiss installation requests, install apps with permissions, and uninstall them.

vercel oauth-apps list-requests
vercel oauth-apps register --name "My App" --slug my-app --redirect-uri https://app.example.com/oauth/callback
vercel oauth-apps install --client-id cl_abc --permission read:project
vercel oauth-apps remove inst_abc123 --yes

Learn more about the oauth-apps command

open

Open your current project in the Vercel Dashboard.

vercel open

Learn more about the open command

project

List, add, inspect, remove, and manage your Vercel Projects.

vercel project ls
vercel project add
vercel project rm
vercel project inspect [project-name]

Learn more about the project command

promote

Promote an existing deployment to be the current deployment.

vercel promote [deployment-id-or-url]
vercel promote status [project]

Learn more about the promote command

pull

Update your local project with remote environment variables and project settings.

vercel pull
vercel pull --environment=production

Learn more about the pull command

redeploy

Rebuild and redeploy an existing deployment.

vercel redeploy [deployment-id-or-url]

Learn more about the redeploy command

redirects

Manage project-level redirects.

vercel redirects list
vercel redirects add /old /new --status 301
vercel redirects upload redirects.csv --overwrite
vercel redirects promote <version-id>

Learn more about the redirects command

remove

Remove deployments either by ID or for a specific Vercel Project.

vercel remove [deployment-url]
vercel remove [project-name]

Learn more about the remove command

rollback

Roll back production deployments to previous deployments.

vercel rollback
vercel rollback [deployment-id-or-url]
vercel rollback status [project]

Learn more about the rollback command

rolling-release

Manage your project's rolling releases to gradually roll out new deployments.

vercel rolling-release configure --cfg='[config]'
vercel rolling-release start --dpl=[deployment-id]
vercel rolling-release approve --dpl=[deployment-id]
vercel rolling-release complete --dpl=[deployment-id]

Learn more about the rolling-release command

routes

Manage project-level routing rules for your Vercel Project.

vercel routes list
vercel routes add --ai "Rewrite /api/* to https://backend.internal/*"
vercel routes edit "API Proxy" --dest "https://new-api.example.com/:path*"
vercel routes publish

Learn more about the routes command

sandbox

Interact with Vercel Sandbox: list, create, connect, and manage sandboxes from the terminal. See the Sandbox CLI Reference for the full surface.

vercel sandbox list
vercel sandbox create --connect

Learn more about the sandbox command

skills

Discover agent skills relevant to your project, or search the skill catalog.

vercel skills
vercel skills nextjs
vercel skills nextjs --json

Learn more about the skills command

switch

Switch between different team scopes.

vercel switch
vercel switch [team-name]

Learn more about the switch command

target

Manage custom environments (targets) and use the --target flag on relevant commands.

vercel target list
vercel target ls
vercel deploy --target=staging

Learn more about the target command

teams

List, add, remove, and manage your teams.

vercel teams list
vercel teams add
vercel teams invite [email]

Learn more about the teams command

telemetry

Enable or disable telemetry collection.

vercel telemetry status
vercel telemetry enable
vercel telemetry disable

Learn more about the telemetry command

tokens

Manage your personal Vercel authentication tokens: list, create, and revoke API tokens.

vercel tokens ls
vercel tokens add "CI deploy"
vercel tokens rm tok_abc123

Learn more about the tokens command

traces

Inspect request traces for your project.

vercel traces get [request-id]
vercel traces [request-id]
vercel traces get [request-id] --open --view=tree

Learn more about the traces command

upgrade

Upgrade the Vercel CLI to the latest version and manage automatic updates.

vercel upgrade
vercel upgrade --dry-run
vercel upgrade --enable-auto
vercel upgrade --format=json

Learn more about the upgrade command

usage

View billing usage and costs for your Vercel account.

vercel usage
vercel usage --from 2025-01-01 --to 2025-01-31
vercel usage --breakdown daily

Learn more about the usage command

webhooks

Manage webhooks for your account. This command is in beta.

vercel webhooks list
vercel webhooks get <id>
vercel webhooks create <url> --event <event>
vercel webhooks rm <id>

Learn more about the webhooks command

whoami

Display the username of the currently logged in user.

vercel whoami

Learn more about the whoami command


View full sitemap

Powered by Forestry.md