vercel
Deploy and manage web applications on Vercel
TLDR
Deploy the current directory
Deploy the current directory to production
Deploy a directory
Initialize an example project
Deploy with environment variables
Build with environment variables
Set default regions to enable the deployment on
Remove a deployment
SYNOPSIS
vercel [options] [path]
vercel [options] command [args]
Examples:
vercel
vercel dev
vercel deploy ./my-app --prod
vercel login
vercel env add production MY_VAR "my value"
vercel --help
PARAMETERS
--prod
Deploy to the production environment, creating a production-ready URL for your project.
--scope <teamId | teamSlug>
Set the scope to a specific Team ID or Slug for the command execution, overriding the default.
--token <token>
Specify a Vercel API token for authentication, useful for CI/CD environments.
--help, -h
Display help information for the current command or a specified subcommand.
--version, -v
Output the current version of the Vercel CLI installed.
--debug
Enable debug mode to show verbose output and detailed logs for troubleshooting.
--local-config <path>
Specify a path to a custom vercel.json file for project-specific configuration.
--global-config <path>
Specify a path to a custom global Vercel CLI configuration file.
DESCRIPTION
The vercel command-line interface (CLI) is the primary tool for interacting with the Vercel platform, a leading cloud platform for frontend developers. It enables rapid deployment of web projects, including static sites, Next.js applications, and serverless functions, to a global edge network. Users can deploy new versions of their applications instantly by simply running vercel from their project directory.
Beyond deployment, the CLI facilitates various management tasks such as linking projects, managing domains, viewing deployment logs, setting environment variables, and configuring project settings. A key feature is vercel dev, which provides a local development server that accurately mimics the Vercel production environment, ensuring consistency between local development and cloud deployment. The command streamlines the entire development workflow, from local testing to global deployment, leveraging Vercel's automatic scaling, SSL, and CDN capabilities for high performance and reliability with minimal configuration. It integrates seamlessly with popular Git providers, automating deployments on every push.
CAVEATS
The vercel command requires an active Vercel account and stable internet connectivity for most operations, especially deployments. Authentication is primarily managed via vercel login, which typically involves an email verification process.
Users should be aware that project behavior can be heavily influenced by platform-specific configurations defined in a vercel.json file or derived from detected project frameworks. Certain commands or frequent deployments might be subject to Vercel's platform limits, depending on the user's account plan. It is primarily designed for projects intended to be hosted on the Vercel platform and is not a general-purpose deployment tool for arbitrary servers.
AUTOMATIC GIT INTEGRATION
Vercel automatically integrates with Git repositories (GitHub, GitLab, Bitbucket) to enable continuous deployment. This means projects are automatically built and deployed to a preview URL on every push to a specified branch, and to production when pushing to the main branch.
PROJECT LINKING
The vercel link command is crucial for associating a local directory with an existing Vercel project on the cloud. This ensures that subsequent vercel commands (like vercel deploy or vercel env) operate on the correct cloud project, maintaining consistency between your local development and the deployed application.
LOCAL DEVELOPMENT (VERCEL DEV)
The vercel dev subcommand starts a local development server that accurately emulates the Vercel production environment. This includes correct routing, local invocation of serverless functions, and handling of environment variables, ensuring that your application behaves consistently during local development and after deployment.
HISTORY
The Vercel platform, along with its CLI, was founded by Guillermo Rauch as Zeit in 2016. Initially gaining prominence for its focus on instant static deployments and serverless functions, the company rebranded to Vercel in 2020, emphasizing its role as 'The Frontend Cloud.'
Throughout its history, the vercel CLI has been central to the platform's user experience, evolving to support new features like vercel dev for local development, deeper integration with Git providers, and advanced project configurations. Its development has consistently aimed at simplifying the deployment and management of modern web applications, particularly those built with frameworks like Next.js, for which Vercel serves as the primary maintainer.