| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
AI coding agent runtime — drive Claude Code, Gemini CLI, and Codex CLI from your phone or browser. Code stays on your machine; the agent runs locally.
codewithphone is the local agent runtime for CodeWithPhone. It connects your machine to the CodeWithPhone platform so you can run AI coding tasks using Claude Code, Gemini CLI, and Codex CLI directly on your local environment — supervised from your phone, browser, or wherever you are.
codewithphone runs on your machine and acts as a bridge between the CodeWithPhone platform and local AI CLI tools:
CodeWithPhone App/Web <───> codewithphone.com <───> codewithphone (your machine)
│
┌─────────┼─────────┐
▼ ▼ ▼
Claude Gemini Codex
Code CLI CLI
One command (GitHub Release):
curl -fsSL https://raw.githubusercontent.com/shotforward/codewithphone/main/install.sh | bashInstall a specific version:
curl -fsSL https://raw.githubusercontent.com/shotforward/codewithphone/main/install.sh | bash -s -- v0.2.0From source (requires Go 1.25+):
git clone https://github.com/shotforward/codewithphone.git
cd codewithphone
go build -o codewithphone ./cmd/codewithphone
sudo mv codewithphone /usr/local/bin/| Runtime | Install |
|---|---|
| Claude Code | npm install -g @anthropic-ai/claude-code |
| Gemini CLI | npm install -g @google/gemini-cli |
| Codex CLI | npm install -g @openai/codex |
You only need one. codewithphone will auto-detect all installed runtimes.
codewithphone startOn first run, a PIN code will be displayed:
┌────────────────────────────────────────────────────────┐ │ CodeWithPhone Authorization Required │ │ │ │ PIN CODE: ABC123 │ │ │ │ Please enter this PIN on your CodeWithPhone Web/App. │ │ Waiting for your confirmation... │ └────────────────────────────────────────────────────────┘
Open codewithphone.com, log in, and enter the PIN. The agent will then ask you to confirm the binding in the terminal:
Binding request from user@example.com (John) Approve? [Y/n]: y Device authorized successfully!
Once paired, the agent starts accepting tasks.
codewithphone start -dWhen using -d (daemon mode), pairing still happens interactively in your terminal — you'll see the PIN and confirm the binding just like in foreground mode. After confirmation, the agent automatically moves to the background.
Check status and stop:
codewithphone status # show PID, listen address, machine ID
codewithphone stop # graceful shutdownThat's it. Open codewithphone.com and start a coding session.
codewithphone start [flags] Start the agent codewithphone stop Stop a running background agent codewithphone status Check if the agent is running codewithphone version Print version
| Flag | Description | Default |
|---|---|---|
| -d, --daemon | Run in background (after pairing) | foreground |
| -s, --server URL | Server URL | https://codewithphone.com |
| -p, --port PORT | Local port (0 = auto) | 0 (auto-select) |
| -w, --workspace DIR | Workspace root directory | $HOME |
| -c, --config FILE | Config file path | ~/.codewithphone/config.yaml |
| -n, --max-workers N | Max concurrent tasks (1-32) | 10 |
| --bind-mode MODE | auto, force, or token_only | auto |
# Start in foreground
codewithphone start
# Start in background (pairing is still interactive)
codewithphone start -d
# Start with a specific workspace
codewithphone start -w ~/projects
# Start in background pointing to a custom server
codewithphone start -d -s https://my-server.example.com
# Re-pair this machine (get a new PIN)
codewithphone start --bind-mode=force
# Start with a fixed port
codewithphone start -p 9090Config is stored in ~/.codewithphone/config.yaml and is auto-created on first pairing.
daemon:
http_addr: 127.0.0.1:0
machine_id: machine-xxxx # assigned by server
machine_token: "..." # assigned on pairing
bind_mode: auto
max_concurrent_turns: 10
server_base_url: https://codewithphone.com/api
codex_bin: codex
gemini_bin: gemini
gemini_model: gemini-3-flash-preview
claude_bin: claude
claude_model: sonnet~/.codewithphone/
├── config.yaml # Configuration (auto-managed)
├── codewithphone.pid # PID file (when running in background)
├── codewithphone.log # Log file (when running in background)
└── data/
└── agent.db # Local state (SQLite)
Security defaults:
All settings can be overridden via environment variables:
| Variable | Description |
|---|---|
| CODEWITHPHONE_HOME | Home directory (default: ~/.codewithphone) |
| CODEWITHPHONE_CONFIG | Config file path |
| CODEWITHPHONE_ADDR | Listen address (e.g. 127.0.0.1:8081) |
| DAEMON_SERVER_BASE_URL | Server API URL |
| DAEMON_ALLOWED_ROOTS | Colon-separated workspace root paths |
| DAEMON_MAX_CONCURRENT_TURNS | Max parallel task workers |
| DAEMON_CODEX_BIN | Path to Codex CLI binary |
| DAEMON_GEMINI_BIN | Path to Gemini CLI binary |
| DAEMON_CLAUDE_BIN | Path to Claude Code binary |
With -d (daemon mode), the pairing flow runs in the foreground first. Once approved, the agent forks to the background automatically.
To re-pair (keeps the same machine ID, only refreshes the auth token):
codewithphone start --bind-mode=forceFor vulnerability reporting, see SECURITY.md.
git clone https://github.com/shotforward/codewithphone.git
cd codewithphone
make build # produces bin/codewithphone
make test # run testsEach tag release uploads:
Apache License 2.0
| Back | FazBrowse Home | New Git URL |