CLI gives you multiple ways to interact with and configure your projects. With the command-line interface (CLI) you can interact with the 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.
This page contains a complete list of all CLI commands available, alongside their optional parameters for additional behavior, as well as a complete list of configuration options to configure your project through cli.json
.
If you'd like to interface with the platform programmatically, check out the REST API documentation.
To download and install CLI, run the following command:
npm i -g docscli
Note: You can also install CLI inside a project (instead of globally)
All commands and options are listed in the following categories:
Category | Description |
---|---|
Commands | A list of commands from Vercel CLI. |
Options | Additional options for Vercel CLI commands. |
The cli
command is used to deploy projects and can be used from either the root of the project directory or by providing a path to it.
Using the cli
command from the root of a project directory.
Using the cli
command to deploy and write stdout to a text file. When deploying, stdout is always the Deployment URL.
When running cli
in a directory for the first time, CLI needs to know which scope and Project you want to deploy your directory to. You can choose to either link an existing project or to create a new one.
Linking an existing project when running Vercel CLI in a new directory.
Once set up, a new .cli
directory will be added to your directory. The .cli
directory contains both the organization and project id
of your project. If you want unlink your directory, you can remove the .cli
directory.
You can use the --confirm
to skip these questions.
When you create a new project, CLI will automatically detect the framework you are using and offer default project settings accordingly.
Creating a new project with the cli
command.
When creating a new project, you will be provided with default Build Command, Output Directory, and Development Command options.
You can continue with the default project settings or overwrite them. You can also edit your project settings later in your project dashboard.
Global options are commonly available to use with multiple CLI commands.
The --cwd
option can be used to provide a working directory (that can be different from the current directory) when running CLI commands.
This option can be a relative or absolute path.
docscli --cwd ~/path-to/project
Using the cli
command with the --cwd
option.
The --debug
option, shorthand -d
, can be used to provide a more verbose output when running CLI commands.