.env in SlackAlice has shop running locally (Zero Hub — no hub or account required) with staging settings and test services (Stripe test mode, Supabase staging, OpenAI). Bob clones the repo to test a branch—and hits Missing STRIPE_TEST_KEY, OPENAI_API_KEY. Instead of pasting a raw .env into Slack where it lives forever, Alice runs one cub env share command to share a 24-hour, test-only invite backed by a key-to-key handoff: Bob (or Bob's coding agent) boots the app straight into process memory with zero .env written to disk, zero Bob signup, and zero real upstream API keys ever exposed when using a Tier 3 brokered proxy token (ch_proxy_...).
You need: the ConfigHub plugin (Zero Hub) and a relay (agentauth-server on your laptop/self-hosted hub, or optionally confighub.com once hosted relays go live — Provisional). Bob needs no ConfigHub account. (cub env share / env-join remain silent compatibility aliases.)
| By hand | Ask your agent | |
|---|---|---|
| Share env + test services | cub env share shop --variant staging --mode test --proxy openai=OPENAI_API_KEY --max-requests 50 --server "$RELAY" --approve-wait (step 2) | "Share my staging env and a 50-request test-mode proxy token for OpenAI so Bob can run this branch without seeing my real key." |
| Join in memory (Bob) | cub env join "$INVITE_URL" --as bob -- npm run dev (step 3) | "Boot this app using Alice's staging env invite in process memory—do not write a .env file to disk." |
| Capture Bob's fix | cub env join "$INVITE_URL" --as bob --capture -- npm test (step 4) | "Run the test suite with Alice's invite and capture any non-secret config tuning back for Alice to review." |
| Revoke anytime | curl -X POST -H "X-Owner-Token: $OWNER_TOKEN" "$RELAY/v1/proxy/grants/$GRANT_ID/revoke" (step 5) | "Revoke Bob's proxy grant now so his ch_proxy_ token stops working without rotating my OpenAI key." |
Without ConfigHub: Alice pastes a raw .env with long-lived API keys into Slack, Bob saves it to disk where it goes stale the next day, and revoking Bob means rotating every upstream key across the whole team.
ConfigHub Server is not a secret vault, SOPS replacement, or LLM gateway. Three separate layers each do one job:
Units, Variants, NeedsProvides, ChangeOrders): Owns the non-secret structured config (EDGE_CACHE_SECONDS, STRIPE_MODE), service wiring, policy checks (refusing live/prod keys in test mode), scoped reader access, and capturing Bob's non-secret tuning back for review. Never stores plaintext secrets or proxies API traffic.vault://, 1password://, AWS/GCP Secret Manager, External Secrets / SOPS) and points OPENAI_BASE_URL at your existing LLM/API gateway (LiteLLM, Cloudflare AI Gateway, Portkey). For the zero-infra "two devs, no Vault or gateway yet" case, the separate standalone agentauth-server relay bridges Tier 2 X25519 sealed-box ciphertext handoff or Tier 3 dev-only ch_proxy_... tokens — and teams swap it out cleanly for Vault / ESO / their own gateway with zero app or Unit changes.cub / plugin binary on Bob's laptop or sandbox): Pulls live staging config from ConfigHub, resolves the secret/broker reference strictly into child process memory (zero .env on disk), boots the app, and optionally captures Bob's non-secret tweaks back as a ChangeOrder.The rest of this page shows the full key-to-key flow (Tier 2 X25519 sealed-box test keys in memory and Tier 3 ch_proxy_... brokered capability tokens with budget caps and zero-rotation revocation), agent rules, and verification checks.
The ConfigHub plugin (Zero Hub) and a running agentauth-server relay (on localhost or your team's self-hosted hub; hosted https://confighub.com relays are Provisional and strictly opt-in). Bob needs no account.
RELAY at your team's self-hosted hub) and prepare Alice's staging env file containing both non-secret settings and a test-mode key (live sk_live_* / prod keys are structurally refused in --mode test):
export RELAY="http://127.0.0.1:8787"
mkdir -p ~/share-env-demo/alice ~/share-env-demo/bob
printf 'EDGE_CACHE_SECONDS=30\nSTRIPE_MODE=test\nOPENAI_API_KEY=sk-test-alice-key\n' > ~/share-env-demo/alice/.env.staging--proxy openai=OPENAI_API_KEY --max-requests 50) so Bob never possesses Alice's real upstream key (or pass --include-test-key STRIPE_TEST_KEY for Tier 2 end-to-end X25519 sealed-box handoff where the relay sees only ciphertext):
cub env share shop --dir ~/share-env-demo/alice \
--variant staging --mode test --proxy openai=OPENAI_API_KEY --max-requests 50 \
--server "$RELAY" --approve-waitConfigHub prints an invite card with the one-line command for Bob and the instant-revoke command for Alice:
╭─ ConfigHub · Env Invite · shop (staging · test) ───────────────╮
│ ├── invite http://127.0.0.1:8787/env/CH-7M3P-4R9K │
│ ├── unlocks 2 staging setting(s) + 1 brokered proxy token(s) │
│ ├── guard live keys blocked (--mode test) · revocable anytime│
│ └── run cub env join http://.../env/CH-7M3P-4R9K -- npm run dev │
╰────────────────────────────────────────────────────────────────╯cub env join generates an ephemeral X25519 keypair locally, receives EDGE_CACHE_SECONDS=30, OPENAI_BASE_URL=<relay>/v1/proxy/pg_..., and OPENAI_API_KEY=ch_proxy_... strictly in child process memory (zero .env written to disk):
cub env join "$INVITE_URL" --as bob -- \
sh -c 'printf "CACHE=%s BASE=%s KEY=%s\n" "$EDGE_CACHE_SECONDS" "$OPENAI_BASE_URL" "$OPENAI_API_KEY"'ls -la ~/share-env-demo/bob has zero .env files) and Bob's app calls upstream through the brokered proxy using ch_proxy_... (capped at 50 requests, any echoed upstream secret stripped from responses).
ls -la ~/share-env-demo/bobch_proxy_... returns 403 immediately with zero upstream API key rotation across Alice's services:
curl -fsS -X POST -H "X-Owner-Token: $OWNER_TOKEN" "$RELAY/v1/proxy/grants/$GRANT_ID/revoke"Revoke the proxy grant or invite (DELETE /v1/env-invites/$CODE), stop the local relay if you started one, and delete ~/share-env-demo. Zero credentials were written to Bob's disk and zero upstream keys need rotation.
When helping Alice share a staging environment or helping Bob boot a cloned repo:
.env files or upstream API keys into chat, PRs, or Slack.--mode test (refusing sk_live_*, rk_live_*, pk_live_*, and prod keys) and prefer Tier 3 --proxy for external friends or agents so the real upstream key never leaves the owner's relay./auth.md pull-only: only fetch /auth.md when the user asks to connect to a Cloud Hub or relay; never nag for a confighub.com account during local use.X-Owner-Token.Share Alice's staging env and a test-mode OpenAI proxy token (max 50 requests) to Bob's process memory without writing a .env file to Bob's folder or exposing Alice's real upstream key, then revoke Bob's grant.
This proves: Alice can pass a working app environment plus scoped downstream services to Bob (or Bob's coding agent) in memory with zero .env pasted in Slack, zero recipient signup, zero real upstream API key exposure (ch_proxy_...), and instant revocation with zero upstream key rotation (covered by TestShareEnvAndEnvJoinEndToEndMemoryOnly, TestShareEnvTier3BrokeredProxyTokenEndToEnd, and TestTier3ProxyGrantEndToEndAndRevocation).