Connect an app you already have without rewriting its config files, fighting fiddly env variables, or changing how it deploys. ConfigHub keeps separate base, staging, and live (production) copies in a local hub so your agent can make changes without breaking things, you can deploy to any service easily, and you can always go back cleanly (Learn step by step · Going back).
To see staging and production in the app as it already runs, step by step with a small Python app, follow the walkthrough.
You choose the app, ask for a change and open the address. Your agent changes the preview setting, checks the response and leaves it running. Your working files and both staging and production settings stay as they were.
Prerequisites: The Claude Code plugin or Codex setup, an app that reads a setting from .env, .env.local or .env.development, and lsof installed. The preview runs your app the way it already runs: the dev or start script in package.json, the web: line of a Procfile, or a command you give. Next.js, Vite and Python apps work this way, and your files are not changed. The app has to listen on 127.0.0.1 or take the address and port it is given; a command that listens on every network address is refused, and you can give it after -- with an option that keeps it on this machine. No app yet? Ask your agent to make a small sample app first.
In the app folder, ask for the change you want:
Try “Evening collection” as the heading. Keep the usual board as it is. I’d like to open the preview again tomorrow.Pick a setting your app already reads. Say yes when your agent offers to attach the app locally. The first download can take a minute (package size); it runs two local 127.0.0.1 processes (ConfigHub and PostgreSQL, no Docker), and cub local uninstall --delete-data removes them and their data cleanly.
You can try a change you care about the same way. For example, ask a queue app to try a larger batch before a busy weekend. With 360 sample jobs, our usual app returned three batches of 120. The preview returned one batch of 240 and one of 120. What we checked.
See what Claude Code and Codex returned.
Once the hub has saved production settings from Friday or earlier, ask “Open Friday’s production settings as a new preview.” Your agent runs the current checkout with the settings the hub held for production at the end of the most recent completed Friday in your timezone. If you attached the app on Saturday, its history starts on Saturday. You can still preview a change to today’s settings. Otherwise, open the historical preview and compare it with your usual app. In a fresh chat in the same folder, ask “Where’s the preview I left running, and what does it show?” What the two-starter app served.
Works with any .env, Compose, Terraform, or Kustomize repository:
Open Claude Code in your app’s repository and ask:
Attach ConfigHub to this existing app: keep my staging and production values as they are, and require my approval before production changes..confighub-app (the pointer linking your repo to the hub).| Your app keeps settings in | Shared base | staging overrides | live (production) overrides |
|---|---|---|---|
| Env / Compose | .env.local, .env.development, .env, app.env, compose.yaml, or .env.example | .env.staging | .env.production (non-secret values only) |
| Terraform | common.tfvars | staging.tfvars | prod.tfvars |
| Kustomize | base/ | overlays/staging | overlays/prod, production, live, or Argo CD target |
| Helm chart values | Use cub helm install instead of adopt (see Helm values) | — | — |
Never put secrets or passwords in
.env.production. Values that look like credentials are automatically skipped. Store secrets in your host (Vercel, Fly, Vault) or viacub secret setin your own terminal so no agent key can read them (secrets guide).
~/.confighub/mini (package size); runs ConfigHub and PostgreSQL as two local 127.0.0.1 processes. No Docker, no account..confighub-app is tracked in Git; .claude/settings.local.json (which scopes Claude sessions to the agent key) is added to .git/info/exclude.kubectl or kustomize on PATH to render overlays.Edit files with your agent as usual. Your agent uploads changes with cub repo upload APP-FOLDER --component APP --change-desc "WHY":
staging updates immediately.live (production) stays unchanged and creates a pending change order. Run cub inbox list in your terminal to inspect, then cub inbox approve or cub inbox refuse APP-base/ORDER --reason "WHY".live values once you connect delivery (where the app runs · Argo CD / Flux repos · verify live state).You have unchanged source files, base / staging / live copies in your local hub, a scoped APP-agent key that can propose but never approve production, and a local prompt history record.
Try next in the same repo:
cub inbox list in your terminal to approve or refuse it./confighub:why SETTING_NAME in Claude Code to see every change and prompt behind it.cub repo receipts APP --setup to inspect copies, keys, rules, and overrides.More walkthroughs: Your first hour · Staging-only memory bump · Web starter · Argo CD · Flux · Going back / uninstall · Glossary.
adopt --dry-run & pattern-web)The agent starts the local hub if none is running (auto-start in other folders stays off unless you opt in: details). It previews with cub repo adopt --dry-run before writing anything:
Nothing was changed. Without --dry-run, ConfigHub would keep app's settings, from common.tfvars, with staging.tfvars for staging and prod.tfvars for production:
It would keep three copies of them: app-base, the shared settings that staging and production start from; app-staging; and app-live, for production.
First it would make a starter pattern, pattern-web: default settings for a small web service, and rules that each change must pass (replicas-limit, not-public, log-level, no-secret-values).
Your settings that differ from the defaults in pattern-web/web-service: cpu=512, log_retention_days=14, memory_mb=2048. A new version of those defaults will not overwrite them.
Staging would have the shared settings at once, with its own settings from staging.tfvars: desired_count=1, env=staging.
Production would have its own settings from prod.tfvars at once: desired_count=3, env=prod. It would take the shared settings only after you approve them.It then runs cub repo adopt and cub agent require-approval APP --variant live --agent APP-agent. pattern-web provides baseline rules (like blocking secret-shaped values) without overwriting any value you already set; it is separate from optional starters.
Each hub copy holds base/ resources with overlay value overrides. Overlays that alter resource structure rather than values are refused cleanly before anything is written:
namespace, labels, annotations, images, replicas, scalar/element value patches, namePrefix/nameSuffix (including references), fractional values (cpu: 0.5), and type changes.resources, components, configMapGenerator), deleting fields, changing list lengths, adding empty maps, helmCharts, generators, transformers, validators, and remote URL bases.adopt renders each overlay with kustomize and verifies byte-level parity with the hub copy, rolling back cleanly if anything differs.
cub repo adopt does not import Helm values.yaml directly. Use cub-helm (cub helm install NAME CHART --version V --values my-values.yaml) in your terminal to preserve custom values and reasons across upstream chart upgrades (your own Helm chart · Story 7 walkthrough).
reads no settings adopt can find: Your env file uses a custom name (like api.env). Either rename it to .env or run cub repo upload FOLDER --variant live --target none..env and set them with cub secret set in your own terminal.cub repo adopt APP-FOLDER --dry-run or export hub copies with cub repo copies APP --to DIR.CLAUDE.md / AGENTS.md instructions printed by cub agent require-approval so the agent proposes via change orders instead.confighub mini undo to revert only config edits, or follow going back to export plain files and delete .confighub-app.Ready to deliver approved settings 1:1 to your live host (or move between services keeping your config)? Pick your platform: Vercel · Fly.io · Heroku · Unikraft · Daytona sandbox · Argo CD / Flux · Starters.