| name | Vercel CLI Tokens Revanced |
| description | DEPLOY and manage projects on Vercel using token-based authentication without interactive login. Locate VERCEL_TOKEN from environment or .env files, then deploy using CLI commands. NEVER pass token as --token flag, export as env var. Trigger: "deploy to vercel", "set up vercel", "add environment variables to vercel".
|
| metadata | {"author":"vercel","version":"2.0.0","last_updated":"2026-06-28T00:00:00.000Z"} |
| stacks | ["Vercel CLI","Next.js 16"] |
| related_skills | ["vercel-deploy-revanced"] |
| category | vercel-revanced |
| version | 2.0.0 |
Vercel CLI with Tokens
IDENTIFY: When to Activate
Activate when:
- Working with Vercel CLI using access tokens (not interactive login)
- Deploying in CI/CD environment
- User provides VERCEL_TOKEN but no CLI session
EXECUTE: Instructions
Step 1: Locate Token (Check in Order)
1. Check environment: printenv VERCEL_TOKEN
2. Check .env: grep '^VERCEL_TOKEN=' .env
3. Check .env for different name: grep -i 'vercel' .env (look for vca_ tokens)
4. If none found: Ask user to create token at vercel.com/account/tokens
CRITICAL: Export VERCEL_TOKEN, NEVER pass as --token flag:
export VERCEL_TOKEN="vca_abc123"
vercel deploy
vercel deploy --token "vca_abc123"
Step 2: Locate Project ID and Team
printenv VERCEL_PROJECT_ID
printenv VERCEL_ORG_ID
grep -i 'vercel' .env 2>/dev/null
Extract team slug from project URL:
echo "$PROJECT_URL" | sed 's|https://vercel.com/||' | cut -d/ -f1
VERCEL_ORG_ID + VERCEL_PROJECT_ID: Must be set TOGETHER, setting only one causes error. If both set, CLI uses them directly, skipping .vercel/ directory.
Step 3: Deploy
vercel deploy -y --no-wait --scope <team-slug>
vercel deploy --prod -y --no-wait --scope <team-slug>
vercel inspect <deployment-url>
Step 4: Manage Environment Variables
echo "value" | vercel env add VAR_NAME --scope <team-slug>
vercel env ls --scope <team-slug>
vercel env pull --scope <team-slug>
vercel env rm VAR_NAME --scope <team-slug> -y
Step 5: Inspect Deployments
vercel ls --format json --scope <team-slug>
vercel inspect <deployment-url>
vercel inspect <deployment-url> --logs
vercel logs <deployment-url>
WORKING AGREEMENT: Mandatory Rules
- NEVER pass VERCEL_TOKEN as
--token flag, export as env var
- Check environment + .env files for token BEFORE asking user
- DEFAULT to preview deployments, production only when explicitly asked
- ASK before pushing to git, never push without approval
- DO NOT modify
.vercel/ files directly, CLI manages this
- DO NOT curl/fetch deployed URLs, just return the link
- Use
--format json when structured output helps
- Use
-y on commands to avoid interactive blocking
TROUBLESHOOTING
| Issue | Check | Fix |
|---|
| Token not found | `printenv | grep vercel+.env` |
| Auth error | vercel whoami | Token expired/invalid; ask for fresh |
| Wrong team | vercel whoami --scope <team-slug> | Fix scope |
| Build failure | vercel inspect <url> --logs | Check deps, env vars, config |
| CLI not installed | command -v vercel | npm install -g vercel |