ConfigHub · Durable config for coding agents
Docs / examples/walkthroughs/starter-vercel.md Source on GitHub →

An app on Vercel, with production behind your approval

Connect a Vercel app and keep a reason for every approved production setting. Try a personal Hobby project or use the local stand-in without a Vercel account.

╭─ ConfigHub · Vercel 1:1 live mapping ──────────────────────────╮
│ ├── preview/staging ✓ EDGE_CACHE_SECONDS=30 (agent edits)      │
│ └── production      ⏳ EDGE_CACHE_SECONDS=60 (cub inbox approve)│
╰────────────────────────────────────────────────────────────────╯

Quick start

You need: a local hub with starters switched on, and the app's folder linked to its Vercel project.

By handAsk your agent
Connect the appcub repo adopt shop --live"Set up my Vercel shop so production settings wait for my approval, and keep production's region."
Change a settingEdit the settings file and propose the change with its reason (step 5)"Make prices show within thirty seconds; I'll approve production myself."
Approve productioncub inbox list, then cub inbox approve ORDERYou approve it yourself.
Undocub repo rollback shop-live --change-order ORDER --reason "The sale is over""Propose restoring the previous cache setting. I’ll approve delivery."

Staging takes each change at once. Production keeps its value until you approve, and each value keeps its reason.

Without ConfigHub: your agent sets the value with vercel env or in the dashboard, production included, and the next session has no record of why.

Deeper dive

The rest of this page is the full version: every command, a path that needs no Vercel account, the move to a shared hub, what an agent leaves to you, and how this was tested.

Show the full walkthrough

Human

What you need

An unpacked confighub mini package and Python 3. Step 8 needs a sign-in to your organization's shared hub.

Steps

  1. Start a hub of your own; it becomes cub's current context. MINI is the unpacked package. CUB_MINI_STARTERS switches starters on: a starter is a short file that gives one kind of app its usual settings, each with a reason.
    export MINI=/absolute/path/to/unpacked-confighub-mini
    export PATH="$MINI/bin:$PATH" CUB_MINI_STARTERS="$MINI/starters"
    "$MINI/bin/confighub-mini-app" mini install-plugin "$HOME/.confighub"
    cub local start --name shop --use
    export LOCAL_HUB=$(cub context get -o jq=.name)

    Real Hobby project. For a new Next.js app, use Next.js on Vercel. For a personal, noncommercial test app, sign in with the Vercel CLI, use vercel teams ls to find the Hobby scope and set WALKTHROUGH_VERCEL_SCOPE to its slug and choose a unique disposable project name. A Pro team can use a disposable project in its own scope. Use a package whose adoption help lists --live. Keep the Vercel sign-in with the person or delivery service. A user with direct production access in Vercel can still write there.

  • Create a test app with an /api/settings route that returns its EDGE_CACHE_SECONDS value (or baseline if absent), and write EDGE_REGION=fra1 in shop/.env.production. Run vercel link --cwd shop --scope "$WALKTHROUGH_VERCEL_SCOPE" --project "$PROJECT" and vercel deploy --cwd shop --scope "$WALKTHROUGH_VERCEL_SCOPE" --prod. Copy the production URL into URL; curl -fsS "$URL/api/settings" should report the baseline.
  • Run cub repo adopt shop --live and read cub repo receipts shop --setup. Before the first delivery, run cub inbox approve shop-live/connect in the owner's context. Set READER=$(CUB_CONFIG="$PWD/reader" cub context get -o jq=.name) after the separate reader sign-in in step 4. Grant shop-delivery read access to the base order and its attestations using cub space update shop-base --permission View:serviceaccount:shop-delivery --permission ViewChildren:serviceaccount:shop-delivery, then use the reader sign-in in step 4.
  • To deliver each approved order, use its exact name as ORDER, read REV=$(cub unit get app --space shop-live -o jq=.Unit.HeadRevisionNum) as owner, then run the cub plugin from the separate reader context. Check the production alias with vercel inspect "$URL" --scope "$WALKTHROUGH_VERCEL_SCOPE" --json and match its deployment ID to the receipt. Read it with curl -fsS "$URL/api/settings".

    CUB_CONFIG="$PWD/reader" "$MINI/starters/addons/vercel/run" --live --dir "$PWD/shop" \
      --scope "$WALKTHROUGH_VERCEL_SCOPE" --project "$PROJECT" --space shop-live \
      --order "$ORDER" --revision "$REV" --context "$READER" --keys EDGE_CACHE_SECONDS apply
  • Propose the sale cache change with step 5. Check that the endpoint keeps its old value while the order waits. After owner approval, run the same delivery and check the new setting. To undo on mini.5, use cub repo rollback shop-live --change-order "$ORDER" --reason "The sale is over". Read the rollback order, then approve and deliver it separately. The mini.4 Hobby test used a file upload to propose the rollback. Follow steps 8 and 9 to copy the app and verify approval on the shared hub. Remove the test project and the local app when finished.
