{"id":49826706,"url":"https://github.com/initialz/cloudcode","last_synced_at":"2026-06-13T19:01:03.182Z","repository":{"id":357038792,"uuid":"1235088043","full_name":"initialz/cloudcode","owner":"initialz","description":"Self-hosted gateway that lets you drive your own `claude` from any terminal, anywhere. Streams a native tmux +   claude session from the host where you ran `claude /login` to your laptop, phone, or SSH terminal — PTY bytes only,   OAuth never leaves the agent. Persistent workspaces, two-way ACL, embedded admin UI.","archived":false,"fork":false,"pushed_at":"2026-06-08T01:20:03.000Z","size":1638,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-08T03:16:39.223Z","etag":null,"topics":["anthropic","claude","claude-code","coding-agent","developer-tools","llm-gateway","pty","react","remote-development","rust","self-hosted","terminal","tmux","websocket"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/initialz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-11T02:08:10.000Z","updated_at":"2026-06-08T01:20:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/initialz/cloudcode","commit_stats":null,"previous_names":["initialz/cloudcode"],"tags_count":95,"template":false,"template_full_name":null,"purl":"pkg:github/initialz/cloudcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initialz%2Fcloudcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initialz%2Fcloudcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initialz%2Fcloudcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initialz%2Fcloudcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/initialz","download_url":"https://codeload.github.com/initialz/cloudcode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/initialz%2Fcloudcode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34296383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["anthropic","claude","claude-code","coding-agent","developer-tools","llm-gateway","pty","react","remote-development","rust","self-hosted","terminal","tmux","websocket"],"created_at":"2026-05-13T17:02:15.752Z","updated_at":"2026-06-13T19:01:03.177Z","avatar_url":"https://github.com/initialz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudCode\n\n\u003e Drive your own `claude` from any terminal, anywhere.\n\n`claude /login` runs on one host — your workstation, a home server, a cloud VM. CloudCode lets you talk to that claude from a laptop, a phone, any SSH terminal, without copying credentials around. The remote terminal **is** the native claude TUI; CloudCode just streams PTY bytes.\n\n**Solo use only.** Subscription plans (Claude Max / Pro) are per-individual under Anthropic's Terms of Service. Sharing one across users violates them and the account may get banned. One user → one subscription → one agent.\n\n![architecture](docs/architecture.svg?v=5)\n\n## Highlights\n\n- **Native claude TUI, end to end.** No wrapper layer — slash commands, todos, diffs, permission prompts all work because CloudCode forwards raw PTY bytes from `tmux+claude` on the agent.\n- **Persistent workspaces.** Close the laptop, lose Wi-Fi, switch from terminal to phone. tmux + claude keep running on the agent. Reconnect and pick up exactly where you left off, mid-task.\n- **Webterm with native UX.** Self-hosted SPA at `/` — DOM-rendered xterm.js with native scroll, native text selection, browser Cmd+C copy, 50k-line scrollback persisted across page refresh via IndexedDB.\n- **File manager.** Browse workspace files in-browser, multi-select, download as zip archive (files and directories).\n- **macOS Seatbelt sandbox (opt-in).** Each workspace's claude runs sealed off from `~/.ssh`, Keychain, sibling workspaces, and cross-account state. Browser automation (Playwright) allowed.\n- **Self-hosted admin UI.** Single binary, embedded React SPA at `/admin/`. Manage accounts (with real names) and agents with **two-way strict-whitelist ACL**, browse live \u0026 historical workspaces, sessions, and audit events.\n- **Credentials stay put.** OAuth tokens never leave the agent host. The client only ever sees terminal bytes.\n\n## Quick start\n\n```bash\n# on the public host:\ncurl -fsSL https://raw.githubusercontent.com/initialz/cloudcode/main/install.sh | sh -s -- hub\ncloudcode-hub --init \u0026\u0026 cloudcode-hub daemon start --config ./hub.toml\n# save both tokens it prints: one for agents, one for the admin UI\n\n# on the host with your claude login:\ncurl -fsSL https://raw.githubusercontent.com/initialz/cloudcode/main/install.sh | sh -s -- agent\ncloudcode-agent --init \u0026\u0026 $EDITOR agent.toml \u0026\u0026 cloudcode-agent daemon start --config ./agent.toml\n\n# on your laptop:\ncurl -fsSL https://raw.githubusercontent.com/initialz/cloudcode/main/install.sh | sh -s -- client\ncloudcode --init \u0026\u0026 $EDITOR ~/.config/cloudcode/config.toml \u0026\u0026 cloudcode\n```\n\n\u003e **Browser preset:** the default web-browsing backends on both the agent (headless) and the client (visible window) run `@playwright/mcp` via `npx` — install **node \u003e= 18** on both machines to use them. Without node, everything else works; browser tool calls return an actionable error instead. The agent `web` (headless) backend also needs the agent's sandbox to allow chromium; if your agent runs claude in a strict sandbox that blocks chromium (confirmed on macOS), set `[browser].web_enabled = false` (local `cc-browser` is unaffected) or relax the sandbox profile.\n\u003e 使用 cc-browser(本地有头)后端时,浏览器在你本机产生的截图/PDF 会自动回传到 agent workspace 的 `.cloudcode/browser-artifacts/`,远程 claude 可直接读取(单个产物 ≤ 10 MiB)。\n\nOpen the admin UI at `http://\u003chub\u003e:7101/admin/`, paste the admin token, grant your account access to the agent, and you're done. The user-facing browser client lives at `http://\u003chub\u003e:7100/`.\n\n### Windows (WSL2)\n\nCloudCode's agent uses tmux for session persistence; native Windows builds aren't shipped yet. The recommended path is WSL2.\n\n**From a native Windows PowerShell window (not inside WSL):**\n\n```powershell\n# default is agent; set CC_COMPONENT to \"hub\" or \"client\" if needed\niwr -useb https://raw.githubusercontent.com/initialz/cloudcode/main/install.ps1 | iex\n```\n\nThe script makes sure WSL2 is installed and then runs the Linux installer inside your default distro.\n\n**If you're already inside a WSL shell** (e.g. `wsl` then a bash prompt), skip the PowerShell wrapper and use the Linux one-liner directly:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/initialz/cloudcode/main/install.sh | sudo sh -s -- agent\n```\n\nAfter install your agent lives inside WSL2. Start it from a WSL shell with `cloudcode-agent daemon start --config ./agent.toml` after editing the config.\n\n## Documentation\n\n→ **[User Guide](docs/USER_GUIDE.md)** — installation in depth, multi-tool setup, web UI walkthrough, CLI menu / persistence rules, macOS sandbox, admin UI, self-update, troubleshooting.\n\n→ [`docs/architecture.svg`](docs/architecture.svg) · [`hub.example.toml`](hub.example.toml) · [`agent.example.toml`](agent.example.toml)\n\n## Acknowledgements\n\nmacOS Seatbelt sandbox design inspired by [boxsh](https://github.com/xicilion/boxsh). No boxsh code is included (boxsh is GPL v3); CloudCode is MIT.\n\n## License\n\nMIT. Provided as is, without warranty. The authors are not liable for any use that violates third-party Terms of Service.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finitialz%2Fcloudcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finitialz%2Fcloudcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finitialz%2Fcloudcode/lists"}