A Next.js app on Vercel
Connect an app that already runs on Vercel. Give your agent a staging copy of its settings and review what goes to production.
Connect and approve with two commands
You need Claude Code or Codex CLI with the ConfigHub plugin, a signed-in Vercel CLI, and an app folder already linked to a running Vercel project with vercel link. It works on your real app: connecting only reads from Vercel, and nothing changes there until you approve a production change. Approving deploys the app from this folder as it is, with the approved settings, so commit or set aside any work you do not want in production first. For a first try, pick a readable, non-secret setting such as APP_BANNER.
Connect.
- Claude Code: In the app folder, run
/confighub:staging(or askAttach ConfigHub to this Vercel app so production settings wait for my approval), then open a fresh Claude Code session in the same folder to pick up the agent’s scoped key. - Codex CLI: Ask
Attach ConfigHub to this Vercel app so production settings wait for my approval.Then open a fresh session with the printedrun-codexlauncher.
- Claude Code: In the app folder, run
- Ask for a change. Ask:
Set APP_BANNER to coral in staging. Propose the same change for production and show me the approval command.This updates the hub’s staging settings while production waits. Review and deliver. In your own terminal, paste the exact command your agent printed, including the name of the change order. On the first delivery you’ll confirm two things:
- Approve the change: verify the old and new values.
- Authorize delivery: confirm the Vercel project name once for future approved deliveries (every production change still requires its own approval).
When the command reports Live on Vercel, check your running app or its settings endpoint for the new value. See what ran on a real Hobby project.
Use the Next.js starter and try Vercel Preview
Use this path when building a Next.js app from scratch, testing on a Vercel Preview deployment before approving production, or sharing the setup with a second app.
Step-by-step manual starter & Vercel Preview setup
You’ll need a local hub on your PATH.
- Create a Next.js app with
nextinpackage.jsonand an/api/settingsroute that reads a non-secret setting such asAPP_BANNERat request time. - Link a disposable Vercel project:
vercel link --yes --scope SCOPE --project APP. Vercel requires a project’s first deployment to use Production; you can stage a placeholder build withvercel deploy --prod --skip-domain(Vercel staged deployments). - Put
APP_BANNER=preview-coralin.env.stagingandAPP_BANNER=baselinein.env.production. Keep secrets in your existing secret store and exclude.env.localfrom deployment uploads. - Enable starters (
export CUB_MINI_STARTERS=on) and runcub mini adopt . --name APP --live. The plan appliesnextjs-vercelafterverceland leaves values you already set untouched. - Update staging when needed:
cub mini set APP APP_BANNER=preview-coral --variant staging --change-desc "Show the coral banner in Preview"(inspect withcub unit data app --space APP-staging). - Test on a Vercel Preview URL:
vercel deploy --environment preview --env APP_BANNER=preview-coral, then verify withvercel curl /api/settings --deployment PREVIEW_URL. - Inspect pending production changes with
cub mini waiting, then review the exact production order in your own terminal. Check the proposed value and the Vercel project before authorizing delivery. A staging-only edit creates no production proposal. Ask for that proposal when you want to ship it. Runcub mini deliver APP --compareat any time to check for drift (Vercel production delivery).
Second app from the same setup: Run cub mini adopt ./second-app --name SECOND --pattern APP to reuse the shared settings while giving the second app its own APP_BANNER and approval gate.