@gleapai/kai-bridge
v0.9.0
Published
Kai Code Bridge runs Kai Code on your computer or server with your own coding subscriptions, local previews, and photo or video verification.
Readme
Kai Code Bridge
Run Gleap Kai Code on your computer or server with your own Claude Code / Codex login, local dev-server previews, and photo or video verification.
npm i -g @gleapai/kai-bridge # one install, so the background service has a stable path
kai-bridge login # pair this machine with your Gleap account
kai-bridge install # run at login (launchd / systemd / Task Scheduler)
kai-bridge status(npx @gleapai/kai-bridge login works for a quick look, but install needs the
global install — npm garbage-collects the npx cache, which would leave the
background service pointing at a deleted file.)
Then pick Run on → your machine in any Kai Code session. Repos are discovered
automatically under ~/Documents, ~/code, ~/dev, ~/Projects, ~/src (add more with
kai-bridge repo roots add <dir>); each session runs in an isolated worktree under
~/.kai/worktrees unless you choose "Work in my checkout".
Accounts
The bridge runs the official claude / codex binaries installed on your machine under
your login (ambient profile). Add a second account with a managed profile:
kai-bridge profile add personal --harness claude
kai-bridge profile login personalYour harness logins never leave the machine; the bridge stores only its pairing token
(~/.kai/config.json).
Local dry run
kai-bridge run --task "Explain the auth flow in this repo" --cwd ~/code/my-appDevelopment
npm run sync-runner copies the ACP runner from a sibling gleap_code_analyzer checkout;
npm test runs the unit suite (uses real git).
Computers and your own servers
Kai Code offers Kai Code Cloud (Gleap's managed execution, using AI credits) or Kai Code Bridge (your coding agents on your computer or a server you manage, using your own AI subscriptions).
Run npm i -g @gleapai/kai-bridge && kai-bridge in a local terminal or over SSH. The guided setup pairs the device, installs its background service and helps sign in to coding agents. Node.js 20+ and Git are required. On a Linux server, keep the user service running after logout using your system's service configuration; kai-bridge doctor reports service status.
Codex and Claude Code ship with Kai Code Bridge. Missing agents can be installed or repaired, and existing agents can be updated independently:
kai-bridge harness install codex
kai-bridge harness update codex
kai-bridge harness login codex --device-auth
kai-bridge harness install claude
kai-bridge harness update claude
kai-bridge harness login claudeUpdates install into ~/.kai/harnesses, verify the new executable, then select it for subsequent sessions. A failed download or startup leaves the previous version selected. Existing versions are retained for running sessions; your global CLI installations and agent logins are not overwritten. --version <version> selects a specific package version (for Claude, the Claude Agent SDK package version).
Codex automatically uses device-code sign-in over SSH or on headless Linux. Enable device-code sign-in in the account settings if Codex asks. Claude uses its native auth login flow: follow the URL and prompts in the SSH terminal. Dashboard Sign in opens a terminal on desktop devices; for headless servers it shows the exact command to run over SSH. The login is picked up automatically.
Previews are local to the Kai Code Bridge device. Open them on that computer, on the same network when supported, or use your own SSH port forwarding. Kai Code Bridge does not expose previews through a public tunnel. Screenshot and video verification runs on the Kai Code Bridge device and uploads its evidence to the Kai Code session, so those checks still work on a remote server.
