For details on how to use Vercel CLI, check out our documentation.
To manage schedules in a running development session, see local schedules.
For how vercel picks the runtime for each platform, see launcher.
Telemetry
Vercel CLI collects telemetry about how the CLI is used. We use it to find bugs and decide what to work on next.
The CLI records:
The command and subcommand you ran, and the names of the options and flags you passed. The values you pass are left out or replaced with [REDACTED], except for a few fixed choices such as the target environment.
Whether the command succeeded, how long it took, and, if it failed, the error code and the error message returned by the Vercel API.
Your team and user IDs when you're logged in, and the IDs of the projects and deployments the command works with.
A random device ID that is created on the first run and stored in the CLI's global config folder. It is sent on every run, including before you log in.
Your CLI version, operating system, CPU architecture, CI provider, how the CLI was installed, and the name of the AI agent that ran the command, if any. The agent name can include its version.
To turn telemetry off, run:
vercel telemetry disable
You can also set the VERCEL_TELEMETRY_DISABLED=1 environment variable. To check whether telemetry is on, run vercel telemetry status.
At this point you can make modifications to the CLI source code and test them out locally. The CLI source code is located in the internals/cli-core directory. This package (packages/cli) only holds the vercel launcher, which runs the native binary or the JS CLI from @vercel/cli-support, both built from that source.
From within the internals/cli-core directory, you can use the "vercel" script to quickly execute Vercel CLI from its TypeScript source code directly (without having to manually compile first). For example:
When you are satisfied with your changes, make a commit and create a pull request!
Publishing
Production Releases
Production releases are automated via the release.yml workflow, which runs on every push to main. It uses changesets to determine which packages need new versions. If there are pending changesets, the workflow either creates a "Version Packages" PR or publishes to npm with the latest dist-tag.
To include your changes in a release, add a changeset before merging your PR:
pnpm changeset
Full Testing
pnpm vercel executes a locally built dist. Because this dist lives locally in this monorepo,
the existence of node_modules can sometimes affect the behavior of how vercel CLI picking
up dependencies. To test the full user experience of downloading the CLI from the npm registry:
# build the distmonorepo_dir=$(pwd)turbo build --filter=vercel# use pnpm pack to create the same tarballs that are uploaded to the npm# registry: vercel and the JS CLI it depends oncli_support=$(cd packages/cli-support && pnpm pack)dist=$(cd packages/cli && pnpm pack)# In your test projectcd ~/dev/test-nextjs-projnpm install --no-save \ $monorepo_dir/packages/cli-support/$cli_support \ $monorepo_dir/packages/cli/$dist# The vercel bin always runs the published native binary for its version, so# run the JS CLI from @vercel/cli-support directly to test your local changes.node node_modules/@vercel/cli-support/dist/vc.js