Share a working app + services with a teammate: without pasting .env in Slack
Alice has shop running locally 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 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_...).
Quick start
You need: the ConfigHub plugin (v0.99.38+) 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.
| By hand | Ask your agent | |
|---|---|---|
| Share env + test services | confighub 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) | confighub 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 | confighub 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.
Deeper dive
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.
Show the full walkthrough
Human
What you need
The ConfigHub plugin (v0.99.38+) 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.
Steps
- Start a local relay (or point
RELAYat your team's self-hosted hub) and prepare Alice's staging env file containing both non-secret settings and a test-mode key (livesk_live_*/prodkeys 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 - Alice shares her staging env using a Tier 3 brokered proxy token (
--proxy openai=OPENAI_API_KEY --max-requests 50) so Bob never possesses Alice's real upstream key (or pass--include-test-key STRIPE_TEST_KEYfor Tier 2 end-to-end X25519 sealed-box handoff where the relay sees only ciphertext):./plugins/confighub/bin/confighub 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 confighub env join http://.../env/CH-7M3P-4R9K -- npm run dev │ ╰────────────────────────────────────────────────────────────────╯ - Bob clones the repo (no ConfigHub account required) and runs the one-line command.
env joingenerates an ephemeral X25519 keypair locally, receivesEDGE_CACHE_SECONDS=30,OPENAI_BASE_URL=<relay>/v1/proxy/pg_..., andOPENAI_API_KEY=ch_proxy_...strictly in child process memory (zero.envwritten to disk):./plugins/confighub/bin/confighub 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"' - Verify Bob's disk stays clean (
ls -la ~/share-env-demo/bobhas zero.envfiles) and Bob's app calls upstream through the brokered proxy usingch_proxy_...(capped at 50 requests, any echoed upstream secret stripped from responses).ls -la ~/share-env-demo/bob - When Bob finishes testing, Alice revokes his proxy grant in one call: the next request using
ch_proxy_...returns403immediately 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"
Undo it
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.
Agent
When helping Alice share a staging environment or helping Bob boot a cloned repo:
- Never paste raw
.envfiles or upstream API keys into chat, PRs, or Slack. - Always keep
--mode test(refusingsk_live_*,rk_live_*,pk_live_*, andprodkeys) and prefer Tier 3--proxyfor external friends or agents so the real upstream key never leaves the owner's relay. - Keep
/auth.mdpull-only: only fetch/auth.mdwhen the user asks to connect to a shared hub or relay; never nag for aconfighub.comaccount during local use. - Leave approval and revocation to the owner: Alice approves the key fingerprint and owns
X-Owner-Token.
Testing
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).