Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

docs: describe the local .env.<environment> secrets files

leepokaiab5335230a00
diff --git a/CLAUDE.md b/CLAUDE.md
index ac98bb54..2066c0db 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -33,7 +33,7 @@ Bot-based remote for coding agents: persistent named bots on your computer, mess
- Remote access (Cloudflare relay primary, direct LAN/Tailscale alternative, accounts, SSH, public routine webhooks queued in the relay §7.8, the cloud assistant MCP connector at mcp.codync.dev §7.9): [docs/reference/remote-relay.md](docs/reference/remote-relay.md).
- Remote screen (`host/src/screen/` is the reference): phones view/control the computer over WebRTC (hardware H.264, non-trickle SDP relayed by `screenOffer`, input on data channels `input` / `input-fast`); bots get the built-in `computer` MCP server (`codync-host mcp computer`, `host/src/mcp.rs`) when their `computer` flag is on; its tools run on the bundled cua-driver, which Codync Screen starts on macOS so its grants apply ([computer use](docs/features/computer-use.md)). Capture/input live in a helper on `~/.codync/screen.sock`: `apps/screen-macos` (macOS, launchd agent the desktop app registers via `SMAppService`, owns the TCC grants) or `apps/screen-linux` (`codync-screen`: portals + GStreamer, started by the host). On by default (Linux: only with a graphical session); `setScreenEnabled` is accepted only from loopback. An interactive phone takes over (bots may only look).
- Multiple computers per account are future work, not a current priority: the product targets one computer. The multi-computer structure (`AccountStore`, `BotReference`) stays because relay/accounts/SSH build on it; don't extend or polish multi-computer features unless asked. Bots on the user's other computers reach each other through `codync-network` (`host/crates/network`, peer to peer over iroh, signed roster with an owner; `codync-host network`): [codync-network](docs/features/codync-network.md).
-- Environments: `iOS Dev` / desktop `dist:*:dev` use the isolated Codync Dev app; `iOS` / `dist:*:main` retain production identities. Stop only the variant being rebuilt. Resource map, signing and diagnostics: [Dev app isolation](docs/guides/dev-app.md).
+- Environments: `iOS Dev` / desktop `dist:*:dev` use the isolated Codync Dev app; `iOS` / `dist:*:main` retain production identities. Stop only the variant being rebuilt. Resource map, signing and diagnostics: [Dev app isolation](docs/guides/dev-app.md). Local secrets: git-ignored `.env.development` / `.env.production` at the root, templates `.env.<env>.example` ([local secrets](docs/guides/dev-app.md#local-secrets)).
- Push: iOS registers its APNs token with `relay/` → gets an AES-GCM ticket → gives it (plus its X25519 push key) to the host; the host seals title/body to that key and a Notification Service Extension opens it, so `relay/` sees only generic text. Alert kinds: *needs you*, *done*, and *failed*, suppressed while the iOS app is connected. Delivery and lifecycle: [notification design](docs/design/push-and-live-activity.md).
- Voice call (iPhone, desktop): on-device speech (macOS desktop: the `codync-speech` helper), or OpenAI / Gemini realtime on the user's own key (kept in the host's vault, which mints per-call credentials; audio goes device ↔ provider); the host sees plain messages. Grok-style call bar: [docs/features/voice-call.md](docs/features/voice-call.md).
- Analytics: PostHog, on by default (off in each device's Settings), feature use only (never content); host events come from `api::dispatch`: [docs/features/analytics.md](docs/features/analytics.md).
diff --git a/docs/guides/dev-app.md b/docs/guides/dev-app.md
index 8c17ce0b..eebdc4d1 100644
--- a/docs/guides/dev-app.md
+++ b/docs/guides/dev-app.md
@@ -34,6 +34,15 @@ A sandbox starts past onboarding (welcome and computer-access setup, only where
Still shared: macOS sees every unpackaged run as the same Electron app, so permissions and notifications are shared and a `codync-dev://` sign-in callback may reach another copy (test sign-in on the default Codync Dev); Codync Screen and computer use need the packaged `Codync Dev.app`; a global shortcut (the approval island's) goes to whichever app registered it first.
+## Local secrets
+
+Secrets for running the project locally live in git-ignored env files at the main checkout's root, one per environment: `.env.development` for the Clerk and Cloudflare **development** instances, `.env.production` for production. `.gitignore` covers `.env` and `.env.*` but not `.env.*.example`, so each file has a committed template (`.env.development.example`) listing its variables with placeholders; copy it and fill it in. Linked worktrees read the main checkout's file (through `git rev-parse --git-common-dir`), so a new worktree needs no setup. Real values never go in a template, a commit or a log.
+
+- Dev tooling reads `.env.development` only and never loads `.env.production`; a variable already in the environment wins over the file.
+- A development key is checked before use (`CODYNC_CLERK_SECRET_KEY` must be `sk_test_...`), so a production key put there by mistake is refused.
+- Deployed secrets (the Worker's `CLERK_SECRET_KEY` and the like) are set with `wrangler secret put`, not kept in these files.
+- Variables so far: `CODYNC_CLERK_SECRET_KEY` (see [Worktree sandboxes](#worktree-sandboxes)).
+
## Resource ownership
| Resource | Production | Development |