bash "${WALKTHROUGH_VERCEL_SCRIPT:?set to the path to examples/vercel-hobby.sh}"
  1. For the no-account path, make the app and its stand-in Vercel project. shop/.vercel/project.json links the app to the project, as vercel link does. In shop-project, state.json holds the project's settings, with production in Frankfurt (fra1), and bin/vercel answers as the vercel command does. The script deliver sends production's approved settings to the project and prints them. Last, the Vercel cub plugin, a small program in the package, reads the project's settings into shop/.env.staging and shop/.env.production.
    export MINI=/absolute/path/to/unpacked-confighub-mini
    mkdir -p ~/starter-example/shop/.vercel ~/starter-example/shop-project/bin; cd ~/starter-example
    printf '{"projectId":"prj_shop","orgId":"team_shop"}\n' > shop/.vercel/project.json
    printf 'LOG_LEVEL=warn\n' > shop/.env
    printf 'ConfigHub CLI contract stand-in v1\n' > shop-project/.vercel-contract-stand-in
    cp "$MINI/examples/extensions/delivery/vercel-standin" shop-project/bin/vercel; chmod 700 shop-project/bin/vercel
    cat > shop-project/state.json <<'EOF'
    {"envs": [{"id": "e1", "key": "SHOP_CURRENCY", "value": "EUR", "type": "encrypted", "visibility": "config", "target": ["preview", "production"]},
     {"id": "e2", "key": "EDGE_REGION", "value": "fra1", "type": "encrypted", "visibility": "config", "target": ["production"]}],
     "writes": 0, "redeploys": 0, "deployments": {"preview": {"SHOP_CURRENCY": "EUR"}, "production": {"SHOP_CURRENCY": "EUR", "EDGE_REGION": "fra1"}}}
    EOF
    cat > deliver <<'EOF'
    CUB_CONFIG="$PWD/reader" VERCEL_STANDIN_AUTH=owner python3 "$MINI/examples/extensions/delivery/vercel.py" apply --provider-root shop-project --target production --space shop-live --unit app --project prj_shop --scope team_shop --deployment shop.vercel.invalid --dir shop --receipt receipt.json > /dev/null
    python3 -c 'import json; print("Production runs with", json.load(open("shop-project/state.json"))["deployments"]["production"])'
    EOF
    VERCEL_STANDIN_AUTH=owner python3 "$MINI/examples/extensions/delivery/vercel.py" import --provider-root shop-project --dir shop --project prj_shop --scope team_shop --deployment shop.vercel.invalid
    Imported environment files; owner can now run cub repo adopt.
  2. Deploy it. cub repo adopt connects the app with the Vercel starter. The hub keeps three copies of the settings: shop-base, shared by the other two; shop-staging; and shop-live, for production. The starter adds three settings, each with its reason, and leaves your Frankfurt region alone.
    cub repo adopt shop --provider-root shop-project
      Leaves EDGE_REGION alone in live: it is set already, EDGE_REGION=fra1, by you, in .env.production.
  3. Approve production and deliver it. Then sign a separate cub configuration in with the reader key the starter made, which can read production and nothing else, and deliver with it.
    cub inbox approve shop-live/connect --yes --note "The starter's settings suit the shop"
    CUB_CONFIG="$PWD/reader" cub auth login --new-context --private-key="$HOME/.confighub/keys/shop-delivery.jwk" --server "$(cub context get -o jq=.coordinate.serverURL)" > /dev/null
    sh deliver
    Approved shop-live/connect. Production can now be delivered as it was when you read it.
    Production runs with {'SHOP_CURRENCY': 'EUR', 'EDGE_REGION': 'fra1', 'EDGE_CACHE_SECONDS': '60', 'EDGE_MAX_DURATION': '10', 'LOG_LEVEL': 'warn'}
  4. Update it. Edit the settings file as usual, and propose the change with its reason. Staging takes it at once. Production waits under a change order, the hub's request to change production, until you approve it.
    echo 'EDGE_CACHE_SECONDS=30' >> shop/.env
    UPDATE_ORDER_REPORT=$(cub repo upload shop --component shop --change-desc "Prices must show within thirty seconds during the sale")
    printf '%s\n' "$UPDATE_ORDER_REPORT"
    UPDATE_ORDER=$(printf '%s\n' "$UPDATE_ORDER_REPORT" | sed -nE 's/^.*mini approve (shop-base\/upload-[a-z0-9-]+)[[:space:]]*$/\1/p')
  5. Approve the update and deliver it. Read the exact update and its diff in cub inbox list before you approve.
    cub inbox list
    cub inbox approve "${UPDATE_ORDER:?Find the exact order from the proposal first}" --yes --note "Sale week" && sh deliver
    Production runs with {'SHOP_CURRENCY': 'EUR', 'EDGE_REGION': 'fra1', 'EDGE_CACHE_SECONDS': '30', 'EDGE_MAX_DURATION': '10', 'LOG_LEVEL': 'warn'}
  6. Propose a rollback with cub repo rollback. The shared base takes the restored value and production keeps its current value. As owner, approve that rollback before delivering it.
    ROLLBACK_ORDER_REPORT=$(cub repo rollback shop-live --change-order "${UPDATE_ORDER:?Find the exact order from the proposal first}" --reason "The sale is over")
    printf '%s\n' "$ROLLBACK_ORDER_REPORT"
    ROLLBACK_ORDER=$(printf '%s\n' "$ROLLBACK_ORDER_REPORT" | sed -nE 's/^.*mini approve (shop-base\/upload-[a-z0-9-]+)[[:space:]]*$/\1/p')
    cub unit data app --space shop-base | grep -qx EDGE_CACHE_SECONDS=60 && cub unit data app --space shop-live | grep -qx EDGE_CACHE_SECONDS=30 || exit 1
    python3 -c 'import json; assert json.load(open("shop-project/state.json"))["deployments"]["production"]["EDGE_CACHE_SECONDS"] == "30"'
    cub inbox list
    cub inbox approve "${ROLLBACK_ORDER:?Find the exact order from the proposal first}" --yes --note "Back to a minute" && sh deliver
    Set back in the shared settings (shop-base), with the reason: The sale is over
      EDGE_CACHE_SECONDS: 30 → 60
    Production runs with {'SHOP_CURRENCY': 'EUR', 'EDGE_REGION': 'fra1', 'EDGE_CACHE_SECONDS': '60', 'EDGE_MAX_DURATION': '10', 'LOG_LEVEL': 'warn'}
  7. Move it to your team's shared hub. Sign in once (auth login opens a browser). The app's name there, TEAM_APP, starts with your user name, so it does not clash with a teammate's.
    cub context create shared --server https://hub.confighub.com
    cub --context shared auth login
    export TEAM_APP="${WALKTHROUGH_PREFIX:-$USER-}shop"

    The copy keeps every value and its reason. Check the destination's approval rule before delivery. The commands after the copy install or verify the destination workflow and bind it to the app on a hub of version 0.11.1 or later. On an older hub, run cub --context shared mini require-approval "$TEAM_APP" --variant live.

    cub --context shared mini copy --from-context "$LOCAL_HUB" shop --name "$TEAM_APP"
    ME=$(cub --context shared user get "$(cub --context shared context get -o jq=.coordinate.user)" -o jq=.User.UserID)
    cub --context shared changeworkflow create --allow-exists --space workflows "$TEAM_APP-live-approval" --stage live --attestation-prerequisite approval --attestation-prerequisite-from-users approval="$ME" --stage-prerequisites live=approval
    WF=$(cub --context shared changeworkflow get --space workflows "$TEAM_APP-live-approval" -o jq=.ChangeWorkflow.ChangeWorkflowID)
    COMP=$(cub --context shared component get "$TEAM_APP" -o jq=.Component.ComponentID)
    echo "{\"RequireChangeWorkflow\": true, \"AllowedChangeWorkflowIDs\": [\"$WF\"]}" | cub --context shared api PATCH "component/$COMP" --content-type application/merge-patch+json --data - > /dev/null
  8. Check that production in the shared hub waits for you, without changing anything there: the app takes a change only through its change workflow (the first true), and that workflow's production stage needs an approval (the second).
    cub --context shared component get "$TEAM_APP" -o jq=.Component.RequireChangeWorkflow
    cub --context shared changeworkflow get --space workflows "$TEAM_APP-live-approval" -o jq='.ChangeWorkflow.Stages[] | select(.Name == "live") | .Prerequisites | length > 0'
    true
    true
  9. Delete the app from your own hub, now that the shared hub holds it. The Vercel project keeps the settings it was last given.
    cub component delete --recursive --detach shop
    cub space delete --recursive shop-file-proposals
    Successfully deleted component shop (ID)

