{"id":48782259,"url":"https://github.com/shotforward/codewithphone","last_synced_at":"2026-04-13T15:00:47.179Z","repository":{"id":350818327,"uuid":"1205708254","full_name":"shotforward/codewithphone","owner":"shotforward","description":"CodeWithPhone — Code with your phone. Run AI coding agents (Codex, Claude, Gemini) on your dev machine, control everything from your phone.","archived":false,"fork":false,"pushed_at":"2026-04-12T08:00:10.000Z","size":115,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T09:28:43.992Z","etag":null,"topics":["ai-agent","claude","claude-code","code-with-phone","gemini","mobile-coding","remote-dev","vibe-coding","vibecoding"],"latest_commit_sha":null,"homepage":"https://codewithphone.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shotforward.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-09T07:56:59.000Z","updated_at":"2026-04-12T08:06:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"510b97c4-90af-48ac-9a6a-3d4a86ae8bfa","html_url":"https://github.com/shotforward/codewithphone","commit_stats":null,"previous_names":["shotforward/codewithphone"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/shotforward/codewithphone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shotforward%2Fcodewithphone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shotforward%2Fcodewithphone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shotforward%2Fcodewithphone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shotforward%2Fcodewithphone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shotforward","download_url":"https://codeload.github.com/shotforward/codewithphone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shotforward%2Fcodewithphone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31757482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T13:27:56.013Z","status":"ssl_error","status_checked_at":"2026-04-13T13:21:23.512Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","claude","claude-code","code-with-phone","gemini","mobile-coding","remote-dev","vibe-coding","vibecoding"],"created_at":"2026-04-13T15:00:26.051Z","updated_at":"2026-04-13T15:00:47.169Z","avatar_url":"https://github.com/shotforward.png","language":"Go","readme":"# codewithphone\n\nLocal AI agent runtime for [CodeWithPhone](https://codewithphone.com). Connects your machine to the CodeWithPhone platform so you can run AI coding tasks using Claude, Gemini, and Codex CLIs directly on your local environment.\n\n## How it works\n\n`codewithphone` runs on your machine and acts as a bridge between the CodeWithPhone platform and local AI CLI tools:\n\n1. You create a coding session on [codewithphone.com](https://codewithphone.com) (or the mobile app)\n2. The agent picks up tasks and executes them using installed AI runtimes (Claude Code, Gemini CLI, Codex CLI)\n3. Code changes happen on your machine, in your real project directories\n4. You review and approve changes through the web interface\n\n```\nCodeWithPhone App/Web  \u003c───\u003e  codewithphone.com  \u003c───\u003e  codewithphone (your machine)\n                                                              │\n                                                    ┌─────────┼─────────┐\n                                                    ▼         ▼         ▼\n                                                 Claude    Gemini    Codex\n                                                  Code      CLI       CLI\n```\n\n## Quick start\n\n### 1. Install\n\n**One command (GitHub Release):**\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/shotforward/codewithphone/main/install.sh | bash\n```\n\nInstall a specific version:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/shotforward/codewithphone/main/install.sh | bash -s -- v0.2.0\n```\n\n**From source (requires Go 1.25+):**\n\n```bash\ngit clone https://github.com/shotforward/codewithphone.git\ncd codewithphone\ngo build -o codewithphone ./cmd/codewithphone\nsudo mv codewithphone /usr/local/bin/\n```\n\n### 2. Install at least one AI runtime\n\n| Runtime | Install |\n|---------|---------|\n| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `npm install -g @anthropic-ai/claude-code` |\n| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `npm install -g @google/gemini-cli` |\n| [Codex CLI](https://github.com/openai/codex) | `npm install -g @openai/codex` |\n\nYou only need one. `codewithphone` will auto-detect all installed runtimes.\n\n### 3. Start the agent\n\n```bash\ncodewithphone start\n```\n\nOn first run, a **PIN code** will be displayed:\n\n```\n  ┌────────────────────────────────────────────────────────┐\n  │  CodeWithPhone Authorization Required                  │\n  │                                                        │\n  │  PIN CODE:      ABC123                                 │\n  │                                                        │\n  │  Please enter this PIN on your CodeWithPhone Web/App.  │\n  │  Waiting for your confirmation...                      │\n  └────────────────────────────────────────────────────────┘\n```\n\nOpen [codewithphone.com](https://codewithphone.com), log in, and enter the PIN. The agent will then ask you to confirm the binding in the terminal:\n\n```\n  Binding request from user@example.com (John)\n  Approve? [Y/n]: y\n  Device authorized successfully!\n```\n\nOnce paired, the agent starts accepting tasks.\n\n### 4. Run in background (recommended)\n\n```bash\ncodewithphone start -d\n```\n\nWhen 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.\n\nCheck status and stop:\n\n```bash\ncodewithphone status    # show PID, listen address, machine ID\ncodewithphone stop      # graceful shutdown\n```\n\nThat's it. Open [codewithphone.com](https://codewithphone.com) and start a coding session.\n\n## Usage\n\n```\ncodewithphone start [flags]    Start the agent\ncodewithphone stop             Stop a running background agent\ncodewithphone status           Check if the agent is running\ncodewithphone version          Print version\n```\n\n### Start flags\n\n| Flag | Description | Default |\n|------|-------------|---------|\n| `-d, --daemon` | Run in background (after pairing) | foreground |\n| `-s, --server URL` | Server URL | `https://codewithphone.com` |\n| `-p, --port PORT` | Local port (`0` = auto) | `0` (auto-select) |\n| `-w, --workspace DIR` | Workspace root directory | `$HOME` |\n| `-c, --config FILE` | Config file path | `~/.codewithphone/config.yaml` |\n| `-n, --max-workers N` | Max concurrent tasks (1-32) | `10` |\n| `--bind-mode MODE` | `auto`, `force`, or `token_only` | `auto` |\n\n### Examples\n\n```bash\n# Start in foreground\ncodewithphone start\n\n# Start in background (pairing is still interactive)\ncodewithphone start -d\n\n# Start with a specific workspace\ncodewithphone start -w ~/projects\n\n# Start in background pointing to a custom server\ncodewithphone start -d -s https://my-server.example.com\n\n# Re-pair this machine (get a new PIN)\ncodewithphone start --bind-mode=force\n\n# Start with a fixed port\ncodewithphone start -p 9090\n```\n\n## Configuration\n\nConfig is stored in `~/.codewithphone/config.yaml` and is auto-created on first pairing.\n\n```yaml\ndaemon:\n  http_addr: 127.0.0.1:0\n  machine_id: machine-xxxx        # assigned by server\n  machine_token: \"...\"            # assigned on pairing\n  bind_mode: auto\n  max_concurrent_turns: 10\n  server_base_url: https://codewithphone.com/api\n  codex_bin: codex\n  gemini_bin: gemini\n  gemini_model: gemini-3-flash-preview\n  claude_bin: claude\n  claude_model: sonnet\n```\n\n### File layout\n\n```\n~/.codewithphone/\n├── config.yaml         # Configuration (auto-managed)\n├── codewithphone.pid   # PID file (when running in background)\n├── codewithphone.log   # Log file (when running in background)\n└── data/\n    └── agent.db        # Local state (SQLite)\n```\n\nSecurity defaults:\n- `~/.codewithphone` is created with `0700`\n- `config.yaml`, `codewithphone.log`, and `codewithphone.pid` are written with `0600`\n\n### Environment variables\n\nAll settings can be overridden via environment variables:\n\n| Variable | Description |\n|----------|-------------|\n| `CODEWITHPHONE_HOME` | Home directory (default: `~/.codewithphone`) |\n| `CODEWITHPHONE_CONFIG` | Config file path |\n| `CODEWITHPHONE_ADDR` | Listen address (e.g. `127.0.0.1:8081`) |\n| `DAEMON_SERVER_BASE_URL` | Server API URL |\n| `DAEMON_ALLOWED_ROOTS` | Colon-separated workspace root paths |\n| `DAEMON_MAX_CONCURRENT_TURNS` | Max parallel task workers |\n| `DAEMON_CODEX_BIN` | Path to Codex CLI binary |\n| `DAEMON_GEMINI_BIN` | Path to Gemini CLI binary |\n| `DAEMON_CLAUDE_BIN` | Path to Claude Code binary |\n\n## How pairing works\n\n1. `codewithphone start` generates a 6-character PIN and displays it in the terminal\n2. You enter the PIN on [codewithphone.com](https://codewithphone.com) while logged in\n3. The agent detects your entry and prompts you to confirm in the terminal (`Approve? [Y/n]`)\n4. You press `Y` (or Enter) to approve, or `n` to reject and generate a new PIN\n5. A machine token is issued and saved to `~/.codewithphone/config.yaml`\n6. Subsequent starts reuse the token automatically (no re-pairing needed)\n\nWith `-d` (daemon mode), the pairing flow runs in the foreground first. Once approved, the agent forks to the background automatically.\n\nTo re-pair (keeps the same machine ID, only refreshes the auth token):\n\n```bash\ncodewithphone start --bind-mode=force\n```\n\n## Security\n\n- **Local confirmation required**: Every new device pairing must be approved in the terminal where `codewithphone` is running. Even if someone knows your PIN, they cannot bind to your machine without your explicit approval.\n- **Token-based auth**: After pairing, communication uses a machine token stored locally. No passwords are transmitted.\n- **Local listener**: The HTTP server binds to `127.0.0.1` by default (localhost only). It is not accessible from the network.\n\nFor vulnerability reporting, see [SECURITY.md](SECURITY.md).\n\n## Building from source\n\n```bash\ngit clone https://github.com/shotforward/codewithphone.git\ncd codewithphone\nmake build          # produces bin/codewithphone\nmake test           # run tests\n```\n\n## Release Artifacts\n\nEach tag release uploads:\n- `codewithphone_\u003ctag\u003e_linux_amd64.tar.gz`\n- `codewithphone_\u003ctag\u003e_linux_arm64.tar.gz`\n- `codewithphone_\u003ctag\u003e_darwin_amd64.tar.gz`\n- `codewithphone_\u003ctag\u003e_darwin_arm64.tar.gz`\n- `checksums.txt`\n\n## Project Governance\n\n- Contribution guide: [CONTRIBUTING.md](CONTRIBUTING.md)\n- Security policy: [SECURITY.md](SECURITY.md)\n- Support policy: [SUPPORT.md](SUPPORT.md)\n- Code of conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)\n- Trademark policy: [TRADEMARK.md](TRADEMARK.md)\n\n## License\n\nApache License 2.0\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshotforward%2Fcodewithphone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshotforward%2Fcodewithphone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshotforward%2Fcodewithphone/lists"}