{"id":50124291,"url":"https://github.com/ygncode/pi-web","last_synced_at":"2026-06-03T09:00:54.681Z","repository":{"id":356220956,"uuid":"1230966999","full_name":"ygncode/pi-web","owner":"ygncode","description":"Drive your pi coding agent from any browser on your network — laptop, phone, or tablet.","archived":false,"fork":false,"pushed_at":"2026-05-30T19:24:50.000Z","size":12770,"stargazers_count":8,"open_issues_count":3,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-30T20:09:49.929Z","etag":null,"topics":["coding-agent","pi","remote-control","tailscale-network"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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/ygncode.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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-06T13:49:22.000Z","updated_at":"2026-05-30T14:52:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ygncode/pi-web","commit_stats":null,"previous_names":["ygncode/pi-web"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/ygncode/pi-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygncode%2Fpi-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygncode%2Fpi-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygncode%2Fpi-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygncode%2Fpi-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ygncode","download_url":"https://codeload.github.com/ygncode/pi-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ygncode%2Fpi-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33856287,"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-03T02:00:06.370Z","response_time":59,"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":["coding-agent","pi","remote-control","tailscale-network"],"created_at":"2026-05-23T19:00:50.814Z","updated_at":"2026-06-03T09:00:54.669Z","avatar_url":"https://github.com/ygncode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pi-web (Remote Control Your Pi)\n\nDrive your [pi](https://pi.dev) coding agent from any browser on your network — laptop, phone, or tablet.\n\n\u003e [!WARNING]\n\u003e pi-web is currently in **beta**. Things will change and break!\n\n## Screenshots\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/desktop-dark-mode.png\" alt=\"Desktop — dark mode\" width=\"90%\" /\u003e\u003cbr /\u003e\n  \u003cem\u003eDesktop — dark mode\u003c/em\u003e\n  \u003cbr /\u003e\u003cbr /\u003e\n  \u003cimg src=\"assets/desktop-white-mode.png\" alt=\"Desktop — light mode\" width=\"90%\" /\u003e\u003cbr /\u003e\n  \u003cem\u003eDesktop — light mode\u003c/em\u003e\n  \u003cbr /\u003e\u003cbr /\u003e\n  \u003cimg src=\"assets/mobile-pwa.png\" alt=\"Mobile PWA\" width=\"90%\" /\u003e\u003cbr /\u003e\n  \u003cem\u003eMobile PWA\u003c/em\u003e\n\u003c/div\u003e\n\n## How It Fits Together\n\n```\n pi (terminal)                 Browser (phone / tablet / laptop)\n      │                                │\n      │  writes JSONL                  │  HTTP + SSE\n      ▼                                ▼\n ~/.pi/agent/sessions/  ←───  pi-web (Go HTTP server)\n                                      │\n                    ┌─────────────────┼─────────────────┐\n                    │                 │                 │\n              pi --mode rpc      fsnotify         tailscale serve\n            (per‑session       (live reload)      (remote HTTPS\n             chat worker)                           via MagicDNS)\n```\n\n- **pi** writes conversation JSONL to `~/.pi/agent/sessions/` as it works.\n- **pi-web** is a Go server that reads those files, renders them in the browser, and streams live updates via SSE.\n- **pi --mode rpc** workers handle browser-initiated chat — one per session, reaped after 10 min idle.\n- **fsnotify** watches the sessions directory so the browser reloads within milliseconds of new output.\n- **Tailscale Serve** publishes the localhost server as an HTTPS endpoint on your tailnet.\n\n## Install\n\n```bash\npi install npm:@ygncode/pi-web\n```\n\nThat's it — it downloads the binary, sets up auto‑start, and registers the `/web`, `/remote`, and `/refresh` commands.\n\nOnce installed, open `http://127.0.0.1:31415` in your browser. From pi, use `/web` to open the current session in your browser instantly. If Tailscale is running on your machine, pi-web automatically publishes an HTTPS endpoint on your tailnet — use `/remote` from pi to get a QR code and URL for any device on your tailnet.\n\nFor manual installs, binary downloads, or building from source, see [docs/install.md](docs/install.md).\n\n## Pi Integration\n\nAfter `pi install npm:@ygncode/pi-web`, you get:\n\n| Command | What it does |\n|---------|--------------|\n| `/web` | Open the current session in your browser (SSH-aware: skips browser and shows URL only) |\n| `/pi-web` | Show status, version, start/stop/restart the server, or update |\n| `/remote` | Show a QR code and URL for remote access over Tailscale |\n| `/refresh` | Pull new messages written from remote browsers back into the terminal session |\n\nSession **auto-titling** is built into pi-web itself and configured on the `/settings` page. It's **on by default** and names sessions automatically. You can choose:\n\n- **When to title** — once per session, or on every new message (the default).\n- **Title model** — a free, instant **built-in word heuristic (no AI)** by default, or pick a model (e.g. a small/fast one) for smarter, model-written titles.\n\nThe package also installs the pi-web binary to `~/.pi/agent/bin/pi-web` and sets up auto-start on login.\n\n## Auto-Start on Login\n\nThe `pi install npm:@ygncode/pi-web` command sets this up automatically:\n\n| OS | Mechanism |\n|----|-----------|\n| macOS | launchd plist at `~/Library/LaunchAgents/com.pi-web.plist` |\n| Linux | systemd user service at `~/.config/systemd/user/pi-web.service` |\n\nTo set a token for remote access, create `~/.config/pi-web/env`:\n\n```\nPI_WEB_TOKEN=your-token-here\n```\n\nFor more details (manual setup, custom ports, non-loopback binds), see [docs/install.md](docs/install.md).\n\n## Development\n\n```bash\nmake setup   # install frontend deps and download Go modules\nmake check   # frontend test/build + Go test/vet\nmake build   # setup if needed, build frontend, then build ./pi-web\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fygncode%2Fpi-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fygncode%2Fpi-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fygncode%2Fpi-web/lists"}