Undo it

In the shared hub: cub --context shared component delete --recursive --detach "$TEAM_APP" and cub --context shared changeworkflow delete --space workflows "$TEAM_APP-live-approval". Here: cub local uninstall --name shop --delete-data and rm -rf ~/starter-example.

What you have now: the alias serves the approved cache

Agent

For trials use the fixture. Deploy with step 3 or cub repo adopt shop --live, then give the owner the connect order. Update with step 5, show staging and live, and hand off the update order. Undo by proposing the rollback in step 7. Hand the owner the order and wait for approval before delivery. Check the endpoint after approved delivery. Move with steps 8 and 9 and read the destination's approval rule. Delete with step 10 and confirm only the disposable Hobby project is gone. Keep provider credentials with delivery. Never approve production or edit the fixture's state.

Testing

Set up my Vercel shop so production settings wait for my approval, and keep production's region. The app is in shop; shop-project is a local stand-in for its Vercel project.

Make prices show within thirty seconds; I'll approve production myself.

Propose restoring the previous cache setting. I’ll approve delivery.

Move the shop to our shared hub. Keep the production region and require my approval for production changes. The shared context is named shared, and the destination is in TEAM_APP.

Remove the local shop after the copy.

This proves: the real Hobby run checks what the production endpoint serves before and after first delivery, an update and a rollback. The no-account run checks delivery to the local stand-in and the move to a shared hub.

