Loading...
Loading...
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
npx skill4agent add vercel-labs/agent-skills vercel-cli-with-tokensvercel login--tokenVERCEL_TOKENvercel <command> --token "$VERCEL_TOKEN"--scopeteam_...vercel <command> --token "$VERCEL_TOKEN" --scope <team-slug-or-id>.vercel/project.jsonVERCEL_ORG_ID--projectvercel linkprj_...vercel deploy --token "$VERCEL_TOKEN" --scope <team> --project <project-name-or-id>.vercel/| Variable | Purpose | Equivalent flag |
|---|---|---|
| Auth token | |
| Team/org ID | |
| Project ID | |
VERCEL_ORG_IDVERCEL_PROJECT_ID.vercel/project.json--tokenVERCEL_TOKEN--scopescopevercel.jsoncurrentTeamVERCEL_ORG_ID--projectVERCEL_PROJECT_ID.vercel/project.jsonnpm install -g vercel
vercel --versionnpxnpx vercel <command> --token "$VERCEL_TOKEN"prj_...vercel deploy --token "$VERCEL_TOKEN" --scope <team> --project <project-id> -y --no-waitvercel inspect <deployment-url> --token "$VERCEL_TOKEN"vercel deploy --prod --token "$VERCEL_TOKEN" --scope <team> --project <project-id> -y --no-wait# 1. Does the project have a git remote?
git remote get-url origin 2>/dev/null
# 2. Is it already linked to a Vercel project?
cat .vercel/project.json 2>/dev/null || cat .vercel/repo.json 2>/dev/null.vercel/project.json.vercel/repo.jsonvercel link --repo --token "$VERCEL_TOKEN" --scope <team> -y.vercel/repo.jsonvercel link--repovercel link --token "$VERCEL_TOKEN" --scope <team> -y.vercel/project.jsonvercel link --project <project-name> --token "$VERCEL_TOKEN" --scope <team> -yorgId.vercel/project.json.vercel/repo.json--scopegit add .
git commit -m "deploy: <description of changes>"
git pushmainsleep 5
vercel ls --format json --token "$VERCEL_TOKEN" --scope <team>deploymentsvercel deploy --token "$VERCEL_TOKEN" --scope <team> -y --no-wait--no-waitvercel inspect <deployment-url> --token "$VERCEL_TOKEN"git clone <repo-url>
cd <repo-name>vercel link --repo --token "$VERCEL_TOKEN" --scope <team> -y.vercel/.vercel/project.jsonvercel linkprojectIdorgId.vercel/repo.jsonvercel link --repoorgIdremoteNameprojects--projectVERCEL_ORG_IDVERCEL_PROJECT_IDvercel project inspectvercel lsvercel link.vercel/vercel whoami --token "$VERCEL_TOKEN"--project# Set for all environments
echo "value" | vercel env add VAR_NAME --token "$VERCEL_TOKEN" --scope <team>
# Set for a specific environment (production, preview, development)
echo "value" | vercel env add VAR_NAME production --token "$VERCEL_TOKEN" --scope <team>
# List environment variables
vercel env ls --token "$VERCEL_TOKEN" --scope <team>
# Pull env vars to local .env file
vercel env pull --token "$VERCEL_TOKEN" --scope <team>
# Remove a variable
vercel env rm VAR_NAME --token "$VERCEL_TOKEN" --scope <team> -y# List recent deployments
vercel ls --format json --token "$VERCEL_TOKEN" --scope <team>
# Inspect a specific deployment
vercel inspect <deployment-url> --token "$VERCEL_TOKEN"
# View build logs
vercel logs <deployment-url> --token "$VERCEL_TOKEN"# List domains
vercel domains ls --token "$VERCEL_TOKEN" --scope <team>
# Add a domain to the project
vercel domains add <domain> --token "$VERCEL_TOKEN" --scope <team>--token--scope--projectvercel login.vercel/--format jsonvercel ls-yAuthentication requiredvercel whoami --token "$VERCEL_TOKEN"--scopevercel whoami --token "$VERCEL_TOKEN" --scope <team>vercel logs <deployment-url> --token "$VERCEL_TOKEN"package.jsonvercel env addvercel.jsonpackage.jsonvercel.jsonnpm install -g vercel