Skip to content

Vercel ​

Clanker supports querying and managing Vercel projects, deployments, domains, and storage stores through the Vercel REST API. The official vercel CLI is required only for deploys and a handful of mutations that the REST API does not model well — read-only queries do not need it.


Authentication ​

Vercel authentication uses a personal API token.

Obtaining a token ​

  1. Visit vercel.com/account/tokens.
  2. Create a new token with the scope of the team(s) you want to query (or leave team scope empty for personal).
  3. Copy the token immediately — it's only shown once.

Configuration ​

Add your API token to ~/.clanker.yaml:

yaml
vercel:
  api_token: "vAbcXyz..."
  team_id: ""              # optional — only for team-scoped accounts

Alternatively, set environment variables:

bash
export VERCEL_TOKEN="vAbcXyz..."
export VERCEL_TEAM_ID="team_xxxxxxxxxxxx"   # optional

Token resolution order ​

  1. vercel.api_token in the config file
  2. VERCEL_TOKEN environment variable
  3. VERCEL_API_TOKEN environment variable

Team ID resolution order ​

  1. vercel.team_id in the config file
  2. VERCEL_TEAM_ID environment variable
  3. VERCEL_ORG_ID environment variable

Team scoping is optional — personal accounts omit the team ID. When present, every API call is scoped to that team automatically.


Prerequisites ​

The vercel CLI is required only for deploy-side operations (deploy, redeploy, env add via stdin, domain add). REST queries — projects, deployments, env vars list, KV/Blob/Postgres/Edge-Config stores — do not need the CLI.

bash
# All platforms
npm install -g vercel

# Verify
vercel --version

Querying Vercel ​

Explicit --vercel flag ​

bash
clanker ask --vercel "what's deployed to production right now?"
clanker ask --vercel "show me failed deployments from the last day"
clanker ask --vercel "which projects don't have a custom domain?"

Conversation history is preserved per-team at ~/.clanker/conversations/vercel_<teamid>.json, so follow-ups stay in context.

Automatic routing ​

When a vercel.json is present in the working directory, Clanker's deploy analyzer picks up Vercel as a candidate target automatically.


Supported services ​

ServiceOperationsBacked by
Projectslist, get, create, delete, update settingsREST
Deploymentslist, get, events, cancel, redeploy, promote (rollback)REST + CLI for deploy
Domainslist, add, remove, transferREST
Environment variableslist, create, update, delete, pullREST + CLI for stdin-piped values
Teamslist, members, switch contextREST
KV stores (Redis)list, get, createREST
Blob storeslist, get, createREST
Postgres databaseslist, get, createREST
Edge Config storeslist, get, itemsREST
Analyticsusage summary, daily time-seriesREST
Logsdeployment build + runtime events (SSE)REST stream
Aliaseslist, assign, removeREST

Static commands ​

Direct REST queries without AI interpretation:

bash
# Projects + deployments
clanker vercel list projects
clanker vercel list deployments --project my-app
clanker vercel get project my-app
clanker vercel get deployment dpl_abc123

# Deploy management
clanker vercel logs dpl_abc123
clanker vercel cancel dpl_abc123
clanker vercel redeploy dpl_abc123
clanker vercel rollback my-app v3

# Env vars (values are piped via stdin)
clanker vercel list env --project my-app
clanker vercel env add API_KEY --project my-app

# Domains
clanker vercel list domains
clanker vercel domain add example.com --project my-app

# Storage
clanker vercel list kv
clanker vercel list blob
clanker vercel list postgres
clanker vercel list edge-configs

# Analytics
clanker vercel analytics --period 30d

Add --raw for unformatted JSON output suitable for piping to jq.

Observability-oriented prompts can pull deployment events, runtime logs, analytics, domains, and storage context:

bash
clanker ask --vercel "which deployments failed today?"
clanker ask --vercel "show runtime errors for the latest deployment"

Deploy + redeploy ​

bash
# Deploy from the working directory
clanker vercel deploy . --project my-app --prod

# Redeploy the latest version
clanker vercel redeploy dpl_abc123

# Roll back to a prior version
clanker vercel rollback my-app

Maker pipeline ​

Generate AI-authored plans for Vercel changes:

bash
# Generate a plan
clanker ask --vercel --maker "deploy the staging branch and promote it to prod"

# Apply an approved plan
clanker ask --apply --plan-file plan.json

The maker validator blocks destructive operations without --destroyer, blocks raw vercel logout, and pipes stdin for vercel env add so values are never echoed back through the LLM.


Backend credentials ​

If you're using the Clanker backend credential store, store your Vercel token under the vercel provider:

bash
clanker credentials store vercel --api-token "vAbcXyz..." --team-id "team_xxxxxxxxxxxx"

The CLI falls back to the backend store when neither vercel.api_token nor VERCEL_TOKEN is set locally.


Desktop app ​

The Clanker Cloud desktop app exposes Vercel as a first-class provider:

  • Onboarding wizard — Vercel step validates your token and offers a team-picker dropdown after the connection test.
  • Profile settings — paste a token + optional team ID; values persist locally in SQLite.
  • Infrastructure scan — projects, deployments, domains, KV/Blob/Postgres/Edge-Config stores are pulled into the unified resource graph.
  • Vercel window — per-tab views for Overview / Projects / Deployments / Domains / Storage / Logs / Chat / Analytics, with redeploy + cancel actions and a live log viewer.
  • Log streaming — the backend proxies Vercel's deployment-events SSE through the local API server so the desktop UI gets near-real-time build + runtime logs.