Live Hobby test on published mini.15 and plugin 0.97.0, 17 November 2026. We started with a linked disposable Vercel app and no local ConfigHub setup. We ran the plugin's staging command directly from its published tag. It downloaded and verified mini.15 for macOS arm64, started a local hub, and imported the app's readable production setting.

  • The agent's scoped key set the hub's staging banner to preview-coral and proposed approved-coral for production. The hub refused approval from that key, the delivery command refused to send the pending change, and the live Vercel endpoint still served baseline.
  • The owner used a temporary page on the test Mac to answer the CLI's two prompts. They approved the exact change and then authorized delivery to the linked Vercel project. The first browser submission returned a 403. Both confirmations worked after we fixed the form. The page was a test helper. The published flow asks for these confirmations in the owner's terminal.
  • ConfigHub applied revision 3. The delivery comparison matched that revision to Vercel's setting, and a separate request to the public production endpoint returned approved-coral.
  • We deleted the Vercel project and stopped the local hub and the temporary page. Vercel could no longer find the project or deployment. The public endpoint briefly kept answering after deletion, then returned 404 DEPLOYMENT_NOT_FOUND on both a normal and a fresh request.

This run covered connecting an existing app and delivering its first approved change. The rollback and shared-hub results below come from separate runs.

Test results

Results, 14 November 2026, confighub mini 0.11.1-mini.5. Figures from this page's own test runs, shown here for whoever checks the page; they are not a promise.

  • Scripted run: passed, 64 seconds for the steps, within the page's budget of 200; each of the three planted faults (a changed quoted line, a budget of zero seconds, a check that holds on a fresh hub) was caught.
  • Environment, Published confighub mini 0.11.1-mini.5 with its own plugin (0.88.0), on this computer, with no Vercel account: a local stand-in for the Vercel project, and a shared hub on confighub.com (the Kubara organization) for the shared hub. Approvals were scripted: the test script ran the person's approve and deliver commands. This is the no-account path, not a real Vercel deployment. After each run the runner removed the hubs it started and everything it made in the shared hub.
  • Agent runs: a pilot, 3 runs per arm on each of claude-sonnet-5-5, claude-opus-5-5. Arms: a is ordinary tools only; b is the Claude plugin, the local hub and this page as reading; c is the Claude plugin and the local hub, without this page.
ArmModelChecks passedMedian secondsMedian costCommands left for the person (median)
aclaude-opus-5-53/9 (+6 not applicable)254.2$1.3774
bclaude-opus-5-515/15180.6$0.5774
cclaude-opus-5-514/15208.6$0.9823
aclaude-sonnet-5-50/9 (+6 not applicable)86.4$0.4297
bclaude-sonnet-5-515/1596.3$0.2453
cclaude-sonnet-5-513/15121.2$0.3813

