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.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
chore(desktop): keep the dev Clerk key in .env.development
leepokai456b48155dff
diff --git a/.env.development.example b/.env.development.examplenew file mode 100644index 00000000..80881a9f--- /dev/null+++ b/.env.development.example@@ -0,0 +1,7 @@+# Local secrets for development. Copy to .env.development (git-ignored, read from the main checkout by+# every worktree) and fill in. Never commit real values.++# Clerk *development* instance secret key (Clerk dashboard > Development > API keys). Only sk_test_ keys are+# accepted. `npm run dev` in a worktree uses it (apps/desktop/tools/dev-account.mjs) to sign the sandbox into+# its own test account, and `npm run dev -- --prune` to delete that account again.+CODYNC_CLERK_SECRET_KEY=sk_test_replace_mediff --git a/.gitignore b/.gitignoreindex e5521075..15842126 100644--- a/.gitignore+++ b/.gitignore@@ -30,3 +30,4 @@ __pycache__/# Local secrets (Clerk dev key for apps/desktop/tools/dev-account.mjs).env.env.*+!.env.*.examplediff --git a/apps/desktop/tools/dev-account.mjs b/apps/desktop/tools/dev-account.mjsindex 89cc734d..5aafd969 100644--- a/apps/desktop/tools/dev-account.mjs+++ b/apps/desktop/tools/dev-account.mjs@@ -1,7 +1,7 @@// A Clerk test account for `npm run dev` sandboxes: finds or creates `sandbox-<name>[email protected]`// in the Clerk *development* instance and mints a one-time sign-in token the app trades for a session// (account.ts, `CODYNC_DEV_SIGN_IN_TICKET`). The secret key comes from CODYNC_CLERK_SECRET_KEY or the git-ignored-// `.env` in the main checkout's root (every worktree reads that one file); only `sk_test_` keys are used,+// `.env.development` in the main checkout's root (every worktree reads that one file); only `sk_test_` keys are used,// so production is never touched.import { spawnSync } from 'node:child_process'import { existsSync, readFileSync } from 'node:fs'@@ -12,10 +12,10 @@ import { devClerkSecretKey } from '../src/shared/dev-sandbox.ts'const API = 'https://api.clerk.com/v1'export function secretKey() {- // A linked worktree's git common dir is the main checkout's `.git`, so its parent holds the shared `.env`.+ // A linked worktree's git common dir is the main checkout's `.git`, so its parent holds the shared `.env.development`.const here = dirname(fileURLToPath(import.meta.url))const git = spawnSync('git', ['rev-parse', '--git-common-dir'], { cwd: here, encoding: 'utf8' })- const file = git.status === 0 ? resolve(here, git.stdout.trim(), '..', '.env') : null+ const file = git.status === 0 ? resolve(here, git.stdout.trim(), '..', '.env.development') : nullreturn devClerkSecretKey(process.env.CODYNC_CLERK_SECRET_KEY, file && existsSync(file) ? readFileSync(file, 'utf8') : undefined)}diff --git a/docs/guides/dev-app.md b/docs/guides/dev-app.mdindex 231c5478..8c17ce0b 100644--- a/docs/guides/dev-app.md+++ b/docs/guides/dev-app.md@@ -30,7 +30,7 @@ Xcode configurations separate environment from optimization: `Debug` and `ReleasFlags go after `npm run dev --`: `--shared` takes the default Codync Dev from a worktree (quit the main checkout's first); `--sandbox` runs a sandbox from the main checkout, for a second session on `dev`; `--name <name>` runs the sandbox of that name, for another copy of the same checkout; `--cloud` lets the sandbox host use the dev cloud (each sandbox then shows as another computer); `--cdp` opens the DevTools protocol on the sandbox port + 10000; `--list` shows every sandbox; `--prune` deletes the ones whose worktree is gone (and their Clerk test accounts), so run it after removing worktrees.-A sandbox starts past onboarding (welcome and computer-access setup, only where the window hasn't chosen yet); `--onboarding` clears those two settings once per start, so the flow comes back (a signed-in sandbox passes the welcome screen by itself and lands on computer-access setup). With `CODYNC_CLERK_SECRET_KEY` (the Clerk **development** instance's `sk_test_...` key) in the git-ignored `.env` at the main checkout's root (every worktree reads that one file) or the environment, it also signs in its own Clerk test account `sandbox-<name>[email protected]`: `tools/dev-account.mjs` finds or creates that user through the Backend API and mints a one-time sign-in token, which `account.ts` trades for a session (`ticket` strategy, unpackaged Dev runs only). The token is minted at every start and used only while the sandbox has no active session; the app also requires a `pk_test_` publishable key, and the key never reaches the host or the agents. Keys that aren't `sk_test_` are refused. Without a key a sandbox starts signed out; it never borrows Codync Dev's login.+A sandbox starts past onboarding (welcome and computer-access setup, only where the window hasn't chosen yet); `--onboarding` clears those two settings once per start, so the flow comes back (a signed-in sandbox passes the welcome screen by itself and lands on computer-access setup). With `CODYNC_CLERK_SECRET_KEY` (the Clerk **development** instance's `sk_test_...` key) in the git-ignored `.env.development` at the main checkout's root (copy `.env.development.example`) (every worktree reads that one file) or the environment, it also signs in its own Clerk test account `sandbox-<name>[email protected]`: `tools/dev-account.mjs` finds or creates that user through the Backend API and mints a one-time sign-in token, which `account.ts` trades for a session (`ticket` strategy, unpackaged Dev runs only). The token is minted at every start and used only while the sandbox has no active session; the app also requires a `pk_test_` publishable key, and the key never reaches the host or the agents. Keys that aren't `sk_test_` are refused. Without a key a sandbox starts signed out; it never borrows Codync Dev's login.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.