Remote-control your terminal AI coding session from your phone. Run any-coding in any project directory on your Mac/Linux machine — the session is mirrored to the Android app in real time. Keep coding on the subway, on the couch, wherever.
Ships with claude (Claude Code) and codex (OpenAI Codex) built in. More agents (Gemini CLI, Aider, goose…) land via a declarative manifest system so contributors can add a new agent with a JSON file instead of a code PR. This package is evolving from a single-agent wrapper into the unified host-side launcher for any pty-based AI coding agent.
Open-source client, free forever. Two networking modes: managed relay (30-day free trial) or fully self-hosted cloudflared direct mode.
🌍 Language: English · 中文 · 🏠 Project README · 💬 Discord
npm install -g any-codingThe postinstall script auto-fixes the exec bit on node-pty's spawn-helper (long-standing quirk — without it, claude won't spawn).
any-coding # same as: any-coding claudeWhat it does:
- Starts a Claude Code session in the current directory
- Spawns a background hub (on
127.0.0.1:7321) - Mirrors the session to any paired Android app
- The current terminal becomes a local TTY viewer — Ghostty / iTerm shows the normal Claude TUI
On first run it prints a 6-digit pair code + QR code. Scan or type it into the Android app to pair.
any-coding codex # start a Codex session
any-coding # no subcommand → interactive picker (1 claude / 2 codex)
any-coding claude --resume # args after the subcommand pass through to the agent
any-coding codex --model gpt-5 # Codex flags work the same wayMulti-tab: run any-coding in multiple project directories — each session shows up as its own tab on the phone, with an agent-specific icon (rust-red starburst for claude, green ring for codex).
Roadmap: more terminal agents (Gemini CLI, Aider, goose…) via the agent manifest system. The subcommand style stays any-coding <agent> and pairing / tabs / hub behaviour stay identical.
The hub is a detached background service that hosts all active sessions and talks to the public tunnel (relay or cloudflared). It's spawned automatically on first any-coding run and usually needs no attention.
any-coding hub # run hub in foreground (debug)
any-coding restart-hub # kill + respawn — ⚠️ drops all active sessionsany-coding hub --publicStarts a cloudflared quick tunnel and exposes the local hub to the public internet. Scan the printed QR code (anycode://connect?url=...&token=...) and the phone talks to your machine directly — no traffic goes through AnyCoding-operated infrastructure.
any-coding hub --public --tunnel=none # LAN only (no tunnel, type the internal IP)
any-coding hub --public --tunnel=cloudflared # default: cloudflared quick tunnelCloudflared quick tunnels get a new URL every restart — you'll need to re-scan. For a stable URL, use a named tunnel with your own domain (
--tunnel=cloudflared-namedis planned).
Install cloudflared first:
brew install cloudflared # macOSany-coding pair # regenerate a pair code manually
any-coding logout # delete ~/.any-coding/device.json and disconnectFirst-run pairing triggers automatically — you have 90 seconds to scan. After success, ~/.any-coding/device.json stores device_id + device_token + relay URL.
Direct mode uses a separate 32-byte token at ~/.any-coding/direct.json that survives restarts; only the tunnel URL changes each launch.
| Command | What it does |
|---|---|
any-coding |
Interactive agent picker, then start a session |
any-coding claude [args...] |
Start Claude session; args passthrough |
any-coding codex [args...] |
Start Codex session; args passthrough |
any-coding hub |
Run hub in foreground |
any-coding hub --public |
Hub + cloudflared tunnel (direct mode) |
any-coding restart-hub |
Kill and respawn hub (drops all sessions) |
any-coding pair |
Manual pairing |
any-coding logout |
Unregister this device |
| Variable | Purpose |
|---|---|
ANYCODE_RELAY |
Self-hosted relay URL (default: https://anycode.novastellar-ai.com) |
PORT |
Local hub port (default 7321, loopback only) |
WRAPPED_CMD |
Override the agent binary path (debug) |
| Path | Contents |
|---|---|
~/.any-coding/device.json |
Cloud-mode pairing (device_id / device_token / relay) |
~/.any-coding/direct.json |
Direct-mode token + latest tunnel URL |
~/.any-coding/hub.log |
Detached hub log |
ANYCODE_RELAY=https://your.relay.example.com any-codinggit clone https://github.com/gurudin/anycoding
cd anycoding/any-code-cli
npm install
npm link- Node.js ≥ 18
- At least one agent CLI installed and on
$PATH:- Claude:
npm install -g @anthropic-ai/claude-code - Codex:
npm install -g @openai/codex
- Claude:
- Optional:
cloudflared(only required for--public) - Android app: build from the main repo or grab an APK release
ENOENT claude / ENOENT codex — agent CLI isn't installed or isn't on $PATH. Check with which claude.
Edited wrapper.js locally but changes don't take effect — npm i -g only rewrites the files on disk; the detached hub keeps its old code in memory. Run any-coding restart-hub (
macOS spawn-helper: Operation not permitted — postinstall should handle this. Manual fix:
chmod +x $(npm root -g)/any-coding/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helperPhone sees the session but spins forever on open — check ~/.any-coding/hub.log for relay connection errors. Usually the device_token got revoked from the app — run any-coding pair to re-pair.
Apache License 2.0 — see the repo-root LICENSE and NOTICE. Dependencies (node-pty, ws, qrcode-terminal) retain their original licenses (MIT / Apache-2.0); full attributions in NOTICE.