Vercel CLI Global Options
Global options are commonly available to use with multiple Vercel CLI commands.
The --cwd option can be used to provide a working directory (that can be different from the current directory) when running Vercel CLI commands.
This option can be a relative or absolute path.
vercel --cwd ~/path-to/projectUsing the vercel command with the
--cwd option.
The --debug option, shorthand -d, can be used to provide a more verbose output when running Vercel CLI commands.
vercel --debugUsing the vercel command with the
--debug option.
The --global-config option, shorthand -Q, can be used to set the path to the global configuration directory.
vercel --global-config /path-to/global-config-directoryUsing the vercel command with the
--global-config option.
The --help option, shorthand -h, can be used to display more information about Vercel CLI commands.
vercel --helpUsing the vercel command with the
--help option.
vercel alias --helpUsing the vercel alias command with the
--help option.
The --local-config option, shorthand -A, can be used to set the path to a local vercel.json file.
vercel --local-config /path-to/vercel.jsonUsing the vercel command with the
--local-config option.
The --scope option, shorthand -S, can be used to execute Vercel CLI commands from a scope that’s not currently active.
vercel --scope my-team-slugUsing the vercel command with the
--scope option.
You can specify which Vercel Project to use for a CLI command in three ways:
--projectflag: Pass a project name or ID directly to the commandVERCEL_PROJECT_IDenvironment variable: Set the project ID as an environment variable- Project linking: Use the
.verceldirectory created byvercel link
If you provide multiple options, the CLI uses this precedence order (highest to lowest):
--projectflagVERCEL_PROJECT_IDenvironment variable.vercel/project.jsonfrom project linking
# Using the --project flag with a project name
vercel deploy --project my-project
# Using the --project flag with a project ID
vercel deploy --project prj_abc123
# Using the environment variable
VERCEL_PROJECT_ID=prj_abc123 vercel deployDifferent ways to specify the project for a Vercel CLI command.
The --project flag and VERCEL_PROJECT_ID both accept a project name or project ID. When using CI/CD pipelines or non-interactive environments, set VERCEL_ORG_ID and VERCEL_PROJECT_ID as environment variables to skip project linking. See using Vercel CLI for custom workflows for more details.
You can authenticate Vercel CLI commands with an authorization token in two ways:
--tokenflag (shorthand-t): Pass the token directly to the commandVERCEL_TOKENenvironment variable: Set the token as an environment variable
If both are provided, the --token flag takes precedence over the environment variable.
Using the VERCEL_TOKEN environment variable is recommended for CI/CD pipelines because it avoids exposing the token in command-line arguments, which can be visible in process lists and logs.
vercel --token vcp_7ceTtedqEf96eTe7Mw32n9gjfSo23kHBHAbTrchMINrvUMZv0EXAMPLEUsing the vercel command with the
--token option.
export VERCEL_TOKEN=vcp_7ceTtedqEf96eTe7Mw32n9gjfSo23kHBHAbTrchMINrvUMZv0EXAMPLE
vercel deployUsing the VERCEL_TOKEN environment variable to authenticate.
The --no-color option, or NO_COLOR=1 environment variable, can be used to execute Vercel CLI commands with no color or emoji output. This respects the NO_COLOR standard.
vercel login --no-colorUsing the vercel command with the
--no-color option.
The --team option, shorthand -T, can be used to specify a team slug or ID for the command. This is useful when you need to run a command against a specific team without switching scope.
vercel list --team my-team-slugUsing the vercel command with the
--team option.
vercel deploy -T team_abc123defUsing the vercel command with the
-T shorthand to specify a team by ID.
The --version option, shorthand -v, outputs the current version number of Vercel CLI.
vercel --versionUsing the vercel command with the
--version option to display the CLI version.
Was this helpful?