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.
To download and install Vercel CLI, run the following command:
pnpm i -g vercelWhen 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.
pnpm i -g vercel@latestIf you see permission errors, please read npm's official guide. Yarn depends on the same configuration as npm.
The --version option can be used to verify the version of Vercel CLI currently being used.
vercel --versionvercel command with the --version option.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 use the --token option to authenticate.
Apply custom domain aliases to your Vercel deployments.
vercel alias set [deployment-url] [custom-domain]
vercel alias rm [custom-domain]
vercel alias lsLearn more about the alias command
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
Interact with Vercel Blob storage to upload, list, delete, and copy files.
vercel blob list
vercel blob put [path-to-file]
vercel blob del [url-or-pathname]
vercel blob copy [from-url] [to-pathname]Learn more about the blob command
Build a Vercel Project locally or in your own CI environment.
vercel build
vercel build --prodLearn more about the build command
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 fooLearn more about the cache command
Manage certificates for your domains.
vercel certs ls
vercel certs issue [domain]
vercel certs rm [certificate-id]Learn more about the certs command
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 your Vercel projects. Default command when no subcommand is specified.
vercel
vercel deploy
vercel deploy --prodLearn more about the deploy command
Replicate the Vercel deployment environment locally and test your project.
vercel dev
vercel dev --port 3000Learn more about the dev command
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
Buy, sell, transfer, and manage your domains.
vercel domains ls
vercel domains add [domain] [project]
vercel domains rm [domain]
vercel domains buy [domain]Learn more about the domains command
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
Manage your Git provider connections.
vercel git ls
vercel git connect
vercel git disconnect [provider]Learn more about the git command
Enable or disable guidance messages shown after CLI commands.
vercel guidance enable
vercel guidance disable
vercel guidance statusLearn more about the guidance command
Get information about all available Vercel CLI commands.
vercel help
vercel help [command]Learn more about the help command
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
Initialize example Vercel Projects locally from the examples repository.
vercel init
vercel init [project-name]Learn more about the init command
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] --waitLearn more about the inspect command
Install native integrations with the option of adding a product.
vercel install [integration-name]Learn more about the install command
Perform key integration tasks (add, open, list, remove).
vercel integration add [integration-name]
vercel integration open [integration-name]
vercel integration list
vercel integration remove [integration-name]Learn more about the integration command
Perform native integration product resource tasks (remove, disconnect, create thresholds).
vercel integration-resource remove [resource-name]
vercel integration-resource disconnect [resource-name]Learn more about the integration-resource command
Link a local directory to a Vercel Project.
vercel link
vercel link [path-to-directory]Learn more about the link command
List recent deployments for the current Vercel Project.
vercel list
vercel list [project-name]Learn more about the list command
Login to your Vercel account through CLI.
vercel login
vercel login [email]
vercel login --githubLearn more about the login command
Logout from your Vercel account through CLI.
vercel logoutLearn more about the logout command
List runtime logs for a specific deployment.
vercel logs [deployment-url]
vercel logs [deployment-url] --followLearn more about the logs command
Set up MCP client configuration for your Vercel Project.
vercel mcp
vercel mcp --projectLearn more about the mcp command
Work with microfrontends configuration.
vercel microfrontends pull
vercel microfrontends pull --dpl [deployment-id-or-url]Learn more about the microfrontends command
Open your current project in the Vercel Dashboard.
vercel openLearn more about the open command
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 an existing deployment to be the current deployment.
vercel promote [deployment-id-or-url]
vercel promote status [project]Learn more about the promote command
Update your local project with remote environment variables and project settings.
vercel pull
vercel pull --environment=productionLearn more about the pull command
Rebuild and redeploy an existing deployment.
vercel redeploy [deployment-id-or-url]Learn more about the redeploy command
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 deployments either by ID or for a specific Vercel Project.
vercel remove [deployment-url]
vercel remove [project-name]Learn more about the remove command
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
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
Switch between different team scopes.
vercel switch
vercel switch [team-name]Learn more about the switch command
List, add, remove, and manage your teams.
vercel teams list
vercel teams add
vercel teams invite [email]Learn more about the teams command
Manage custom environments (targets) and use the --target flag on relevant commands.
vercel target list
vercel target ls
vercel deploy --target=stagingLearn more about the target command
Enable or disable telemetry collection.
vercel telemetry status
vercel telemetry enable
vercel telemetry disableLearn more about the telemetry command
Display the username of the currently logged in user.
vercel whoamiWas this helpful?