No agent approved or refused a change to production.

Simulated persons, not people: 10 per run, each a claude-haiku-5-5 model playing one of ten fixed personas, reading only what a person would see. The next step they were offered: "Production waited for your yes. When you say yes, want that exact value to reach your real Vercel project, and only that value?" It offers more of the tier the person has, not a step up.

The real-project offer stays at the "did not change" moment. The backup-approver offer waits for a second reviewer to be needed for production on the shared hub. The saved mini.5 pilot below tested the old backup-approver wording at "did not change"; it did not test this wording or the second-reviewer moment, In a rejudge on two of those saved sessions, four of ten simulated readers wanted to try real Vercel delivery now. None saw the new backup-approver offer because no second reviewer was needed.

The Claude plugin offers each step once after the matching line. Offered is the share of persons shown that step; want it now and later are over them.

ArmModelPersonsOfferedNoticedWant the next step nowLaterIn the way
aclaude-opus-5-5300%100%n/an/a93%
bclaude-opus-5-530100%100%33%60%90%
cclaude-opus-5-530100%100%30%70%97%
aclaude-sonnet-5-5300%100%n/an/a83%
bclaude-sonnet-5-530100%100%60%40%93%
cclaude-sonnet-5-530100%100%23%77%83%

Earlier records of this page, kept with their own date, package and scope:

  • Scripted run on confighub mini 0.11.1-mini.2, 14 November 2026: passed, 95 seconds for the steps, within the page's budget of 200.
  • Scripted run on Vercel Hobby (local build with the mini.1 server and CLI): passed, 467 seconds for the steps, within the page's budget of 1200.
  • In the Hobby test, the running endpoint held its prior value while each order waited. After three separate owner approvals it served 60, then 30, then 60 from revisions 3, 4 and 5. The production alias matched the deployment in each receipt. The test project was deleted and the lookup returned project not found. The published mini.2 run used the stand-in and verified the copy to a shared hub separately.
  • A separate build of the updated starter selected approved starters-approved/vercel@2 when asked to connect a linked project. Staging got the 60-second setting, production kept its Frankfurt region, and the same checkout did not match without opt-in. This check used a local hub and a test link file.
  • The checksum-verified macOS arm64 mini.4 package selected starters-approved/vercel@2 with --live and kept the Frankfurt override. Without the flag, the link did not select the Vercel starter. This was a clean hub with a test link, and it was removed afterward. The live Hobby endpoint was not exercised by this run.
  • Live Hobby rerun on checksum-verified mini.4 for macOS arm64, 14 November 2026: the disposable project served the baseline. The starter prepared revision 3 with a 60-second cache and kept the Frankfurt region. The adapter refused delivery before the first owner approval, and the production endpoint still served the baseline. The runner timed out waiting for that approval. The Vercel project was deleted and a subsequent lookup returned project not found. The local hub was stopped. The update and rollback on mini.4 did not run.
  • A fresh live run with the same published mini.4 package completed first delivery. After owner approval, the Hobby production alias matched the receipt for revision 3 and the endpoint returned a 60-second cache. Staging then took the 30-second change. The adapter refused the pending update, and the endpoint continued serving 60 seconds. The run timed out at the second owner approval. The update and rollback were not delivered. The disposable project and test hub were removed, and a provider lookup confirmed the project was gone.
  • The live Hobby walkthrough passed on checksum-verified mini.4 for macOS arm64 using a disposable project and three separate human approvals. The adapter refused each pending order; the endpoint kept serving its baseline, then 60 seconds, then 30 seconds while the respective orders waited. After approval and delivery it served 60 seconds on revision 3, 30 on revision 4, and 60 again on rollback revision 5. The production alias matched the ready deployment in each receipt. The rollback receipt had the same settings hash as revision 3. The live run used the walkthrough script in an isolated mini with an extended approval window. A provider lookup confirmed the project was deleted, and the test hub was stopped and removed.
  • Scripted no-account run on checksum-verified mini.5 for macOS arm64: passed, 66 seconds for the steps, within the page's budget of 200. The shared base restored 60 seconds and the live copy and stand-in held 30 while approval was pending. After the scripted owner approved delivery, the stand-in served 60. The shared-hub copy and read-only approval check passed.