If you want to use a custom workflow that is not catered to by the Vercel Git Integrations, you may wish to use Vercel CLI to do so. This article covers some of the common use cases and tips on how to use the CLI successfully.

Using the CLI Without Project Linking

For multiple environments beyond the provided Production, Preview, and Development, or to map a single repository to multiple projects, skipping the project linking step may be required. You can do so by using the following command:

VERCEL_ORG_ID=<value> VERCEL_PROJECT_ID=<value> vercel

Using VERCEL_ORG_ID and VERCEL_PROJECT_ID system environment variables.

Below is an example of a production deployment to a given team with a custom vercel.json path:

VERCEL_ORG_ID=<value> VERCEL_PROJECT_ID=<value> vercel --prod --scope <value> -A production.vercel.json

Advanced usage of the Vercel CLI with multiple flags.

In the examples above, the following attributes are used:

  1. VERCEL_ORG_ID: Can be found either by querying the Vercel API or by inspecting the .vercel folder of a linked project.

  2. VERCEL_PROJECT_ID: Can be found either by querying the Vercel API or by inspecting the .vercel folder of a linked project.

  3. --scope <value>: Your username or team slug.


Last Edited on July 4th 2020