
Vercel
- 2 installs
- 2 repo stars
- Updated August 3, 2026
- fandhe-ai/agent-reference-skills
Reference the Vercel CLI commands and options, including activity events with filtering by type, date range, and project.
About
A structured reference for the Vercel CLI covering commands and their options, such as vercel activity for viewing filtered project and team events. A developer loads it when scripting or automating Vercel deployments.
- vercel activity ls with --type, --since, --until filters
- Per-command signature, usage, and options tables
Vercel by the numbers
- 2 all-time installs (skills.sh)
- Ranked #1,291 of 1,879 Documentation skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/fandhe-ai/agent-reference-skills --skill vercelAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2 |
|---|---|
| repo stars | ★ 2 |
| Last updated | August 3, 2026 |
| Repository | fandhe-ai/agent-reference-skills ↗ |
What it does
Reference the Vercel CLI commands and options, including activity events with filtering by type, date range, and project.
Files
vercel activity
View activity events for a linked project or team, with filtering by type, date range, and project.
Signature / Usage
vercel activity
vercel activity ls --all --since 30d
vercel activity ls --type deployment --since 7d
vercel activity typesOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--type | Filter by event type (repeatable or comma-separated). Run vercel activity types to list all types | |
--since | Show events after a date: ISO 8601 or relative (1d, 7d, 30d) | |
--until | Show events before a date; same formats as --since | |
--project | -p | Filter by project name or ID; overrides auto-detected linked project |
--all | -a | Show all team events; cannot be combined with --project |
--limit | Max events to return (default: 20, max: 100) | |
--next | Pagination cursor from previous page's output | |
--format | Output format; json emits structured JSON |
Notes
--alland--projectare mutually exclusive- Pagination:
--nextaccepts the timestamp value printed after each page
Related
- logs.md
vercel agent
Generate or update a section about Vercel deployment best practices in the project's agent guidance file (AGENTS.md or CLAUDE.md).
Signature / Usage
vercel agent init
vercel agent init --yesOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--yes | -y | Skip the confirmation prompt; required in non-interactive shells |
Notes
- Target file is
AGENTS.mdby default;CLAUDE.mdwhen run from Claude Code - Wrapped in
<!-- VERCEL BEST PRACTICES START -->/<!-- VERCEL BEST PRACTICES END -->markers - Safe to re-run: updates only the marked section; existing content is preserved
- Creates the file if it doesn't exist; appends if markers are absent
vercel alerts
List recent alerts for a linked project, a specific project, or an entire team. Supports AI investigation summaries and alert rule management.
Signature / Usage
vercel alerts
vercel alerts --all
vercel alerts --type usage_anomaly --since 2026-03-01T00:00:00.000Z
vercel alerts inspect <groupId>
vercel alerts rules ls
vercel alerts rules add --body ./rule.jsonOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--project | -p | Filter by project name or ID; overrides linked project |
--all | -a | Show team-wide alerts; cannot combine with --project |
--type | Filter by alert type (repeatable or comma-separated: usage_anomaly, error_anomaly) | |
--ai | Print AI investigation summaries instead of table output | |
--since | Start of time range (ISO 8601). Default: last 24 hours | |
--until | End of time range (ISO 8601); --since must be earlier | |
--limit | Max alert groups to return (1–100) | |
--format | json for structured output |
Notes
- Default scope: linked project from the last 24 hours
--allrequires team context
Related
- activity.md
vercel alias
Apply custom domain aliases to Vercel deployments.
Signature / Usage
vercel alias set [deployment-url] [custom-domain]
vercel alias rm [custom-domain]
vercel alias ls
vercel alias ls --limit 100Options / Props
| Name | Shorthand | Description |
|---|---|---|
--yes | Skip confirmation prompt when removing an alias | |
--limit | Max aliases returned by ls (default: 20, max: 100) |
Notes
- Do NOT include
https://in the[custom-domain]argument - For production promotion, prefer
vercel promoteorvercel rollbackinstead - Use
vercel --prod --skip-domainto create a staged production deployment without domain assignment
Related
- deploy.md
- promote.md
- rollback.md
- domains.md
vercel api
Make authenticated HTTP requests to the Vercel API from the terminal. Beta command.
Signature / Usage
vercel api /v2/user
vercel api /v9/projects -X POST -F name=my-project
vercel api /v6/deployments --paginate
vercel api # interactive endpoint discovery
vercel api ls # list all available endpointsOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--method | -X | HTTP method (default: GET, or POST if body provided) |
--field | -F | Typed request body field as KEY=VALUE; parsed as number/bool/string; use @file for file content (repeatable) |
--raw-field | -f | String field without type parsing (repeatable) |
--header | -H | Custom HTTP header (repeatable) |
--input | Read request body from file; use - for stdin | |
--paginate | Fetch all pages and combine into single output | |
--include | -i | Include response headers in output |
--silent | Suppress response output; exit code indicates success | |
--verbose | Show full request/response debug info | |
--raw | Output JSON without pretty-printing | |
--refresh | Refresh cached OpenAPI spec used for interactive mode | |
--generate | Output request in another format instead of executing; supports curl | |
--dangerously-skip-permissions | Skip confirmation for DELETE operations |
Notes
- Running without an endpoint enters interactive mode with OpenAPI-based discovery
vercel api lslists all available API endpoints- Authentication uses the current CLI session automatically
Related
- global-options.md
- curl.md
vercel bisect
Binary search through deployments to find when a bug was introduced, similar to git bisect but without rebuilding each commit.
Signature / Usage
vercel bisect
vercel bisect --good https://example.com --bad https://example-s93n1nfa.vercel.app
vercel bisect --path /blog/first-post --open
vercel bisect --run ./test.shOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--good | -g | Known good deployment URL or alias; skips the prompt |
--bad | -b | Known bad deployment URL or alias; skips the prompt |
--path | -p | Subpath appended to each deployment URL during bisect |
--open | -o | Auto-open each deployment URL in the browser |
--run | -r | Shell script to automate bisect; exit 0=good, non-0=bad, 125=skip |
Notes
- Good and bad deployments must be production deployments
- If an alias URL is used, it resolves to the current alias target at the time of bisect
- Manual steps: at each deployment prompt, mark it good or bad
Related
- deploy.md
- inspect.md
vercel blob
Interact with Vercel Blob storage: upload, download, list, delete, copy files, and manage stores.
Signature / Usage
vercel blob list
vercel blob put image.jpg --access public
vercel blob get https://... --output ./local.jpg
vercel blob del https://...
vercel blob copy [from-url] [to-pathname] --access public
vercel blob create-store my-store --access public
vercel blob list-storesOptions / Props
| Name | Description |
|---|---|
--rw-token | Blob read-write token (also read from BLOB_READ_WRITE_TOKEN env) |
--access | Required for put, copy, get, create-store: public or private |
--limit | Max results per page for list (default: 10, max: 1000) |
--cursor | Pagination cursor for list |
--prefix | Filter blobs by pathname prefix for list |
--mode | List mode: expanded (default) or folded |
--pathname | Destination pathname for put (default: filename) |
--content-type | Override inferred content-type for put / copy |
--cache-control-max-age | max-age in seconds for put / copy (default: 2592000 = 30 days) |
--add-random-suffix | Add random suffix to filename on put / copy |
--allow-overwrite | Overwrite existing blob on put (default: false) |
--multipart | Upload in chunks for put (default: true) |
--output | Save get content to file instead of stdout |
--if-match | ETag conditional for put, del, copy |
--if-none-match | ETag conditional for get; returns 304 if unchanged |
--region | Storage region for create-store (default: iad1) |
--yes | Skip confirmation for delete-store, empty-store |
--environment | Environments to connect for create-store (repeatable) |
--all | List all team stores regardless of project for list-stores |
Notes
- Subcommands:
list/ls,put,del,copy/cp,get,create-store,delete-store,get-store,list-stores/ls-stores,empty-store
Related
- env.md
vercel build
Build a Vercel Project locally or in a CI environment. Output is placed in .vercel/output (Build Output API v3 format).
Signature / Usage
vercel build
vercel build --prod
vercel build --target=staging
vercel build --output ./custom-outputOptions / Props
| Name | Description |
|---|---|
--prod | Build using Production environment variables (default: Preview) |
--yes | Skip confirmation; auto-pull env vars and project settings if not found locally |
--target | Target environment: production, preview, or a custom environment name |
--output | Custom output directory (default: .vercel/output) |
Notes
- Run
vercel pullfirst to ensure local env vars and project settings are up to date - Use with
vercel deploy --prebuiltto deploy without sharing source code with Vercel - System environment variables are not available at build time with
--prebuilt; avoid using it if your framework relies on them
Related
- deploy.md
- pull.md
vercel buy
Purchase Vercel products (credits, addons, subscriptions, domains) from the CLI.
Signature / Usage
vercel buy credits v0 100
vercel buy credits gateway 250
vercel buy addon siem 1
vercel buy pro
vercel buy domain example.comOptions / Props
| Name | Description |
|---|---|
--yes | Skip confirmation prompt; required in non-interactive environments |
--json | Return purchase result as JSON |
Notes
- All subcommands except
domainrequire team scope; use--scopeif needed - Subcommands:
credits [v0|gateway|agent] <amount>,addon <name> <quantity>,pro,v0,domain <domain> creditsmax $1,000 per purchaseaddonrequires Flex plan; current supported addon:siemdomaindelegates tovercel domains buy
Related
- domains.md
vercel cache
Manage CDN cache and Data cache for a project: purge, invalidate, or dangerously delete cached content.
Signature / Usage
vercel cache purge
vercel cache purge --type cdn
vercel cache invalidate --tag blog-posts
vercel cache dangerously-delete --tag blog-posts
vercel cache invalidate --srcimg /api/avatar/1Options / Props
| Name | Description |
|---|---|
--type | Cache type for purge: cdn or data (default: both) |
--tag | Cache tag(s) to invalidate or delete (comma-separated). Cannot combine with --srcimg |
--srcimg | Source image path; invalidates/deletes all cached transformations of that image |
--revalidation-deadline-seconds | For dangerously-delete: only delete if not accessed within N seconds |
--yes | Skip confirmation prompt |
Notes
purge: immediately removes CDN cache; subsequent requests serve MISSinvalidate: marks cached content as STALE; subsequent requests revalidate in backgrounddangerously-delete: immediately removes cached content; subsequent requests block while revalidating--tagand--srcimgare mutually exclusive
Related
- deploy.md
vercel certs
Manage SSL certificates for domains: list, issue, and remove. Vercel manages certificates automatically.
Signature / Usage
vercel certs ls
vercel certs issue foo.com bar.com
vercel certs issue foo.com --challenge-only
vercel certs rm [certificate-id]Options / Props
| Name | Description |
|---|---|
--challenge-only | Show only the DNS challenges needed to issue a certificate (useful for pre-generating SSL) |
--limit | Max certificates returned by ls (default: 20, max: 100) |
Notes
- Subcommands:
ls,issue [domain1 domain2 ...],rm [certificate-id] - Vercel auto-manages certificates; manual issuance is rarely needed
Related
- domains.md
vercel contract
View contract commitment information for your Vercel account: contract periods, commitment types, and values.
Signature / Usage
vercel contract
vercel contract --format jsonOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--format | -F | Output format; json returns structured data with context, commitments, and totalCount |
Notes
- Output table shows: Contract ID, Contract Period, Commitment Type, Category, Period, Commitment, Description
- Category is either "Spend" (Pro plans) or "Usage" (Enterprise plans)
vercel curl
Make HTTP requests to Vercel deployments with automatic deployment protection bypass. Beta command.
Signature / Usage
vercel curl /api/hello
vercel curl /api/users -- --request POST --header "Content-Type: application/json" --data '{"name":"John"}'
vercel curl /api/status --deployment https://my-app-abc123.vercel.app
vercel curl --trace /api/helloOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--deployment | Specific deployment ID or URL to target (default: production deployment) | |
--protection-bypass | Manual bypass secret; alternatively set VERCEL_AUTOMATION_BYPASS_SECRET env var | |
--yes | -y | Skip link confirmation prompt in non-interactive environments |
--trace | Capture a request trace and print trace request ID | |
--json | With --trace: emit JSON envelope {response, requestId} instead of streaming |
Notes
- Requires
curlto be installed on the system - Place
--before passing flags to the underlyingcurlcommand - Available in Vercel CLI v48.8.0+
- Automatically adds
x-vercel-protection-bypassheader
Related
- httpstat.md
- traces.md
- api.md
vercel deploy
Deploy a Vercel project. Default command when no subcommand is specified.
Signature / Usage
vercel
vercel deploy
vercel deploy --prod
vercel deploy --prebuilt --archive=tgz
vercel deploy --target=stagingOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--prebuilt | Upload results from vercel build in .vercel/output; skips Vercel cloud build | |
--build-env | -b | Build-time environment variable as KEY=value (repeatable) |
--yes | Skip new-project setup questions; use defaults | |
--env | -e | Runtime environment variable as KEY=value (repeatable) |
--name | -n | Project name (deprecated; prefer project linking) |
--prod | Deploy to the production domain | |
--skip-domain | With --prod: skip custom domain assignment (use vercel promote later) | |
--public | Make source code publicly available at /_src | |
--regions | Comma-separated region IDs for Vercel Functions | |
--no-wait | Exit immediately after requesting deployment, without waiting | |
--force | -f | Force new deployment ignoring build cache |
--with-cache | Retain build cache when using --force | |
--archive | Compress deployment before upload; value: tgz | |
--logs | -l | Print build logs during deployment |
--meta | -m | Metadata key-value as KEY=value (repeatable); filterable via vercel list --meta |
--target | Target environment: production, preview, or custom environment name | |
--guidance | Show suggested next steps after deployment completes |
Notes
stdoutis always the deployment URL; suitable for pipingstderrcarries error messages; check exit code in CI scripts- When using
--prebuilt, System Environment Variables are absent at build time
Related
- build.md
- promote.md
- rollback.md
- alias.md
- list.md
vercel dev
Replicate the Vercel deployment environment locally to test Functions and Middleware without deploying.
Signature / Usage
vercel dev
vercel dev --listen 5005Options / Props
| Name | Shorthand | Description |
|---|---|---|
--listen | -l | Port to run on (default: 3000) |
--yes | Skip new-project setup questions; use defaults |
Notes
- Run
npm installbefore usingvercel dev - If your framework's dev command (e.g.
next dev) already supports all needed features, prefer that oververcel dev - The Development Command configured in Project Settings affects
vercel devbehavior for the whole team
Related
- pull.md
- build.md
- env.md
vercel dns
Manage DNS records for domains: list, add, remove, and import zone files.
Signature / Usage
vercel dns ls [domain]
vercel dns add [domain] [subdomain] [A|AAAA|ALIAS|CNAME|TXT] [value]
vercel dns add [domain] '@' MX [record-value] [priority]
vercel dns add [domain] [name] SRV [priority] [weight] [port] [target]
vercel dns add [domain] [name] CAA '[flags] [tag] "[value]"'
vercel dns rm [record-id]
vercel dns import [domain] [path-to-zonefile]Options / Props
| Name | Description |
|---|---|
--limit | Max DNS records returned by ls (default: 20, max: 100) |
Notes
- New DNS records may take up to 24 hours to propagate
- Subcommands:
ls [domain],add,rm [record-id],import [domain] [zonefile]
Related
- domains.md
- certs.md
vercel domains
Buy, transfer, and manage domains under the current scope.
Signature / Usage
vercel domains ls
vercel domains inspect [domain]
vercel domains add [domain] [project]
vercel domains rm [domain]
vercel domains buy [domain]
vercel domains price [domain] [...domain]
vercel domains check [domain] [...domain]
vercel domains move [domain] [scope-name]
vercel domains transfer-in [domain]Options / Props
| Name | Description |
|---|---|
--yes | Skip confirmation when removing a domain |
--limit | Max domains returned by ls (default: 20, max: 100) |
--next | Pagination cursor (ms timestamp from previous response) |
--force | Force-add a domain to a project, removing it from an existing project |
Notes
- Subcommands:
ls,inspect,add,rm,buy,price,check,move,transfer-in - Project dashboard provides more options and control than CLI
Related
- dns.md
- certs.md
- alias.md
vercel env
Manage environment variables in Vercel Projects: list, add, update, remove, pull to file, and run commands with env vars.
Signature / Usage
vercel env ls [environment] [gitbranch]
vercel env add [name] [environment] [gitbranch]
vercel env update [name] [environment]
vercel env rm [name] [environment]
vercel env pull [file]
vercel env pull --environment=preview --git-branch=feature-branch
vercel env run -- next dev
vercel env run -e production -- next buildOptions / Props
| Name | Description |
|---|---|
--sensitive | Mark env var as sensitive (encrypted at rest, not viewable; default for production/preview) |
--no-sensitive | Opt out of sensitive storage for production/preview vars |
--force | Overwrite existing env var without prompting |
--yes | Skip confirmation for pull overwrite, rm, and update |
--environment / -e | (for run) Environment to pull from: development, preview, production (default: development) |
--git-branch | (for run) Git branch for branch-specific env vars |
Notes
- Sensitive env vars (default for production/preview) are not viewable after creation; development env vars cannot be sensitive
vercel env pullexports to a file (default:.env.local);vercel env runinjects without writing to disk- For
vercel build/vercel dev, usevercel pullinstead - Team policy "Enforce Sensitive Environment Variables" overrides
--no-sensitive - The
--separator is required forvercel env run -- <command>
Related
- pull.md
- dev.md
- build.md
vercel firewall
Manage Vercel Firewall: custom rules, IP blocks, system bypass, attack mode, and system mitigations. Custom rule and IP block changes are staged until published.
Signature / Usage
vercel firewall overview
vercel firewall rules list
vercel firewall rules add "Block bots" \
--condition '{"type":"user_agent","op":"sub","value":"crawler"}' \
--action deny --yes
vercel firewall rules edit "My Rule" --action challenge --duration 5m --yes
vercel firewall ip-blocks block 1.2.3.4 --yes
vercel firewall attack-mode enable --duration 24h --yes
vercel firewall diff
vercel firewall publish --yesOptions / Props
rules add / rules edit
| Name | Description |
|---|---|
--ai <PROMPT> | Generate/modify rule from natural language (interactive TTY only) |
--json <PAYLOAD> | Create/replace rule from full JSON payload |
--condition <JSON> | Add condition as JSON {type, op, value, key?, neg?} (repeatable) |
--or | Start a new OR group between --condition flags |
--action <TYPE> | Action: deny, challenge, log, bypass, rate_limit, redirect |
--duration | Action persistence duration: 1m, 5m, 15m, 30m, 1h |
--description | Rule description (max 256 chars) |
--disabled | Create/set rule in disabled state |
--enabled | Enable rule (edit only; mutually exclusive with --disabled) |
--rate-limit-window | Rate limit time window in seconds (10–3600) |
--rate-limit-requests | Max requests per window (1–10,000,000) |
--rate-limit-keys | Count by: ip (default), ja4, header:<name> (repeatable) |
--rate-limit-algo | Algorithm: fixed_window (default), token_bucket |
--rate-limit-action | Action when limit exceeded: rate_limit (default), deny, challenge, log |
--redirect-url | Redirect destination URL or path |
--redirect-permanent | Use 301 (default: 307) |
--name | Rename the rule (edit only) |
-y, --yes | Skip confirmation prompt |
ip-blocks block / unblock
| Name | Description |
|---|---|
--hostname | Scope block/unblock to a specific hostname |
--notes | Note attached to the IP block rule |
-y, --yes | Skip confirmation |
attack-mode enable
| Name | Description |
|---|---|
--duration | How long to keep attack mode active: 1h (default), 6h, 24h |
-y, --yes | Skip confirmation |
Notes
- Staging:
rules add/edit/removeandip-blocks block/unblockare staged; runvercel firewall publishto apply - Immediate:
system-bypass,attack-mode,system-mitigationstake effect without publishing vercel firewall diffreviews staged changes;vercel firewall discardcancels them- Condition
typevalues include:path,method,host,ip_address,user_agent,geo_country,header,cookie,query,ja4_digest, and more - Operator values:
eq,neq,sub,pre,suf,re,ex,nex,inc,ninc,gt,gte,lt,lte
Related
- project.md
vercel flags
Manage Vercel Flags (feature flags) for a project: create, list, inspect, update, set variants, split traffic, rollout, enable/disable, archive, delete, and manage SDK keys.
Signature / Usage
vercel flags list
vercel flags create my-feature --kind boolean
vercel flags create welcome-msg --kind string --variant control="Hello" --variant treatment="Hi"
vercel flags set my-feature --environment production --variant true
vercel flags split ai-model --environment production --by user.id --weight stable=95 --weight candidate=5
vercel flags rollout checkout --environment production --by user.id --stage 5,6h --stage 50,1d
vercel flags enable my-feature --environment production
vercel flags disable my-feature --environment production
vercel flags archive my-feature --yes
vercel flags rm my-feature --yes
vercel flags sdk-keys ls
vercel flags sdk-keys add --type server --environment production
vercel flags override my-flag=trueOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--state | -s | Filter list by state: active (default) or archived |
--kind | -k | Flag type for create: boolean (default), string, number, json |
--description | -d | Description for create |
--environment | -e | Target environment: production, preview, development |
--variant | -v | Variant definition (VALUE or VALUE=Label) for create; variant ID/value selector for update/set/disable (repeatable) |
--value | New variant value for update | |
--label | -l | Variant label for update; SDK key label for sdk-keys add |
--message | Revision message for update, set, split, rollout, enable, disable | |
--by | Entity attribute for bucketing in split/rollout (format: entity.attribute, e.g. user.id) | |
--weight | -w | Variant weight for split as VARIANT=WEIGHT (repeatable) |
--default-variant | Fallback variant when bucketing attribute is missing (split/rollout) | |
--from-variant | Starting variant for rollout | |
--to-variant | Target variant for rollout | |
--stage | -s | Rollout stage as PERCENTAGE,DURATION (repeatable, e.g. 5,6h) |
--start | Rollout start time: now, relative duration (1h), or ISO 8601 datetime | |
--type | SDK key type for sdk-keys add: server or client | |
--yes | -y | Skip confirmation for archive, rm, sdk-keys rm |
--expiration | Override token expiry for override (e.g. 30d); default: 1y | |
--decrypt | Decrypt an existing override token with override --decrypt <token> |
Notes
- Boolean flags always have
false/truevariants (labeled Off/On) - JSON flags accept any valid JSON value including objects, arrays, numbers, strings, null
- A flag must be archived before it can be deleted
FLAGS_SECRETenv var is required forvercel flags overridevercel flags preparewrites synthetic@vercel/flags-definitionspackage; typically run automatically by the build pipeline
Related
- env.md
- deploy.md
vercel git
Manage Git provider repository connections for a Vercel Project.
Signature / Usage
vercel git connect
vercel git connect --yes
vercel git disconnect
vercel git lsOptions / Props
| Name | Description |
|---|---|
--yes | Skip connect confirmation prompt |
Notes
- Searches for a local
.gitconfig file with at least one remote URL - Subcommands:
connect,disconnect [provider],ls
Related
- link.md
- deploy.md
Vercel CLI Global Options
Options available across all Vercel CLI commands.
Options / Props
| Name | Shorthand | Description |
|---|---|---|
--cwd | Set working directory (relative or absolute path) | |
--debug | -d | Verbose output |
--global-config | -Q | Path to global configuration directory |
--help | -h | Display help for a command |
--local-config | -A | Path to local vercel.json file |
--scope | -S | Execute from a non-active team scope (slug) |
--project | Project name or ID; overrides VERCEL_PROJECT_ID and .vercel/project.json | |
--token | -t | Auth token; overrides VERCEL_TOKEN env var |
--no-color | Disable color/emoji output (also: NO_COLOR=1) | |
--team | -T | Team slug or ID for the command |
--version | -v | Print CLI version |
--non-interactive | Skip all interactive prompts (default in agent environments) |
Notes
--projectprecedence:--projectflag >VERCEL_PROJECT_IDenv var >.vercel/project.json--tokenprecedence:--tokenflag >VERCEL_TOKENenv var- Use
VERCEL_TOKENin CI/CD to avoid exposing tokens in process lists
Related
- overview.md
vercel guidance
Enable or disable guidance messages shown after CLI commands.
Signature / Usage
vercel guidance enable
vercel guidance disable
vercel guidance statusNotes
- Guidance messages suggest recommended next steps after operations like deployment
- Also controllable per-command with
vercel deploy --guidance
Related
- deploy.md
vercel help
Display help information for Vercel CLI commands.
Signature / Usage
vercel help
vercel help [command]
vercel --help
vercel [command] --helpNotes
- Equivalent to the
--help/-hglobal option on any command - Shows available subcommands and options for the specified command
Related
- global-options.md
- overview.md
vercel httpstat
Visualize HTTP request timing statistics for Vercel deployments with automatic deployment protection bypass. Beta command.
Signature / Usage
vercel httpstat /api/hello
vercel httpstat /api/users -- -X POST -H "Content-Type: application/json" -d '{}'
vercel httpstat /api/status --deployment https://my-app-abc123.vercel.appOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--deployment | Specific deployment ID or URL (default: production deployment) | |
--protection-bypass | Manual bypass secret; alternatively set VERCEL_AUTOMATION_BYPASS_SECRET | |
--yes | -y | Skip link confirmation prompt |
Notes
- Requires
httpstatto be installed (pip install httpstatorbrew install httpstat) - Place
--before flags intended for the underlyinghttpstatcommand - Available in Vercel CLI v48.9.0+
- Output shows: DNS Lookup, TCP Connection, TLS Handshake, Server Processing, Content Transfer timings
Related
- curl.md
- traces.md
vercel init
Initialize a Vercel supported framework example locally from the official examples repository.
Signature / Usage
vercel init
vercel init [framework-name]
vercel init gatsby my-project-directory
vercel init gatsby my-project --forceOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--force | -f | Forcibly replace an existing local directory |
Notes
- Without arguments, shows an interactive list of supported frameworks
- Optional second argument renames the local directory
- Examples sourced from github.com/vercel/vercel/tree/main/examples
Related
- link.md
- deploy.md
vercel inspect
Retrieve information about a Vercel deployment by URL or ID.
Signature / Usage
vercel inspect [deployment-id-or-url]
vercel inspect https://example-app.vercel.app --logs
vercel inspect https://example-app.vercel.app --wait
vercel inspect https://example-app.vercel.app --logs --waitOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--timeout | Time to wait for deployment completion (default: 3m); accepts ms-compatible strings like 5m, 30s | |
--wait | Block until the specified deployment completes | |
--logs | -l | Print build logs instead of deployment info |
Notes
- If deployment is queued or canceled there are no logs to display
- Combine
--logs --waitto stream all build logs until deployment is ready
Related
- list.md
- logs.md
- deploy.md
vercel install
Alias for vercel integration add. Install a marketplace integration and provision a resource.
Signature / Usage
vercel install <integration-name>
vercel i neonNotes
- Fully interchangeable with
vercel integration add; same flags and behavior - Short alias:
vercel i
Related
- integration.md
vercel integration
Manage marketplace integrations: provision resources, discover integrations, manage installations, and control individual resources.
Signature / Usage
vercel integration add neon
vercel integration add acme/acme-redis --name my-db --plan pro
vercel integration list
vercel integration installations
vercel integration discover postgres
vercel integration guide neon --framework nextjs
vercel integration balance neon
vercel integration open neon my-database
vercel integration remove neon --yes
vercel integration resource connect my-database my-project
vercel integration resource disconnect my-database --all --yes
vercel integration resource remove my-database --disconnect-all --yes
vercel integration resource create-threshold my-database 50 100 2000 --yes
vercel integration resource claim my-stripe-sandboxOptions / Props
integration add
| Name | Shorthand | Description |
|---|---|---|
--name | -n | Custom resource name (auto-generated if omitted) |
--metadata | -m | Metadata as KEY=VALUE (repeatable) |
--plan | -p | Billing plan ID |
--environment | -e | Environments to connect: production, preview, development (repeatable, default: all three) |
--prefix | Prefix for env var names (include trailing _ if desired) | |
--format | -F | Output format; json for machine-readable |
--no-connect | Skip connecting to current project | |
--no-env-pull | Skip running vercel env pull after provisioning | |
--installation-id | Installation ID when multiple installations exist | |
--claim | Claim sandbox resource immediately after provisioning | |
--no-claim | Skip the claim offer for sandbox resources |
integration list
| Name | Shorthand | Description |
|---|---|---|
--integration | -i | Filter by integration slug |
--all | -a | List all team resources regardless of project |
--format | -F | Output format; json |
integration resource connect / disconnect
| Name | Shorthand | Description |
|---|---|---|
--environment | -e | Environments to connect (repeatable) |
--prefix | Env var name prefix | |
--all | -a | Disconnect from all projects (disconnect only) |
--yes | -y | Skip confirmation; required for --format json |
--format | -F | Output format; json |
integration resource remove
| Name | Shorthand | Description |
|---|---|---|
--disconnect-all | -a | Disconnect all projects before deletion |
--yes | -y | Skip confirmation |
--format | -F | Output format; json |
integration resource create-threshold
Arguments: <resource-name> <minimum> <spend> <limit> (all in USD; minimum <= spend <= limit)
integration resource claim
| Name | Description |
|---|---|
--yes | Skip single-resource confirmation prompt |
--no-wait | Print claim URL and exit without polling |
--format / -F | Output format; json |
Notes
vercel installandvercel iare aliases forvercel integration add- Multi-product integrations use slash syntax:
integration/product vercel integration-resource <subcommand>andvc ir <subcommand>are backward-compatible aliases- Removing an integration requires all resources to be removed first
- Sandbox resources show
[SANDBOX]tag invercel integration list
Related
- install.md
- env.md
- project.md
vercel link
Link a local directory to a Vercel Project. Stores metadata in .vercel/project.json.
Signature / Usage
vercel link
vercel link [path-to-directory]
vercel link --yes --project foo
vercel link --repoOptions / Props
| Name | Description |
|---|---|
--repo | Link all projects in the repository to their respective Vercel projects (requires Git integration) |
--yes | Skip setup questions; use defaults |
--project | Project name or ID to link; useful in non-interactive mode when project name differs from directory name |
Notes
VERCEL_PROJECT_IDenv var can be used instead of--project;--projecttakes precedence- Once linked, other CLI commands auto-detect the project from
.vercel/project.json
Related
- deploy.md
- pull.md
- dev.md
- global-options.md
vercel list
List recent deployments for the currently-linked Vercel Project. Alias: vercel ls.
Signature / Usage
vercel list
vercel list [project-name]
vercel list --status READY,BUILDING
vercel list --meta githubCommitSha=de8b89f
vercel list my-app --environment=stagingOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--meta | -m | Filter by deployment metadata KEY=value (repeatable) |
--policy | -p | Show expiration per deployment retention policy type=duration (repeatable) |
--yes | Skip new-project setup questions | |
--status | -s | Filter by status: BUILDING, ERROR, INITIALIZING, QUEUED, READY, CANCELED (comma-separated) |
--environment | Filter by environment: production, preview, or custom environment name | |
--next | Pagination cursor (ms timestamp from previous response) | |
--prod | Show only production deployments |
Notes
vercel lsis the short form ofvercel list- Metadata filtering useful for finding deployments by Git commit SHA
Related
- deploy.md
- inspect.md
- remove.md
vercel login
Authenticate with your Vercel account through the CLI.
Signature / Usage
vercel login
vercel login [email]
vercel login --githubNotes
- For CI/CD where manual input is not possible, use
VERCEL_TOKENenv var or--tokenglobal option instead --tokenflag takes precedence overVERCEL_TOKENif both are provided
Related
- logout.md
- whoami.md
- global-options.md
vercel logout
Log out of your Vercel account through the CLI.
Signature / Usage
vercel logoutRelated
- login.md
- whoami.md
vercel logs
Display request logs or stream live runtime logs for a Vercel project.
Signature / Usage
vercel logs
vercel logs --follow
vercel logs --level error --since 1h
vercel logs --environment production --status-code 500 --json
vercel logs --query "timeout" --json | jq '.message'Options / Props
| Name | Shorthand | Description |
|---|---|---|
--project | -p | Project name or ID (default: linked project) |
--deployment | -d | Filter by specific deployment ID or URL |
--follow | -f | Stream live runtime logs (streams for up to 5 minutes) |
--json | -j | Output in JSON Lines format |
--expand | -x | Show full log message instead of truncating |
--limit | -n | Max log entries to return (default: 100) |
--environment | Filter by environment: production or preview | |
--level | Filter by level: error, warning, info, fatal (repeatable) | |
--status-code | Filter by HTTP status code or wildcard: 500, 4xx, 5xx | |
--source | Filter by source: serverless, edge-function, edge-middleware, static (repeatable) | |
--query | -q | Full-text search across log messages |
--request-id | Filter by specific request ID | |
--since | Start time: ISO 8601 or relative (1h, 30m; default: 24h ago) | |
--until | End time: ISO 8601 or relative (default: now) | |
--branch | -b | Filter by git branch (auto-detected by default); use --no-branch to disable |
Notes
- Default shows request logs from the last 24 hours for the linked project and branch
--followfinds the latest deployment for the current git branch- Combine
--follow --deploymentto stream logs for a specific deployment
Related
- inspect.md
- traces.md
vercel mcp
Configure MCP clients (Claude Code, Cursor, VS Code with Copilot, Claude.ai) to use Vercel's hosted MCP endpoint at https://mcp.vercel.com.
Signature / Usage
vercel mcp
vercel mcp --clients "Cursor,VS Code with Copilot"
vercel mcp --projectOptions / Props
| Name | Description |
|---|---|
--clients | Comma-separated list of MCP clients to set up; required in non-interactive environments. Supported: Claude Code, Claude.ai and Claude for desktop, Cursor, VS Code with Copilot |
--project | Configure project-specific MCP access (https://mcp.vercel.com/<org>/<project>) for the linked project |
Notes
- Does not deploy any MCP server; only adjusts client-side configuration on your machine
- For Claude.ai and Claude for desktop, prints manual setup instructions
- For Claude Code, Cursor, VS Code with Copilot, configures the client directly
- Without
--clients, launches an interactive client picker
Related
- link.md
vercel metrics
Query observability metrics and inspect available metrics, dimensions, and aggregations. Requires Observability Plus.
Signature / Usage
vercel metrics vercel.request.count
vercel metrics vercel.request.count --group-by route --since 24h
vercel metrics vercel.request.route_cpu_duration_ms --aggregation p95 --group-by route
vercel metrics vercel.request.count --all --group-by project_id
vercel metrics schema
vercel metrics schema vercel.requestOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--aggregation | -a | Aggregation function (e.g. sum, p95); defaults to metric schema default |
--group-by | Dimension to group by (repeatable) | |
--filter | -f | OData filter expression (e.g. "route eq '/api/logs'") |
--since | Start of time range: relative (1h, 24h, 7d) or ISO timestamp (default: last hour) | |
--until | End of time range (default: now) | |
--granularity | -g | Time bucket size (e.g. 1h); CLI computes appropriate default |
--limit | Max grouped results per time bucket (default: 10) | |
--project | -p | Project name or ID (default: linked project) |
--all | Query across all team projects; cannot combine with --project | |
--format | json for structured output |
Notes
vercel metrics schemalists all available metricsvercel metrics schema <metric-or-prefix>shows valid aggregations and dimensions for a metric- Requires Metrics permission
Related
- logs.md
- traces.md
vercel microfrontends
Manage Vercel Microfrontends: create groups, add/remove projects, pull configuration for local development. Alias: vercel mf.
Signature / Usage
vercel microfrontends create-group --name="My Group" --project=web --default-app=web --yes
vercel mf add-to-group --group="My Group" --default-route=/docs
vercel mf remove-from-group
vercel mf delete-group --group="My Group"
vercel mf inspect-group --group="My Group" --format=json
vercel mf pull
vercel mf pull --dpl dpl_123xyzOptions / Props
create-group
| Name | Description |
|---|---|
--name | Name of the microfrontends group |
--project | Project name to include (repeatable) |
--default-app | Project name for the default application |
--default-route | Default route for the default application |
--project-default-route | Default route for a non-default project: <project>=<route> (repeatable) |
-y, --yes | Skip creation confirmation |
add-to-group
| Name | Description |
|---|---|
--group | Group name to add the current project to |
--default-route | Default route for this project (e.g. /docs) |
remove-from-group
| Name | Description |
|---|---|
-y, --yes | Skip project-link prompt (not the removal confirmation) |
delete-group
| Name | Description |
|---|---|
--group | Name or ID of the group to delete |
-y, --yes | Skip project-link prompt (not the deletion confirmation) |
inspect-group
| Name | Description |
|---|---|
--group | Name, slug, or ID of the group to inspect |
--config-file-name | Custom config file path (must end with .json or .jsonc) |
-F, --format | Output format; json |
pull
| Name | Description |
|---|---|
-y, --yes | Skip confirmation when linking is required |
--dpl | Deployment ID to pull configuration from |
Notes
- Default application cannot be removed from a group via CLI; use the dashboard or
delete-group pullrequires Vercel CLI 44.2.2+
Related
- link.md
- deploy.md
vercel open
Open the current linked project in the Vercel Dashboard in the default browser.
Signature / Usage
vercel openNotes
- Requires the directory to be linked to a Vercel project (run
vercel linkfirst) - Opens
https://vercel.com/{team-slug}/{project-name} - Available in Vercel CLI v48.10.0+
Related
- link.md
- project.md
Vercel CLI Overview
Command-line interface for managing Vercel Projects, deployments, domains, environment variables, and more from a terminal.
Signature / Usage
# Install
npm i -g vercel
pnpm i -g vercel
yarn global add vercel
bun i -g vercel
# Update
npm i vercel@latest
# Check version
vercel --version
# CI/CD authentication
export VERCEL_TOKEN=<token>
vercel deployNotes
- Default command (no subcommand) is
vercel deploy - CI/CD: set
VERCEL_TOKENenv var or pass--token - Native binaries available via
@vercel/vc-native(experimental) vcis an alias forvercel
Related
- global-options.md
- deploy.md
- login.md
- link.md
vercel project
Manage Vercel Projects: list, add, inspect, rename, remove, and configure checks, protection, access groups, analytics, Speed Insights, and OIDC tokens. Alias: vercel projects.
Signature / Usage
vercel project ls
vercel project add my-app
vercel project inspect [name]
vercel project rename my-project my-renamed-project
vercel project rm my-app
vercel project protection enable my-app --password
vercel project members my-project --format json
vercel project web-analytics my-project
vercel project speed-insights my-project
vercel project token my-project --format=jsonOptions / Props
list
| Name | Description |
|---|---|
-N, --next | Next page cursor (ms since UNIX epoch) |
--format | json output |
--update-required | Filter to projects with an upcoming Node.js runtime deprecation |
-f, --filter | Substring filter on project name |
protection
| Name | Description |
|---|---|
--sso | Toggle SSO protection |
--password | Toggle password protection |
--customer-support-code-visibility | Toggle customer support code visibility |
--skew | Toggle skew protection |
--skew-max-age <SECONDS> | Max age in seconds when enabling skew (default: 2592000) |
--protection-bypass | Toggle automation bypass secrets |
--protection-bypass-secret <SECRET> | Required when disabling bypass |
--git-fork-protection | Toggle Git fork protection |
--format | json output |
members / access-groups
| Name | Description |
|---|---|
--search | Filter by name, username, or email |
--limit | Max results (1–100) |
--format | json output |
token
| Name | Description |
|---|---|
-y, --yes | Skip confirmation |
--format | json output |
Notes
- Subcommands:
list/ls,add,inspect,rename,remove/rm,checks,protection,members,access-groups,access-summary,web-analytics,speed-insights,token - Project arguments accept project name or ID (e.g.
my-apporprj_abc123); defaults to linked project when omitted
Related
- link.md
- env.md
- deploy.md
vercel promote
Promote an existing deployment to be the current production deployment (assign production domains to it).
Signature / Usage
vercel promote [deployment-id-or-url]
vercel promote https://example-app.vercel.app --timeout=5m
vercel promote status [project]Options / Props
| Name | Description |
|---|---|
--timeout | Time to wait for promotion to complete (default: 3m); 0 exits immediately after requesting; accepts ms-compatible strings |
--yes | Skip confirmation when promoting a Preview deployment to production |
Notes
- Production deployments are the typical promote target; promoting Preview deployments requires confirmation
vercel promote status [project]shows status of pending promotions- Timeout does not cancel the actual promotion; it continues on Vercel's side
Related
- rollback.md
- deploy.md
- alias.md
vercel pull
Sync environment variables and project settings to a local cache under .vercel/ for use by vercel build and vercel dev.
Signature / Usage
vercel pull
vercel pull --environment=preview
vercel pull --environment=preview --git-branch=feature-branch
vercel pull --environment=production
vercel pull --environment=stagingOptions / Props
| Name | Description |
|---|---|
--yes | Skip new-project setup questions; use defaults |
--environment | Environment to pull from: development (default), preview, production, or custom environment name |
--git-branch | Git branch for branch-specific environment variables |
Notes
- Only needed if using
vercel buildorvercel dev; not needed otherwise - To export env vars to a file (e.g.
.env), usevercel env pullinstead - Re-run after updating env vars on Vercel to refresh the local cache
Related
- env.md
- build.md
- dev.md
CLI
| Name | Description | Path |
|---|---|---|
| vercel activity | View activity events for a linked project or team, with filtering by type, date range, and project. | activity.md |
| vercel agent | Generate or update a section about Vercel deployment best practices in the project's agent guidance file (AGENTS.md or CLAUDE.md). | agent.md |
| vercel alerts | List recent alerts for a linked project, a specific project, or an entire team. Supports AI investigation summaries and alert rule management. | alerts.md |
| vercel alias | Apply custom domain aliases to Vercel deployments. | alias.md |
| vercel api | Make authenticated HTTP requests to the Vercel API from the terminal. Beta command. | api.md |
| vercel bisect | Binary search through deployments to find when a bug was introduced, similar to git bisect but without rebuilding each commit. | bisect.md |
| vercel blob | Interact with Vercel Blob storage: upload, download, list, delete, copy files, and manage stores. | blob.md |
| vercel build | Build a Vercel Project locally or in a CI environment. Output is placed in .vercel/output (Build Output API v3 format). | build.md |
| vercel buy | Purchase Vercel products (credits, addons, subscriptions, domains) from the CLI. | buy.md |
| vercel cache | Manage CDN cache and Data cache for a project: purge, invalidate, or dangerously delete cached content. | cache.md |
| vercel certs | Manage SSL certificates for domains: list, issue, and remove. Vercel manages certificates automatically. | certs.md |
| vercel contract | View contract commitment information for your Vercel account: contract periods, commitment types, and values. | contract.md |
| vercel curl | Make HTTP requests to Vercel deployments with automatic deployment protection bypass. Beta command. | curl.md |
| vercel deploy | Deploy a Vercel project. Default command when no subcommand is specified. | deploy.md |
| vercel dev | Replicate the Vercel deployment environment locally to test Functions and Middleware without deploying. | dev.md |
| vercel dns | Manage DNS records for domains: list, add, remove, and import zone files. | dns.md |
| vercel domains | Buy, transfer, and manage domains under the current scope. | domains.md |
| vercel env | Manage environment variables in Vercel Projects: list, add, update, remove, pull to file, and run commands with env vars. | env.md |
| vercel firewall | Manage Vercel Firewall: custom rules, IP blocks, system bypass, attack mode, and system mitigations. Custom rule and IP block changes are staged until published. | firewall.md |
| vercel flags | Manage Vercel Flags (feature flags) for a project: create, list, inspect, update, set variants, split traffic, rollout, enable/disable, archive, delete, and manage SDK keys. | flags.md |
| vercel git | Manage Git provider repository connections for a Vercel Project. | git.md |
| Vercel CLI Global Options | Options available across all Vercel CLI commands. | global-options.md |
| vercel guidance | Enable or disable guidance messages shown after CLI commands. | guidance.md |
| vercel help | Display help information for Vercel CLI commands. | help.md |
| vercel httpstat | Visualize HTTP request timing statistics for Vercel deployments with automatic deployment protection bypass. Beta command. | httpstat.md |
| vercel init | Initialize a Vercel supported framework example locally from the official examples repository. | init.md |
| vercel inspect | Retrieve information about a Vercel deployment by URL or ID. | inspect.md |
| vercel install | Alias for vercel integration add. Install a marketplace integration and provision a resource. | install.md |
| vercel integration | Manage marketplace integrations: provision resources, discover integrations, manage installations, and control individual resources. | integration.md |
| vercel link | Link a local directory to a Vercel Project. Stores metadata in .vercel/project.json. | link.md |
| vercel list | List recent deployments for the currently-linked Vercel Project. Alias: vercel ls. | list.md |
| vercel login | Authenticate with your Vercel account through the CLI. | login.md |
| vercel logout | Log out of your Vercel account through the CLI. | logout.md |
| vercel logs | Display request logs or stream live runtime logs for a Vercel project. | logs.md |
| vercel mcp | Configure MCP clients (Claude Code, Cursor, VS Code with Copilot, Claude.ai) to use Vercel's hosted MCP endpoint at https://mcp.vercel.com. | mcp.md |
| vercel metrics | Query observability metrics and inspect available metrics, dimensions, and aggregations. Requires Observability Plus. | metrics.md |
| vercel microfrontends | Manage Vercel Microfrontends: create groups, add/remove projects, pull configuration for local development. Alias: vercel mf. | microfrontends.md |
| vercel open | Open the current linked project in the Vercel Dashboard in the default browser. | open.md |
| Vercel CLI Overview | Command-line interface for managing Vercel Projects, deployments, domains, environment variables, and more from a terminal. | overview.md |
| vercel project | Manage Vercel Projects: list, add, inspect, rename, remove, and configure checks, protection, access groups, analytics, Speed Insights, and OIDC tokens. Alias: vercel projects. | project.md |
| vercel promote | Promote an existing deployment to be the current production deployment (assign production domains to it). | promote.md |
| vercel pull | Sync environment variables and project settings to a local cache under .vercel/ for use by vercel build and vercel dev. | pull.md |
| vercel redeploy | Rebuild and redeploy an existing deployment. | redeploy.md |
| vercel redirects | Manage project-level redirects that apply to all deployments and environments without requiring a new deployment. | redirects.md |
| vercel remove | Remove deployments by URL/ID or remove all deployments for a project. Alias: vercel rm. | remove.md |
| vercel rollback | Roll back production deployments to a previous deployment. | rollback.md |
| vercel rolling-release | Manage rolling releases to gradually roll out new deployments to a fraction of users. Alias: vercel rr. | rolling-release.md |
| vercel routes | Manage project-level routing rules (rewrites, redirects, header transforms) that apply to all deployments. Changes are staged until published. | routes.md |
| vercel sandbox | Entry point for managing Vercel Sandbox from the CLI. Modeled on the Docker CLI. | sandbox.md |
| vercel skills | Discover agent skills relevant to the current project or search the skill catalog. | skills-cmd.md |
| vercel switch | Switch the active team scope in the Vercel CLI. | switch.md |
| vercel target | List and use custom deployment environments (targets) beyond production, preview, and development. | target.md |
| vercel teams | Manage teams: list, create, invite members, switch scope, inspect SAML/SSO, list members, and check join-request status. Aliases: vercel team, vercel switch. | teams.md |
| vercel telemetry | Enable or disable CLI telemetry collection. | telemetry.md |
| vercel traces | Inspect request traces for a linked project or a specific deployment. | traces.md |
| vercel usage | View billing usage and costs for the current billing period or a custom date range. | usage.md |
| vercel webhooks | Manage webhooks for your Vercel account: list, inspect, create, and remove. Beta command. | webhooks.md |
| vercel whoami | Display the username of the currently logged-in Vercel user. | whoami.md |
vercel redeploy
Rebuild and redeploy an existing deployment.
Signature / Usage
vercel redeploy [deployment-id-or-url]
vercel redeploy https://example-app.vercel.app --no-wait
vercel redeploy https://example-app.vercel.app --target=stagingOptions / Props
| Name | Description |
|---|---|
--no-wait | Exit immediately after requesting redeploy without waiting for completion |
--target | Target environment: production, preview, or custom environment name |
Notes
stdoutis always the new deployment URL; suitable for piping- Check
stderrand exit code in CI scripts for error handling
Related
- deploy.md
- rollback.md
- promote.md
vercel redirects
Manage project-level redirects that apply to all deployments and environments without requiring a new deployment.
Signature / Usage
vercel redirects list
vercel redirects add /old /new --status 301
vercel redirects upload redirects.csv --overwrite
vercel redirects promote <version-id>
vercel redirects restore <version-id>
vercel redirects remove /old-pathOptions / Props
list
| Name | Description |
|---|---|
--page <NUMBER> | Page number |
--per-page <NUMBER> | Redirects per page (default: 50) |
-s, --search <QUERY> | Search by source or destination |
--staging | List redirects from the staging version |
--version <VERSION_ID> | List redirects from a specific version ID |
add
| Name | Description |
|---|---|
--case-sensitive | Make redirect case-sensitive |
--name <NAME> | Version name for this redirect (max 256 chars) |
--preserve-query-params | Preserve query parameters when redirecting |
--status <CODE> | HTTP status code: 301, 302, 307, or 308 |
-y, --yes | Skip prompts and use defaults |
upload
| Name | Description |
|---|---|
--overwrite | Replace all existing redirects |
-y, --yes | Skip confirmation |
remove / promote / restore
| Name | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
Notes
- Subcommands:
list,list-versions,add,upload,remove,promote <version-id>,restore <version-id> - CSV upload format:
source,destination,status,caseSensitive,preserveQueryParams - Changes take effect immediately after creation; no deployment needed
Related
- routes.md
vercel remove
Remove deployments by URL/ID or remove all deployments for a project. Alias: vercel rm.
Signature / Usage
vercel remove [deployment-url]
vercel remove [deployment-url-1 deployment-url-2]
vercel remove [project-name]
vercel remove my-project --safe
vercel remove my-deployment.com --yesOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--safe | -s | Skip removal of deployments with an active preview URL or production domain when removing by project name |
--yes | -y | Skip confirmation prompt |
Notes
- Providing a project name removes all deployments for that project
- With
--safeand a project name, only removes deployments without active domains
Related
- list.md
- deploy.md
vercel rollback
Roll back production deployments to a previous deployment.
Signature / Usage
vercel rollback
vercel rollback [deployment-id-or-url]
vercel rollback status [project]
vercel rollback status --timeout 30sOptions / Props
| Name | Description |
|---|---|
--timeout | Time to wait for rollback to complete; 0 exits immediately; accepts ms-compatible strings |
Notes
- Hobby plan: can only roll back to the immediately previous production deployment
- To undo a rollback, use
vercel promote [deployment-id-or-url] vercel rollback status [project]shows status of pending rollbacks- Timeout does not cancel the actual rollback
Related
- promote.md
- deploy.md
vercel rolling-release
Manage rolling releases to gradually roll out new deployments to a fraction of users. Alias: vercel rr.
Signature / Usage
vercel rolling-release configure --enable --advancement-type=automatic --stage=10,5m
vercel rolling-release configure --enable --advancement-type=manual-approval --stage=10 --stage=50
vercel rolling-release configure --disable
vercel rr start --dpl=dpl_123abc456def
vercel rr approve --dpl=dpl_abc --currentStageIndex=0
vercel rr abort --dpl=dpl_abc
vercel rr complete --dpl=dpl_abc
vercel rr fetchOptions / Props
configure
| Name | Description |
|---|---|
--enable | Enable rolling releases for the project |
--disable | Disable rolling releases for the project |
--advancement-type | How stages advance: automatic or manual-approval; required with --enable |
--stage | Rollout stage as PERCENTAGE[,DURATION] (repeatable; e.g. 10,5m); 1–99% per stage; 100% added automatically |
--cfg | Raw JSON configuration (advanced/legacy; takes priority over other flags) |
start / approve / abort / complete
| Name | Description |
|---|---|
--dpl | Deployment ID or URL to target (required for start, approve, abort, complete) |
--yes | Skip confirmation prompt |
--currentStageIndex | Current stage index to approve (required for approve) |
Notes
- Subcommands:
configure,start,approve,abort,complete,fetch automaticadvancement uses time-based stages;manual-approvalrequires explicit approval between stages- Final 100% stage is added automatically
Related
- deploy.md
- promote.md
vercel routes
Manage project-level routing rules (rewrites, redirects, header transforms) that apply to all deployments. Changes are staged until published.
Signature / Usage
vercel routes list
vercel routes add --ai "Rewrite /api/* to https://backend.internal/*" --yes
vercel routes add "API Proxy" \
--src "/api/:path*" --src-syntax path-to-regexp \
--action rewrite --dest "https://api.example.com/:path*" --yes
vercel routes edit "API Proxy" --dest "https://new-api.example.com/:path*"
vercel routes delete "Old Redirect" --yes
vercel routes publish --yes
vercel routes list --diffOptions / Props
list
| Name | Description |
|---|---|
-s, --search <QUERY> | Search by name, description, source, or destination |
-f, --filter <TYPE> | Filter by type: rewrite, redirect, set_status, transform |
--production | List routes from the live production version |
--version-id <VERSION_ID> | List routes from a specific version |
--diff | Compare staged changes against production |
-e, --expand | Show expanded details for each route |
add / edit
| Name | Description |
|---|---|
--ai <PROMPT> | Generate/modify route from natural language |
--src <PATTERN> | Path pattern to match |
--src-syntax <SYNTAX> | Pattern syntax: regex (default), path-to-regexp, equals |
--action <TYPE> | Action: rewrite, redirect, set-status |
--dest <URL> | Destination URL for rewrite or redirect |
--status <CODE> | HTTP status code |
--has <CONDITION> | Condition that must match (repeatable): type:key, type:key:value, type:key:op=value |
--missing <CONDITION> | Condition that must NOT match (repeatable) |
--set-response-header <KEY=VALUE> | Set response header (repeatable) |
--append-response-header <KEY=VALUE> | Append to response header (repeatable) |
--delete-response-header <KEY> | Delete response header (repeatable) |
--set-request-header <KEY=VALUE> | Set request header (repeatable) |
--delete-request-header <KEY> | Delete request header (repeatable) |
--set-request-query <KEY=VALUE> | Set query parameter (repeatable) |
--delete-request-query <KEY> | Delete query parameter (repeatable) |
--description <TEXT> | Route description (max 1024 chars) |
--disabled | Create in disabled state |
--position <POSITION> | Position: start, end, before:<id>, after:<id> |
-y, --yes | Skip confirmation |
reorder
| Name | Description |
|---|---|
--position <POSITION> | Target position: number (1-based), start, end, before:<id>, after:<id> |
--first | Move to first position |
--last | Move to last position |
-y, --yes | Skip confirmation |
export
| Name | Description |
|---|---|
--format <FORMAT> | json (default) or ts |
Notes
- Staging workflow: changes are staged →
vercel routes diff→vercel routes publish vercel routes discard-stagingcancels staged changes- Condition types for
--has/--missing:header,cookie,query,host - Can also define routes in source control via
vercel.jsonorvercel.ts
Related
- redirects.md
- firewall.md
vercel sandbox
Entry point for managing Vercel Sandbox from the CLI. Modeled on the Docker CLI.
Signature / Usage
vercel sandbox list
vercel sandbox create --connect
vercel sandbox exec <sandbox-id> <command>
vercel sandbox connect <sandbox-id>
vercel sandbox stop <sandbox-id>
vercel sandbox remove <sandbox-id>
vercel sandbox snapshot <sandbox-id>Notes
- Full command surface documented at Sandbox CLI Reference
- Subcommands:
list,create,config,copy/cp,exec,connect/ssh,stop,remove,run,snapshot,snapshots,login,logout stopsnapshots and suspends the sandbox (filesystem preserved, resumable)removepermanently deletes the sandbox including all snapshots and sessions
Related
- deploy.md
vercel skills
Discover agent skills relevant to the current project or search the skill catalog.
Signature / Usage
vercel skills
vercel skills nextjs
vercel skills nextjs --jsonOptions / Props
| Name | Description |
|---|---|
--json | Emit results as JSON (equivalent to --format json) |
--format | Output format; json |
--yes / -y | Skip confirmation prompts in interactive flows |
Notes
- Without arguments, detects project framework (via
@vercel/fs-detectors) andpackage.jsondependencies to recommend matching skills - With a query argument, searches the catalog by keyword
Related
- agent.md
vercel switch
Switch the active team scope in the Vercel CLI.
Signature / Usage
vercel switch
vercel switch [team-name]Notes
- Without an argument, shows an interactive list of teams
vercel teams switch [slug]is equivalent- Does not accept
--tokenglobal flag; use--scopefor per-command scope override
Related
- teams.md
- whoami.md
vercel target
List and use custom deployment environments (targets) beyond production, preview, and development.
Signature / Usage
vercel target list
vercel target ls
vercel deploy --target=staging
vercel pull --environment=staging
vercel env add MY_KEY stagingNotes
vercel target list(alias:vercel targets ls) lists custom environments configured for the linked project- The
--targetflag is available onvercel deployandvercel redeploy - The
--environmentflag onvercel pullandvercel envalso accepts custom environment names
Related
- deploy.md
- pull.md
- env.md
vercel teams
Manage teams: list, create, invite members, switch scope, inspect SAML/SSO, list members, and check join-request status. Aliases: vercel team, vercel switch.
Signature / Usage
vercel teams list
vercel teams add --slug acme --name "Acme Corp"
vercel teams invite abc@vercel.com xyz@vercel.com
vercel teams switch acme
vercel teams members --format json
vercel teams sso
vercel teams requestOptions / Props
list
| Name | Description |
|---|---|
-N, --next | Next page cursor (ms since UNIX epoch) |
--format | json output |
add
| Name | Description |
|---|---|
--slug | Team URL slug; required in non-interactive mode |
--name | Team display name; required in non-interactive mode |
members
| Name | Description |
|---|---|
-N, --next | Next page cursor |
--format | json output |
sso / request
| Name | Description |
|---|---|
--format | json output |
Notes
- Subcommands:
list/ls,add/create,invite,switch/change,request/access-request,sso,members/member vercel switch [team-name]is a top-level alias forvercel teams switch
Related
- switch.md
- whoami.md
vercel telemetry
Enable or disable CLI telemetry collection.
Signature / Usage
vercel telemetry status
vercel telemetry enable
vercel telemetry disableNotes
- Telemetry tracks: command invoked, CLI version, general machine info (CPU count, OS, CI flag)
- No sensitive data is collected (no env vars, file paths, file contents, logs, or serialized errors)
- Debug mode:
VERCEL_TELEMETRY_DEBUG=1prints telemetry events to stderr without sending them
Related
- overview.md
vercel traces
Inspect request traces for a linked project or a specific deployment.
Signature / Usage
vercel traces get req_1234567890
vercel traces req_1234567890 # `get` is the default subcommand
vercel traces get req_1234567890 --open --view=tree
vercel traces get req_1234567890 --jsonOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--project | -p | Project name or ID |
--json | -j | Machine-readable JSON output; cannot combine with --open |
--open | Open the trace in the Vercel Dashboard instead of printing in terminal | |
--view | Initial Dashboard view (requires --open): timeline, tree, gantt |
Notes
getis the default subcommand:vercel traces req_...equalsvercel traces get req_...- Capture a trace during a request with
vercel curl --trace /api/hello
Related
- curl.md
- logs.md
vercel usage
View billing usage and costs for the current billing period or a custom date range.
Signature / Usage
vercel usage
vercel usage --from 2025-01-01 --to 2025-01-31
vercel usage --breakdown daily
vercel usage --from 2025-01-01 --to 2025-01-31 --breakdown weekly
vercel usage --format jsonOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--from | Start date (YYYY-MM-DD); interpreted as midnight Pacific time; requires --to | |
--to | End date (YYYY-MM-DD); interpreted as 23:59:59 Pacific time; requires --from | |
--breakdown | Show usage grouped by time period: daily, weekly, or monthly | |
--format | -F | Output format; json returns structured data |
Notes
- Available to Owner, Member, Developer, Security, Billing, and Enterprise Viewer roles
- Default shows current billing period
- Supports up to 1-year date range with 1-day granularity
Related
- contract.md
vercel webhooks
Manage webhooks for your Vercel account: list, inspect, create, and remove. Beta command.
Signature / Usage
vercel webhooks list
vercel webhooks get <id>
vercel webhooks create <url> --event deployment.created --event deployment.ready
vercel webhooks create <url> --event deployment.created --project prj_abc123
vercel webhooks rm <id> --yesOptions / Props
| Name | Shorthand | Description |
|---|---|---|
--format | json output for list and get subcommands | |
--event | -e | Event type to subscribe to (repeatable); required for create |
--project | -p | Limit webhook to a project ID (repeatable); default: all projects |
--yes | Skip confirmation for rm |
Notes
- Subcommands:
list/ls,get/inspect,create/add,rm/remove/delete - On
create, the webhook secret is shown only once; save it immediately to verifyx-vercel-signatureheaders - Project must be specified by project ID (e.g.
prj_abc123), not project name - See official docs for supported event types
Related
- project.md
vercel whoami
Display the username of the currently logged-in Vercel user.
Signature / Usage
vercel whoamiRelated
- login.md
- logout.md
- teams.md
Build Output API
A file-system specification for the .vercel/output/ directory that produces a Vercel deployment without using Vercel's build system. Primarily targeting framework authors who want to utilize all Vercel platform features.
Signature / Usage
.vercel/output/
config.json ← required
static/ ← static files served directly
functions/ ← Vercel Functions directoryMinimal config.json:
{
"version": 3
}Options / Props
config.json top-level
| Name | Type | Required | Description |
|---|---|---|---|
version | 3 | Yes | Build Output API version. Must be 3 |
routes | Route[] | No | Routing rules (same syntax as vercel.json routes) |
images | ImagesConfig | No | Image Optimization API configuration |
wildcard | WildcardConfig[] | No | Domain-to-value mappings for i18n routing via $wildcard |
overrides | Record<string, Override> | No | Override URL path or Content-Type for static files |
cache | string[] | No | Glob patterns of paths to cache between builds |
framework | {version: string} | No | Framework version string (display only) |
crons | Cron[] | No | Cron job definitions for production deployment |
Route (Source route)
| Name | Type | Required | Description |
|---|---|---|---|
src | string | Yes | PCRE-compatible regex matching incoming pathname |
dest | string | No | Destination pathname or URL; supports $1, $2, $name capture groups |
headers | Record<string, string> | No | Response headers |
methods | string[] | No | HTTP methods to match (default: all) |
continue | boolean | No | If true, routing continues after this rule matches |
caseSensitive | boolean | No | Whether src matching is case-sensitive |
check | boolean | No | If true, triggers handle: filesystem and handle: rewrite |
status | number | No | HTTP status code to respond with |
has | HasField[] | No | Request conditions that must be present |
missing | HasField[] | No | Request conditions that must be absent |
locale | Locale | No | i18n locale redirect configuration |
middlewarePath | string | No | Path to an Edge Runtime middleware function |
mitigate | `{action: "challenge" \ | "deny"}` | No |
transforms | Transform[] | No | Header/query transform rules |
Route (Handler route)
| Name | Type | Required | Description |
|---|---|---|---|
handle | `"rewrite" \ | "filesystem" \ | "resource" \ |
src | string | No | Optional path pattern |
dest | string | No | Optional destination |
status | number | No | Optional status code |
ImagesConfig
| Name | Type | Required | Description |
|---|---|---|---|
sizes | number[] | Yes | Allowed image widths |
domains | string[] | Yes | Allowed external domains (empty = deployment domain only) |
remotePatterns | RemotePattern[] | No | Fine-grained external pattern allowlist |
localPatterns | LocalPattern[] | No | Local path allowlist (undefined = allow all, [] = deny all) |
qualities | number[] | No | Allowed quality values (1–100); undefined = all |
minimumCacheTTL | number | No | Cache TTL in seconds |
formats | `("image/avif" \ | "image/webp")[]` | No |
dangerouslyAllowSVG | boolean | No | Allow SVG input (default false) |
contentSecurityPolicy | string | No | CSP for optimized images |
contentDispositionType | string | No | Content-Disposition header value |
Image Optimization API endpoint: /_vercel/image?url=<url>&w=<width>&q=<quality>
WildcardConfig item
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | Domain name to match |
value | string | Yes | Value assigned to $wildcard for use in routes |
Override
| Name | Type | Required | Description |
|---|---|---|---|
path | string | No | URL path to serve the static file from |
contentType | string | No | Override Content-Type response header |
Cron item
| Name | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Path to invoke |
schedule | string | Yes | Cron expression |
Transform
| Name | Type | Required | Description |
|---|---|---|---|
type | `"request.headers" \ | "request.query" \ | "response.headers"` |
op | `"append" \ | "set" \ | "delete"` |
target | `{key: string \ | MatchableValue}` | Yes |
args | `string \ | string[]` | No |
Notes
config.jsonwith at least"version": 3is required- The
cacheproperty only applies when Vercel builds from source (not prebuilt artifacts) framework.versionis for display purposes only- Native dependencies built locally may not match Vercel's Linux x64 build image
Related
- vercel-json.md
- vercel-ts.md
git / github Configuration
Git-related configuration options available in vercel.json and vercel.ts to control automated deployments and GitHub integration behavior.
Signature / Usage
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"git": {
"deploymentEnabled": {
"dev": false,
"internal-*": false
}
}
}Options / Props
git object
| Name | Type | Default | Description |
|---|---|---|---|
git.deploymentEnabled | `boolean \ | Record<string, boolean>` | true |
github object
| Name | Type | Default | Description |
|---|---|---|---|
github.autoAlias | boolean | — | When false, preview deployments are created upon merge. Deprecated: use the staged production build workflow instead |
github.autoJobCancelation | boolean | — | When false, builds are never cancelled; all pushes build sequentially |
github.silent | boolean | — | Deprecated: When true, stops PR and commit comments. Use dashboard Git settings instead |
github.enabled | boolean | — | Deprecated: When false, Vercel for GitHub will not deploy the project. Use git.deploymentEnabled instead |
Notes
- Branch patterns use minimatch syntax: e.g.
"internal-*": false - If a branch matches multiple rules, any
truematch triggers a deployment - Setting
git.deploymentEnabled: false(boolean) disables all automatic deployments github.silentandgithub.enabledare deprecated; use dashboard settings orgit.deploymentEnabled
Related
- vercel-json.md
- vercel-ts.md
configuration
| Name | Description | Path |
|---|---|---|
| vercel.json | Static JSON project configuration: buildCommand, cleanUrls, crons, functions, headers, redirects, rewrites, routes, images, regions, and more | vercel-json.md |
| vercel.ts | Programmatic TypeScript project configuration with dynamic build-time generation; same properties as vercel.json plus type-safe helper functions | vercel-ts.md |
| git / github Configuration | Git branch deployment control and GitHub integration options (git.deploymentEnabled, github.autoAlias, github.autoJobCancelation) | git-configuration.md |
| Build Output API | File-system specification for .vercel/output/ directory: config.json schema (version, routes, images, wildcard, overrides, cache, crons) | build-output-api.md |
vercel.json
Static JSON configuration file for overriding Vercel project defaults. Place in the project root. Supports all properties listed below. Use only one config file: vercel.json or vercel.ts.
Signature / Usage
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"buildCommand": "next build",
"cleanUrls": true,
"trailingSlash": false,
"rewrites": [{ "source": "/about", "destination": "/about-our-company.html" }]
}Options / Props
| Name | Type | Default | Description |
|---|---|---|---|
$schema | string | — | URL to enable IDE autocomplete and schema validation |
buildCommand | `string \ | null` | — |
bunVersion | string | — | Use Bun runtime instead of Node.js. Only valid value: "1.x" |
cleanUrls | boolean | false | Remove .html extensions and redirect extension-based paths with 308 |
crons | Cron[] | — | Schedule cron jobs for the production deployment |
devCommand | `string \ | null` | — |
fluid | `boolean \ | null` | — |
framework | `string \ | null` | — |
functions | Record<GlobPattern, FunctionConfig> | — | Configure Vercel Function memory, duration, runtime per glob |
headers | HeaderRule[] | — | Add custom HTTP response headers |
ignoreCommand | `string \ | null` | — |
images | ImagesConfig | — | Configure Vercel Image Optimization API |
installCommand | `string \ | null` | — |
outputDirectory | `string \ | null` | — |
public | boolean | false | Deprecated. No longer grants public access to source/logs |
redirects | RedirectRule[] | — | Redirect requests to different URLs |
bulkRedirectsPath | string | — | Path to a CSV/JSON/JSONL file (or folder) of bulk redirects |
regions | string[] | ["iad1"] | Deploy functions to specific Vercel regions |
functionFailoverRegions | string[] | — | Failover regions for functions (Enterprise) |
rewrites | RewriteRule[] | — | Rewrite (proxy) requests to different paths or external URLs |
routes | RouteRule[] | — | Low-level PCRE-based routing rules |
trailingSlash | `boolean \ | undefined` | undefined |
crons item
| Name | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Path to invoke (must start with /). Max 512 chars |
schedule | string | Yes | Cron expression. Max 256 chars |
functions value
| Name | Type | Required | Description |
|---|---|---|---|
runtime | string | No | npm package of a Community Runtime (e.g. vercel-php@0.5.2) |
memory | number | No | MB of memory (unavailable with Fluid compute — set in dashboard instead) |
maxDuration | number | No | Max seconds per invocation (plan-dependent limits) |
supportsCancellation | boolean | No | Support request cancellation (Node.js runtime only) |
includeFiles | string | No | Glob of files to bundle into the function |
excludeFiles | string | No | Glob of files to exclude from the bundle |
regions | string[] | No | Override project-level regions for this function |
functionFailoverRegions | string[] | No | Override project-level failover regions for this function |
headers item
| Name | Type | Required | Description |
|---|---|---|---|
source | string | Yes | Path pattern (excluding querystring) |
headers | {key: string, value: string}[] | Yes | Response headers to add |
has | HasObject[] | No | Condition: apply only when these properties are present |
missing | HasObject[] | No | Condition: apply only when these properties are absent |
redirects item
| Name | Type | Required | Description |
|---|---|---|---|
source | string | Yes | Incoming path pattern |
destination | string | Yes | Target absolute path or external URL |
permanent | boolean | No | true = 308, false = 307 (default true) |
statusCode | number | No | Explicit status code; mutually exclusive with permanent |
has | HasObject[] | No | Conditional redirect based on presence |
missing | HasObject[] | No | Conditional redirect based on absence |
rewrites item
| Name | Type | Required | Description |
|---|---|---|---|
source | string | Yes | Incoming path pattern |
destination | string | Yes | Target path or external URL |
has | HasObject[] | No | Apply only when properties are present |
missing | HasObject[] | No | Apply only when properties are absent |
images config
| Name | Type | Required | Description |
|---|---|---|---|
sizes | number[] | Yes | Allowed image widths |
localPatterns | {pathname: string, search: string}[] | No | Allowed local path patterns |
remotePatterns | RemotePattern[] | No | Allowed external domains/paths |
minimumCacheTTL | number | No | Cache TTL in seconds for optimized images |
qualities | number[] | No | Allowed quality values |
formats | `("image/avif" \ | "image/webp")[]` | No |
dangerouslyAllowSVG | boolean | No | Allow SVG input (default false) |
contentSecurityPolicy | string | No | CSP header for optimized images |
contentDispositionType | `"inline" \ | "attachment"` | No |
HasObject
| Name | Type | Required | Description |
|---|---|---|---|
type | `"header" \ | "cookie" \ | "query" \ |
key | string | Yes (except host) | Key to match |
value | `string \ | object` | No |
bulkRedirectsPath fields
| Name | Type | Required | Description |
|---|---|---|---|
source | string | Yes | Incoming path or URL. Max 2048 chars |
destination | string | Yes | Target path or URL. Max 2048 chars |
permanent | boolean | No | Default false (307) |
statusCode | integer | No | 301, 302, 303, 307, or 308 |
caseSensitive | boolean | No | Default false |
preserveQueryParams | boolean | No | Default false |
Notes
- Cannot use
functionsandbuildstogether;buildsis legacy bunVersion: "1.x"requiresbun run --buninpackage.jsonscripts when using ISRcleanUrlsdoes not work with Next.js undervercel dev(works in deployed env)hasinredirects/rewritesdoes not work locally withvercel dev- Bulk redirects do not support wildcard or header matching
routesis case-insensitive forsrc; preferrewrites/redirects/headersfor new code
Related
- vercel-ts.md
- git-configuration.md
- build-output-api.md
vercel.ts
Programmatic TypeScript configuration for Vercel that executes at build time. Supports the same properties as vercel.json plus dynamic generation via code. Use only one config file: vercel.ts or vercel.json.
Signature / Usage
import { routes, deploymentEnv, type VercelConfig } from '@vercel/config/v1';
export const config: VercelConfig = {
buildCommand: 'npm run build',
cleanUrls: true,
trailingSlash: false,
rewrites: [
routes.rewrite('/api/(.*)', 'https://backend.example.com/$1'),
],
redirects: [
routes.redirect('/old-docs', '/docs', { permanent: true }),
],
headers: [
routes.cacheControl('/static/(.*)', {
public: true,
maxAge: '1 week',
immutable: true,
}),
],
crons: [{ path: '/api/cleanup', schedule: '0 0 * * *' }],
};Options / Props
All vercel.json properties are available. See vercel-json.md for the full property table.
Additional TypeScript-specific capabilities:
| Feature | Description |
|---|---|
VercelConfig type | Import from @vercel/config/v1 for full type safety |
routes.rewrite(src, dest, opts?) | Helper to create a rewrite rule |
routes.redirect(src, dest, opts?) | Helper to create a redirect rule |
routes.header(src, headers, opts?) | Helper to create a header rule |
routes.cacheControl(src, opts) | Helper to set Cache-Control headers |
deploymentEnv(VAR) | Reference an env variable for use in route dest or args at request time |
| Dynamic config | Any build-time logic is allowed; final config must be in export const config |
Install
npm i @vercel/configSupported file names
vercel.ts, vercel.js, vercel.mjs, vercel.cjs, or vercel.mts.
Notes
- The
configexport must be a named export:export const config: VercelConfig = { ... } vercel.tsexecutes at build time — not at request time (exceptdeploymentEnvreferences which expand at request time)- Migrate from
vercel.jsonby copying its contents into theconfigexport, then progressively add dynamic features - Prefer
routes.*helpers over raw objects forrewrites,redirects, andheadersfor type safety - Legacy properties from
vercel.jsonare available; see static configuration reference
Related
- vercel-json.md
- git-configuration.md
Deploy Hooks
Deploy Hooks are unique URLs that accept HTTP requests to trigger deployments without needing a new commit. Each URL is linked to a specific project, repository, and branch.
Signature / Usage
# Trigger a deployment (GET or POST)
curl -X POST https://api.vercel.com/v1/integrations/deploy/<project-id>/<hook-id>
# Disable build cache
curl -X POST https://api.vercel.com/v1/integrations/deploy/<project-id>/<hook-id>?buildCache=falseExample Response
{
"job": {
"id": "okzCd50AIap1O31g0gne",
"state": "PENDING",
"createdAt": 1662825789999
}
}Options / Props
| Query Parameter | Default | Description |
|---|---|---|
buildCache | true | Set to false to bypass the build cache for this deployment |
Creating a Deploy Hook
1. Connect your project to a Git repository. 2. Go to Project Settings → Git → Deploy Hooks. 3. Enter a name and select the branch to deploy. 4. Copy the generated URL.
Limits
| Plan | Deploy Hooks per Project |
|---|---|
| Hobby | 5 |
| Pro | 5 |
| Enterprise | 10 |
Notes
- No authentication header is needed to trigger a hook; the unique URL acts as the secret — treat it like a token/password.
- If the same version is deployed multiple times, Vercel cancels previous deployments for the same hook to reduce build times.
- Deploy Hooks will not trigger if
github.enabled = falseis set invercel.json. - If a hook URL is compromised, revoke it in Project Settings and create a new one.
- Build cache is included by default; hooks created before May 11, 2021 must explicitly append
?buildCache=trueor be replaced with a new hook.
Use Cases
- Headless CMS content change → trigger rebuild
- Scheduled deployments via third-party cron service
- Forced deployments from the command line without a code change
Related
- overview.md
- managing-deployments.md
Environments
Vercel provides three default environments (Local, Preview, Production) and supports Custom Environments on Pro/Enterprise plans for workflows like staging or QA.
Signature / Usage
# Deploy to a custom environment named "staging"
vercel deploy --target=staging
# Pull env vars from "staging"
vercel pull --environment=staging
# Add env var to "staging"
vercel env add MY_KEY staging
# Deploy to production
vercel --prodEnvironment Types
| Environment | Plan | Trigger | Use Case |
|---|---|---|---|
| Local | All | vercel dev / vercel env pull | Local development |
| Preview | All | Non-production branch push, PR, CLI without --prod | Testing, QA, collaboration |
| Production | All | Production branch push, vercel --prod | Live user-facing site |
| Custom | Pro / Enterprise | Branch tracking (configurable) | Staging, QA, specialized workflows |
Custom Environment Limits
| Plan | Custom Environments per Project |
|---|---|
| Pro | 1 |
| Enterprise | 12 |
Creating a Custom Environment (API)
curl --request POST \
--url https://api.vercel.com/v9/projects/<project-id>/custom-environments \
--header "Authorization: Bearer $VERCEL_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"slug": "staging",
"description": "Staging environment"
}'Options / Props
| Option | Description |
|---|---|
| Branch Tracking | Automatically deploy whenever a matching branch is pushed |
| Attach a Domain | Give a persistent URL to the environment |
| Import variables | Seed environment variables from another environment |
| Auto-assign Custom Production Domains | Toggle in Production environment settings; disable for staged promotion workflows |
Notes
- Preview deployments create two URL types: a commit-specific URL and a branch-specific URL (always pointing to the latest commit on the branch).
- Pushing or merging to the production branch (default:
main) triggers a production deployment and updates custom domains automatically. - Custom environments require Pro or Enterprise plan.
- Disabling Auto-assign Custom Production Domains in Production settings enables a staging workflow where new commits don't go live until manually promoted.
Related
- overview.md
- git-integration.md
- promoting-deployments.md
- generated-urls.md
Generated URLs
When a deployment is created (preview or production), Vercel automatically generates a unique URL for accessing that specific deployment.
URL Formats
From Git
| Type | Format | Behavior |
|---|---|---|
| Commit-specific | <project-name>-<unique-hash>-<scope-slug>.vercel.app | Always points to this exact commit |
| Branch-specific | <project-name>-git-<branch-name>-<scope-slug>.vercel.app | Always points to the latest commit on the branch |
From Vercel CLI
| Format | Notes |
|---|---|
<project-name>-<scope-slug>.vercel.app | Standard CLI deployment URL |
<project-name>-<author-name>-<scope-slug>.vercel.app | Author-specific URL on team deployments |
URL Components
| Value | Description | Created when |
|---|---|---|
<project-name> | Name of the Vercel Project | Git branch, Git commit, CLI |
<unique-hash> | 9 randomly generated alphanumeric characters | Git commit |
<scope-slug> | Account or team slug | Git branch, Git commit, CLI |
<branch-name> | Git branch name | Git branch |
Notes
- URLs are publicly accessible by default; restrict with Deployment Protection.
- URLs longer than 63 characters before
.vercel.appare truncated. - Project names resembling web domains may be shortened to prevent anti-phishing browser warnings (e.g.,
www-company-com→company). - The commit URL is accessible from the View deployment button in a PR; the branch URL from the Visit Preview button.
- Pro/Enterprise teams can replace
.vercel.appwith a custom domain via Preview Deployment Suffix (requires permission).
Related
- environments.md
- overview.md
Git Integration
Vercel automatically deploys on every branch push and merge to the production branch for GitHub, GitLab, Bitbucket, and Azure DevOps repositories.
Signature / Usage
# Connect a repo: use the Vercel Dashboard → New Project
# Then push normally:
git push origin feature-branch # → preview deployment
git push origin main # → production deploymentSupported Git Providers
| Provider | Plans | Notes |
|---|---|---|
| GitHub Free / Team / Enterprise Cloud | All | Full integration with PR comments, checks |
| GitHub Enterprise Server | All | Via GitHub Actions only |
| GitLab Free / Premium / Ultimate / Enterprise | All | Full integration with MR comments |
| Self-Managed GitLab | All | Via GitLab Pipelines |
| Bitbucket Free / Standard / Premium | All | Full integration with PR comments |
| Bitbucket Data Center (Self-Hosted) | All | Via Bitbucket Pipelines |
| Azure DevOps Pipelines | All | Via Vercel Deployment Extension |
Deployment Behavior
| Event | Result |
|---|---|
| Push to non-production branch | Preview deployment; unique URL posted as PR/MR comment |
Push to production branch (default: main) | Production deployment; custom domain updated |
| Pull/Merge Request | Preview deployment per PR; URL in comment |
| Multiple simultaneous pushes to same branch | Latest commit wins; intermediate builds are cancelled |
Production Branch Configuration
Vercel selects the production branch in this order: main → master → Bitbucket "production branch" setting → repository default branch.
To customize: Project Settings → Environments → Production → Branch Tracking → change branch name.
Deploying from a Git Reference (Dashboard)
1. Go to Project → Deployments → Create Deployment. 2. Enter a commit SHA (targeted) or a branch name (branch-based). 3. Select Create Deployment.
Private Repositories
| Plan | Requirement |
|---|---|
| Hobby | Commit author must be the Hobby team owner |
| Pro | Commit author must be a member of the Vercel Pro team |
For forks of public repositories, Vercel requires authorization from a team member before deploying a PR.
Notes
- Configure
github.autoJobCancellation = falseinvercel.jsonto disable automatic cancellation of queued builds. - Vercel sends
repository_dispatchevents to GitHub on deployment status changes (vercel.deployment.ready,.success,.error,.canceled,.pending,.failed,.promoted,.skipped,.ignored). - Commit authors on private repositories must have a Vercel account with linked Git credentials.
Related
- vercel-for-github.md
- vercel-for-gitlab.md
- vercel-for-bitbucket.md
- environments.md
Instant Rollback
Instant Rollback reverts your production domain(s) to a previous deployment without rebuilding. It is designed for swift recovery from production incidents like breaking changes or bugs.
Signature / Usage
# Undo a rollback / promote a different deployment (CLI)
vercel promote [deployment-id-or-url]How to Perform an Instant Rollback (Dashboard)
1. On the Project Overview page, click Instant Rollback on the Production Deployment tile. 2. Select the deployment to roll back to. (Pro/Enterprise: click Choose another deployment for all eligible deployments.) 3. Verify rollback details: affected domains, environment variable state, and external service implications. 4. Click Confirm Rollback.
Alternatively: Deployments sidebar → find deployment → ellipsis (⋮) → Instant Rollback.
Eligible Deployments
| Plan | Eligibility |
|---|---|
| Hobby | Previous deployment only |
| Pro | Any deployment previously aliased to a production domain |
| Enterprise | Any deployment previously aliased to a production domain |
Preview deployments that were never aliased to production are not eligible.
Plan Access
| Plan | Who Can Roll Back |
|---|---|
| Hobby | Team owner |
| Pro | Owners and Members |
| Enterprise | Owners and Members |
Behavior During Rollback
| Aspect | Behavior |
|---|---|
| Domain assignment | Instantly pointed to the rolled-back deployment |
| Environment variables | Reverted to the state of the rolled-back deployment (not updated by current settings) |
| Cron jobs | Reverted to the state of the rolled-back deployment |
| Auto-assignment of production domains | Disabled after rollback (new pushes to production branch do not go live automatically) |
| Custom aliases | Not included unless they were set on the previous production deployment |
Undo a Rollback
Dashboard: Project Overview → Undo Rollback button → select deployment → Confirm.
CLI:
vercel promote [deployment-id-or-url]Undoing restores auto-assignment of production domains so new pushes go live again.
Notes
- Rollback happens instantaneously — no rebuild is performed.
- After rollback, the rolled-back deployment is shown as the current production deployment with canceled/rolled-back commits highlighted.
- Configuration used by the rolled-back deployment may be stale relative to current project settings.
- Deleting an eligible deployment removes it from the rollback candidates list.
Related
- promoting-deployments.md
- rolling-releases.md
- managing-deployments.md
Managing Deployments
All current and past deployments are accessible from the Vercel Dashboard regardless of environment, status, or branch. Vercel CLI and the REST API provide programmatic alternatives.
Signature / Usage
# Delete a deployment via REST API
curl --request DELETE \
--url https://api.vercel.com/v13/deployments/<deployment-id> \
--header "Authorization: Bearer $VERCEL_TOKEN"// Delete via SDK
import { Vercel } from '@vercel/sdk';
const vercel = new Vercel({ bearerToken: '<TOKEN>' });
await vercel.deployments.deleteDeployment({ id: 'deployment-id' });Dashboard Actions
| Action | Steps |
|---|---|
| Filter | Deployments sidebar → filter by Branch, Date Range, Environment, Status |
| Redeploy | Deployments → ellipsis (…) → Redeploy → choose whether to use build cache |
| Delete | Deployments → select deployment → (…) → Delete |
| Promote to Production | Deployments → ellipsis (…) → Promote to Production |
| Instant Rollback | Project Overview → Production Deployment tile → Instant Rollback |
| Assign Custom Domain | From deployment details |
REST API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| DELETE | /v13/deployments/<id> | Delete a specific deployment |
| POST | /v13/deployments | Create a new deployment |
| GET | /v13/deployments | List deployments |
When to Redeploy
| Scenario | Action |
|---|---|
| Bad cached data causing issues | Redeploy without build cache |
| Enabling Analytics | Redeploy |
| Changing Environment Variables | Redeploy |
| Outage Resiliency | Redeploy |
| Build & Development Settings changes | Redeploy |
| Redirect or Rewrite changes from subdomain to subpath | Redeploy |
Notes
- Deleting a deployment prevents using Instant Rollback on it and may break links in Git provider PR comments.
- A deployment retention policy can be configured to automatically delete deployments after a set period.
- Deployment protection (Vercel Authentication, Trusted IPs, Password Protection) can restrict access to deployments.
- Trusted IPs and Password Protection require Enterprise; Password Protection is also available as a paid Pro add-on.
Related
- overview.md
- promoting-deployments.md
- instant-rollback.md
Deploying to Vercel
A deployment on Vercel is the result of a successful build of your project. Each deployment generates a unique URL for previewing changes in a live environment.
Signature / Usage
# Git push (automatic)
git push origin main
# Vercel CLI
vercel --prod
# Deploy Hook (HTTP POST)
curl -X POST https://api.vercel.com/v1/integrations/deploy/<project-id>/<hook-id>
# REST API
POST https://api.vercel.com/v13/deploymentsDeployment Methods
| Method | Trigger | Requires Git |
|---|---|---|
| Git push | Automatic on every commit/PR | Yes |
Vercel CLI (vercel) | Manual, from terminal | No |
| Deploy Hooks | HTTP GET or POST to a unique URL | Yes |
| REST API | POST to /v13/deployments with file SHAs | No |
Environments
| Environment | Trigger | Traffic |
|---|---|---|
| Local | vercel dev | Developer only |
| Preview | Non-production branch push or CLI without --prod | Unique URL per commit/branch |
| Production | Production branch push or vercel --prod | Custom domain |
Notes
- Each deployment gets an automatically generated unique URL regardless of environment.
- After a rollback, Vercel disables auto-assignment of production domains until undone.
- Vercel CLI
vercel(without--prod) creates a preview deployment;vercel --prodcreates a production deployment.
Related
- environments.md
- git-integration.md
- deploy-hooks.md
- managing-deployments.md
- generated-urls.md
Promoting Deployments
Promoting a deployment means assigning your production domain(s) to a different deployment. Vercel supports three promotion approaches: Instant Rollback, promote preview to production, and staged production promotion.
Signature / Usage
# Promote a deployment via CLI
vercel promote [deployment-id-or-url]Promotion Methods
| Method | When to Use | Triggers Rebuild | Environment Variables |
|---|---|---|---|
| Instant Rollback | Revert to a previous production deployment quickly | No | Reverted to old state |
| Promote preview to production | Promote a preview build to production | Yes (rebuild with production env vars) | Switches to production vars |
| Staged production promotion | Promote a production build that was never auto-assigned | No | Already production vars |
Production Deployment States
| State | Description |
|---|---|
| Staged | Commit pushed to production branch, but domain not auto-assigned |
| Promoted | Manually promoted from staging (cannot be promoted again; use rollback to revert) |
| Current | Aliased to production domain; currently served to users |
Promoting Preview to Production (Dashboard)
1. Go to Project → Deployments in the sidebar. 2. Click the ellipsis (…) next to the preview deployment. 3. Select Promote to Production. 4. Review the domains that will be linked, then confirm.
Staged Production Workflow (Dashboard)
1. Project Settings → Environments → Production → Branch Tracking. 2. Disable Auto-assign Custom Production Domains. 3. Deploy as normal (commits go to Staged state). 4. When ready, Deployments → ellipsis (…) → Promote → confirm.
Notes
- If preview and production environment variables differ, promoting from preview to production switches to production vars; preview vars cannot be used in production.
- After an Instant Rollback, auto-assignment of production domains is disabled. Undo with Undo Rollback on the dashboard or
vercel promote. - A deployment that was previously promoted cannot be promoted again; roll back to it instead.
- Staged promotion does not trigger a rebuild; it instantly points the domain to the existing build.
Related
- instant-rollback.md
- managing-deployments.md
- environments.md
deployment
| Name | Description | Path |
|---|---|---|
| Overview | Deployment methods (Git, CLI, Deploy Hooks, REST API) and accessing deployments | overview.md |
| Environments | Local, Preview, Production, and Custom Environments (Pro/Enterprise) | environments.md |
| Git Integration | Supported providers, automatic deploy behavior, production branch configuration | git-integration.md |
| Vercel for GitHub | GitHub-specific integration: permissions, system env vars, GitHub Actions, repository_dispatch | vercel-for-github.md |
| Vercel for GitLab | GitLab-specific integration: permissions, merge request deployments, GitLab Pipelines | vercel-for-gitlab.md |
| Vercel for Bitbucket | Bitbucket-specific integration: permissions, PR deployments, Bitbucket Pipelines | vercel-for-bitbucket.md |
| Generated URLs | URL formats for commit-specific, branch-specific, and CLI deployments | generated-urls.md |
| Deploy Hooks | Create and trigger deployments via unique HTTP URLs without new commits | deploy-hooks.md |
| Managing Deployments | Filter, redeploy, delete, promote, and protect deployments via Dashboard, CLI, or API | managing-deployments.md |
| Promoting Deployments | Instant Rollback, promote preview to production, staged production promotion | promoting-deployments.md |
| Instant Rollback | Instantly revert production domain to a previous deployment without rebuilding | instant-rollback.md |
| Rolling Releases | Gradually shift traffic to a new deployment across configurable stages | rolling-releases.md |
| Rolling Release Deployment | Step-by-step CLI guide for performing a rolling release | rolling-release-deployment.md |
Rolling Release Deployment
Step-by-step guide for performing a rolling release deployment using the Vercel CLI: configure stages, deploy, start the release, monitor, advance or abort, and complete.
Requires a linked Vercel project (vercel link) and Pro or Enterprise plan.Signature / Usage
# Full command sequence (quick reference)
vercel rolling-release configure --cfg '{"enabled":true,"advancementType":"automatic","stages":[{"targetPercentage":10,"duration":5},{"targetPercentage":50,"duration":10},{"targetPercentage":100}]}'
vercel deploy --prod
vercel rolling-release start --dpl <deployment-url>
vercel rolling-release fetch
vercel rolling-release approve --dpl <deployment-url> --currentStageIndex 0
vercel rolling-release complete --dpl <deployment-url>
# On errors:
vercel rolling-release abort --dpl <deployment-url>CLI Commands
| Command | Description |
|---|---|
vercel rolling-release configure --cfg '<json>' | Set or update rolling release stage configuration |
vercel rolling-release configure --cfg 'disable' | Disable rolling releases for the project |
vercel rolling-release start --dpl <url> | Start the rolling release for a deployment |
vercel rolling-release fetch | Get current rolling release status and traffic split |
vercel rolling-release approve --dpl <url> --currentStageIndex <n> | Advance to next stage (manual approval mode; stage index starts at 0) |
vercel rolling-release complete --dpl <url> | Promote canary to 100% and end rolling release |
vercel rolling-release abort --dpl <url> | Abort rolling release; revert all traffic to base deployment |
vercel logs --environment production --level error --since 5m | Monitor production error logs during rollout |
Workflow Steps
| Step | Action |
|---|---|
| 1 | Configure stages with vercel rolling-release configure |
| 2 | Deploy to production with vercel deploy --prod |
| 3 | Start the release with vercel rolling-release start --dpl <url> |
| 4 | Monitor traffic and errors with vercel rolling-release fetch + vercel logs |
| 5 | Advance stages (auto or vercel rolling-release approve) |
| 6 | Complete with vercel rolling-release complete --dpl <url> |
| On error | Abort with vercel rolling-release abort --dpl <url> |
Notes
- After aborting, investigate logs before attempting another rollout:
vercel logs --environment production --level error --since 30m --expand. --currentStageIndexstarts at0; increment by 1 for each subsequent manual approval.- Automatic stages advance based on
duration(in minutes); manual stages require explicitapprovecalls.
Related
- rolling-releases.md
- instant-rollback.md
Rolling Releases
Rolling Releases allow you to gradually shift traffic from your current production deployment to a new release candidate, monitoring metrics between stages before full promotion.
Requires Pro or Enterprise plan.
Signature / Usage
# Configure rolling release stages
vercel rolling-release configure --cfg '{"enabled":true,"advancementType":"automatic","stages":[{"targetPercentage":10,"duration":5},{"targetPercentage":50,"duration":10},{"targetPercentage":100}]}'
# Deploy to production (triggers rolling release)
vercel deploy --prod
# Start the rolling release
vercel rolling-release start --dpl <deployment-url>
# Check status
vercel rolling-release fetch
# Advance to next stage (manual approval mode)
vercel rolling-release approve --dpl <deployment-url> --currentStageIndex 0
# Complete rollout (100% traffic)
vercel rolling-release complete --dpl <deployment-url>
# Abort and revert to previous deployment
vercel rolling-release abort --dpl <deployment-url>
# Disable rolling releases
vercel rolling-release configure --cfg 'disable'Stage Configuration
| Field | Description |
|---|---|
targetPercentage | Percentage of traffic routed to the release candidate at this stage |
duration | Time in minutes to remain at this stage before auto-advancing (omit for manual approval) |
advancementType | "automatic" (time-based) or "manual" (explicit approval required) |
- Stages must be in ascending order of
targetPercentage. - The final stage must always be
100. - A stage at
0%serves no traffic to the canary by default, but can be forced via thevcrrForceCanary=truequery parameter.
REST API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/projects/{idOrName}/rolling-release/config | Get rolling release configuration |
| PATCH | /v1/projects/{idOrName}/rolling-release/config | Update configuration |
| DELETE | /v1/projects/{idOrName}/rolling-release/config | Delete configuration |
| GET | /v1/projects/{idOrName}/rolling-release/billing | Get billing info |
| GET | /v1/projects/{idOrName}/rolling-release | Get active rolling release status |
| POST | /v1/projects/{idOrName}/rolling-release/approve-stage | Advance to next stage |
| POST | /v1/projects/{idOrName}/rolling-release/complete | Complete rollout (promote to 100%) |
| POST | /v1/projects/{projectId}/rollback/{deploymentId} | Abort by rolling back |
Traffic Cookie
| Query Parameter | Effect |
|---|---|
vcrrForceCanary=true | Forces the client cookie to target the canary (release candidate) |
vcrrForceStable=true | Forces the client cookie to target the base (stable) deployment |
Cookie name: _vcrr_<hash> where <hash> is derived from the project ID.
How Traffic Routing Works
1. When a user visits a production URL during an active rolling release, Vercel assigns them to a random bucket stored in a cookie (using client IP for consistency across incognito). 2. The bucket determines whether the user sees the base deployment or the release candidate. 3. When a stage advances, some buckets are reassigned; affected users see the new deployment on their next page load.
Notes
- Strongly recommended to enable Skew Protection alongside Rolling Releases to ensure backend API requests from a given page are served by the matching deployment's backend.
- Disabling Rolling Releases via the API while a rollout is in progress does not stop the active rollout — you must still call
completeorrollback. - Each new rolling release clones the project's current configuration; editing the configuration does not affect in-progress rollouts.
- An in-progress rolling release must be resolved (completed or aborted) before a new one can start.
Related
- instant-rollback.md
- rolling-release-deployment.md
- promoting-deployments.md
Vercel for Bitbucket
Vercel for Bitbucket automatically deploys Bitbucket projects, provides Preview Deployment URLs for every pull request, and keeps custom domains updated on production pushes.
Signature / Usage
# Self-hosted (Bitbucket Data Center): use Bitbucket Pipelines
vercel build # build without exposing source to Vercel
vercel deploy --prebuilt # upload .vercel/output to VercelSupported Bitbucket Products
| Product | Notes |
|---|---|
| Bitbucket Free / Standard / Premium | Full native integration |
| Bitbucket Data Center (Self-Hosted) | Via Bitbucket Pipelines |
Bitbucket Permissions Required
Repository Permissions
| Permission | Read | Write | Purpose |
|---|---|---|---|
Web Hooks | Y | N | React to Bitbucket events |
Issues | Y | Y | Required alongside Pull Requests by Bitbucket |
Repository | N | N | Access admin features |
Pull requests | Y | Y | Create deployments per PR, comment with status |
Organization & User Permissions
| Permission | Read | Write | Purpose |
|---|---|---|---|
Team (org) | Y | N | Better team onboarding experience |
Account (user) | Y | N | Associate email with Bitbucket account |
- Importing or connecting a repository requires Admin access to the repository.
Deployment Behavior
| Event | Result |
|---|---|
| Push to any branch | Preview deployment |
| Push/merge to production branch | Production deployment; custom domain updated |
| Pull Request | Preview URL posted as PR comment |
| Multiple pushes to same branch | Latest commit wins; older queued builds cancelled |
Notes
- Bot comments on PRs and commits can be silenced in Project Settings → Git → Connected Git Repository.
- Bitbucket Data Center (self-hosted) uses
vercel build+vercel deploy --prebuiltvia Bitbucket Pipelines. - Bitbucket's "production branch" setting is used as a fallback when
mainandmasterbranches don't exist.
System Environment Variables
Same set as GitHub integration. Key variable difference:
| Variable | Value |
|---|---|
VERCEL_GIT_PROVIDER | bitbucket |
See vercel-for-github.md for the full variable list.
Related
- git-integration.md
- vercel-for-github.md
- environments.md
Vercel for GitHub
Vercel for GitHub automatically deploys GitHub projects, provides Preview Deployment URLs for every PR, and keeps custom domains updated on production pushes.
Signature / Usage
# Trigger GitHub Actions on Vercel deployment events
on:
repository_dispatch:
types:
- 'vercel.deployment.success'GitHub Permissions Required
Repository Permissions
| Permission | Read | Write | Purpose |
|---|---|---|---|
Administration | Y | Y | Create repositories on user's behalf |
Checks | Y | Y | Add checks against source code on push |
Contents | Y | Y | Fetch/write source code for templates |
Deployments | Y | Y | Sync deployment status with GitHub |
Pull Requests | Y | Y | Create deployments per PR, post comments |
Issues | Y | Y | Required alongside Pull Requests by GitHub |
Metadata | Y | N | Read basic repository metadata |
Web Hooks | Y | Y | React to GitHub events |
Commit Statuses | Y | Y | Sync commit status between GitHub and Vercel |
Organization & User Permissions
| Permission | Read | Write | Purpose |
|---|---|---|---|
Members (org) | Y | N | Better team onboarding experience |
Email addresses (user) | Y | N | Associate email with GitHub account |
System Environment Variables
| Variable | Available At | Description |
|---|---|---|
VERCEL | Build + Runtime | Indicates Vercel system env vars are exposed (1) |
CI | Build | Indicates CI environment (1) |
VERCEL_ENV | Build + Runtime | production, preview, or development |
VERCEL_TARGET_ENV | Build + Runtime | System or custom environment name |
VERCEL_URL | Build + Runtime | Generated deployment URL (no https://) |
VERCEL_BRANCH_URL | Build + Runtime | Git branch URL (*-git-*.vercel.app) |
VERCEL_PROJECT_PRODUCTION_URL | Build + Runtime | Shortest production custom domain or vercel.app |
VERCEL_REGION | Runtime | Region ID where the app runs |
VERCEL_DEPLOYMENT_ID | Build + Runtime | Unique deployment identifier |
VERCEL_PROJECT_ID | Build + Runtime | Unique project identifier |
VERCEL_SKEW_PROTECTION_ENABLED | Build + Runtime | 1 if Skew Protection is enabled |
VERCEL_AUTOMATION_BYPASS_SECRET | Build + Runtime | Protection Bypass for Automation secret |
VERCEL_OIDC_TOKEN | Build | OIDC token when OIDC Federation is enabled |
VERCEL_GIT_PROVIDER | Build + Runtime | github |
VERCEL_GIT_REPO_SLUG | Build + Runtime | Repository name |
VERCEL_GIT_REPO_OWNER | Build + Runtime | Repository owner account |
VERCEL_GIT_REPO_ID | Build + Runtime | Repository numeric ID |
VERCEL_GIT_COMMIT_REF | Build + Runtime | Branch name of the triggering commit |
VERCEL_GIT_COMMIT_SHA | Build + Runtime | SHA of the triggering commit |
VERCEL_GIT_COMMIT_MESSAGE | Build + Runtime | Commit message (truncated at 2048 bytes) |
VERCEL_GIT_COMMIT_AUTHOR_LOGIN | Build + Runtime | Commit author username |
VERCEL_GIT_COMMIT_AUTHOR_NAME | Build + Runtime | Commit author full name |
VERCEL_GIT_PREVIOUS_SHA | Build | SHA of last successful deployment (requires Ignored Build Step) |
VERCEL_GIT_PULL_REQUEST_ID | Build + Runtime | PR number triggering the deployment |
Notes
- Personal account repositories require the Vercel user to be the repository Owner.
- Organization repositories require the user to be an Owner or Member with repository access (Outside Collaborators cannot import/connect).
- Bot comments on PRs and commits can be silenced in Project Settings → Git → Connected Git Repository.
deployment_statusGitHub webhook events can be disabled in Project Settings → Git to reduce noise; migrate torepository_dispatchevents instead.- GitHub Enterprise Server requires GitHub Actions integration (
vercel build+vercel deploy --prebuilt). - Fork PRs require authorization from a team member before deploying (disable with Git Fork Protection toggle).
Using GitHub Actions (GHES or Custom CI)
# Preview deployment
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
vercel build
vercel deploy --prebuilt
# Production deployment
vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
vercel build --prod
vercel deploy --prebuilt --prodRelated
- git-integration.md
- environments.md
Vercel for GitLab
Vercel for GitLab automatically deploys GitLab projects, provides Preview Deployment URLs for every merge request, and keeps custom domains updated on production pushes.
Signature / Usage
# Self-managed GitLab: use GitLab Pipelines
vercel build # build without exposing source to Vercel
vercel deploy --prebuilt # upload .vercel/output to VercelSupported GitLab Products
| Product | Notes |
|---|---|
| GitLab Free / Premium / Ultimate / Enterprise | Full native integration |
| Self-Managed GitLab | Via GitLab Pipelines |
GitLab Permissions Required
| Permission | Read | Write | Purpose |
|---|---|---|---|
API | Y | Y | Access API, clone repos, comment on MRs and commits |
- Importing or connecting a repository requires Maintainer access to the repository.
- If the repository belongs to a GitLab group, Maintainer access to the group is also required.
Deployment Behavior
| Event | Result |
|---|---|
| Push to any branch | Preview deployment |
| Push/merge to production branch | Production deployment; custom domain updated |
| Merge Request | Preview URL posted as MR comment |
| Multiple pushes to same branch | Latest commit wins; older queued builds cancelled |
System Environment Variables
Same set as GitHub integration. Key variables:
| Variable | Available At | Description |
|---|---|---|
VERCEL_GIT_PROVIDER | Build + Runtime | gitlab |
VERCEL_ENV | Build + Runtime | production, preview, or development |
VERCEL_URL | Build + Runtime | Generated deployment URL (no https://) |
VERCEL_GIT_COMMIT_SHA | Build + Runtime | SHA of the triggering commit |
VERCEL_GIT_COMMIT_REF | Build + Runtime | Branch name |
VERCEL_GIT_PULL_REQUEST_ID | Build + Runtime | MR ID (empty string if no MR) |
See vercel-for-github.md for the full variable list.
Notes
- Bot comments on MRs and commits can be silenced in Project Settings → Git → Connected Git Repository.
- In GitLab, a merge pipeline can fail while the branch pipeline succeeds, allowing MRs to merge with failing tests. Use Vercel CLI to deploy to avoid this GitLab issue.
- Self-Managed GitLab uses
vercel build+vercel deploy --prebuiltvia GitLab Pipelines.
Related
- git-integration.md
- vercel-for-github.md
- environments.md