HAPI Remote Agent Console
Run coding agents on your own machine and take over from phone, web or Telegram without restarting a session.
- Source repo
- tiann/hapi
- Stars
- ★ 5.3k
- Last updated
- 1d ago
- License
- AGPL-3.0
- Primary language
- TypeScript
- FA score
- 62/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformCodex · Claude CodeChatGPT (Partial support)
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A developer who leaves the desk and still needs to approve Claude Code permission prompts remotely.
- Not a fit if
- Users who never want to touch a terminal
- Teams that forbid any relay traffic
- Individuals unwilling to run a hub or self-host tunnels
- Source review
- 62/100 · Some gaps
What does this agent do, and when should you use it?
HAPI is a local-first remote control layer that wraps official Claude Code, Codex, Cursor Agent, Grok Build, OpenCode, Kimi, Copilot, Antigravity, Pi and DeepSeek Harness sessions so you can move between the terminal and a phone without losing context. It ships a hub process, a Web/PWA front end, native SwiftUI/UIKit and Kotlin Compose clients, and a Telegram Mini App. For transport it offers an opt-in relay using WireGuard + TLS for end-to-end encryption from device to machine, or self-hosted options such as Cloudflare Tunnel and Tailscale. The deployment boundary is your own machine or server: start the hub via npx, then scan a QR code or open the printed URL. Beyond chat it exposes one-tap approval of agent requests, shell command execution from a mobile browser, dictation and a web voice assistant, plus opt-in scoped file browsing enabled through hapi runner start --workspace-root.
npx @twsxtd/hapi hub --relay starts the hub locally (hapi server is an alias) and prints a web URL plus two QR codes. npx @twsxtd/hapi prompts you to pick an agent and open a session, while hapi claude or hapi codex launches a named agent directly. The hub wraps that agent process, forwards session output to the native iOS/Android clients, Web/PWA or Telegram Mini App, and routes phone-side input, approvals and commands back into the terminal. From the phone you can approve agent requests in one tap, create sessions, browse files, dictate input or drive the agent with the web voice assistant, and run shell commands from the mobile browser. hapi runner start --workspace-root <path> exposes a scoped directory tree so new sessions can be started in permitted subdirectories. Codex 0.154.0+ allows the terminal and phone to share one session concurrently.
- A developer who leaves the desk and still needs to approve Claude Code permission prompts remotely.
- An engineer who wants to check on a running Codex session from a phone without restarting it in the terminal.
- A self-hoster running agents on a home server or VPS who prefers a browser or iPhone as the only interface.
- A mobile-first user who dictates instructions with voice rather than typing on a small screen.
- A team standardising remote control across several agents such as Claude Code, OpenCode and Kimi behind one UI.
- A platform engineer who wants session creation confined to explicitly allowed workspace subdirectories.
How do you install or deploy this agent?
npx usage requires a Node.js runtime; building from source requires Bun 1.4.0.
Start the hub directly with npx, including the end-to-end encrypted relay:
npx @twsxtd/hapi hub --relayBuild the single-file executable from source:
bun install
bun run build:single-exeNative app build and pairing steps live in ios/README.md and android/README.md; self-hosted deployment (Cloudflare Tunnel, Tailscale) is covered in docs/guide/installation.md.
How do you use this agent?
After the hub starts it prints a web URL and two QR codes: open the URL in a browser, or pair a native app with the companion QR code.
Launch a specific agent directly:
hapi claude
hapi codexWithout an argument, the UI asks which agent to start; scripts must name the agent explicitly. See the available commands and agents:
hapi --helpExpose a scoped workspace and start a session inside it:
hapi runner start --workspace-root /path/to/projectWhat are this agent's strengths and limitations?
- Wraps the original agent process, so terminal behaviour and muscle memory stay intact and remote handoff never restarts the session.
- The relay uses WireGuard + TLS for end-to-end encryption, and Cloudflare Tunnel or Tailscale can replace it entirely.
- Native iOS/Android clients coexist with Web/PWA and a Telegram Mini App, covering approvals, session creation, files, dictation and push notifications.
- Codex 0.154.0+ supports one shared session used from terminal and phone at the same time.
- One interface spans Claude Code, Codex, Cursor Agent, OpenCode, Kimi, Pi and more.
- You must run and maintain the hub yourself, and long-term use involves either the relay or your own tunnel — it is not a managed hosted service.
- Building the single-file executable requires Bun 1.4.0, an extra runtime constraint.
- Shared Codex sessions only work on Codex 0.154.0 or newer.
- AGPL-3.0 imposes compliance obligations on redistribution and derivative works.
- The default relay routes session traffic through a third party (encrypted end to end), so organisations with data-residency rules need the self-hosted path.
How does this agent compare with similar options?
The README explicitly positions HAPI as a local-first alternative to Happy and points to docs/guide/why-hapi.md for the differences, noting that HAPI ("哈皮") is a transliteration of Happy and credits the original project. Happy is the only named alternative; Claude Code, Codex and the other agents are the targets HAPI wraps, not substitutes.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| HAPI Remote Agent Console This agent | 62 · Some gaps | CLIFree + model costs | ★ 5.3k | 1d ago | TypeScript | Codex · Claude Code |
| Vicoa | 52 · Major gaps | Desktop appFree + model costs | ★ 516 | 10d ago | Python | Codex · Claude Code |
| OtoDock | 77 · Good | Self-hosted serviceFreemium | ★ 191 | 6d ago | Python | Codex · Claude Code |
| Tessera | 74 · Some gaps | Desktop appFree + model costs | ★ 315 | today | TypeScript | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
The privacy policy is unusually detailed about data flows (hub, push relay, FCM/APNs, transcription and model providers), which is a genuine strength for data-flow transparency. Least privilege is weak: without --workspace-root the runner can browse and spawn sessions anywhere the OS account can reach, and it exposes a remote terminal PTY, so the permission surface is large and only optionally narrowed — scored 1. User confirmation exists via remote permission approve/deny from phone, but no enforced confirmation for destructive or externally effectful actions — 2. Sensitive data handling: 256-bit token, HTTPS enforced on Android, platform-protected credential storage, and test env whitelisting that blocks secret leakage are good; however the push relay keeps correlatable token hashes and source IPs, and private FCM builds send unencrypted payloads — 2. Dependency security: only package.json and a pinned Bun version are visible; no dependency audit, lockfile review, or vulnerability remediation evidence — 1. External effects: remote terminal, session spawning, attachment upload and push all produce real external effects; documented but without a unified confirmation/audit mechanism — 1. Rollback: runner stop, session stop, version handoff and doctor clean exist, but no session/data-level rollback or undo — 1. Source attribution: README credits Happy and states HAPI derives from it, LICENSE is AGPL-3.0, attribution is clear; publisher identity is unverified, so 2.
Self-consistency: README, installation and FAQ agree on commands (hapi hub, hapi server alias, runner, doctor), ports and config — 2. Dependency availability: requires Bun 1.4.0, external agent CLIs, tunwg download, npm platform packages and a Homebrew tap; any missing piece breaks install, and docs admit mirrors may lag — 1. Failure messages: FAQ and hapi doctor cover connection refused, invalid token, runner startup and missing agent with concrete steps, and test code insists scan failures must throw rather than silently pass — 2.
Audience and scenarios: targets many agents (Claude Code, Codex, Cursor, Grok, OpenCode, Kimi, etc.) and many clients (iOS/Android/Web/PWA/Telegram) across local, remote and AFK-approval scenarios — 3. Capability boundaries: docs note remote mode does not move execution, laptop sleep interrupts sessions, Windows needs Bun 1.3.14+, but some features (shared Codex sessions, voice) are described thinly — 2. Trigger precision: it is a CLI/service rather than a prompt-driven agent, with no explicit trigger conditions or scope definition — 1. Environment fit: covers macOS/Linux/Windows, self-hosting and relay, Tailscale/Cloudflare, but with platform caveats — 2.
Information architecture: README plus a well-separated docs/guide set (installation, FAQ, privacy, native apps, deployment) — 3. Install notes: npm, npx, Homebrew, prebuilt binary, source build, plus hub/runner configuration — 3. Naming stability: hapi server and hapi hub aliases coexist and the package name @twsxtd/hapi differs from the repo name, showing naming legacy — 2. Examples and FAQ: extensive FAQ with comparison tables and troubleshooting — 3. Known limitations: sleep, LAN binding and Windows PTY caveats appear in FAQ but there is no consolidated limitations list — 2. License: full AGPL-3.0 text in LICENSE and AGPL-3.0-only stated in FAQ — 3. Versioning/changelog: only release workflows and version inputs; no CHANGELOG — 1. Maintenance responsibility: SECURITY.md is a single line pointing to advisories, with no maintainers, support scope or SLA, and publisher identity is unverified — 1.
Output usability: terminal, web, native apps and approval flows are practical, but this static review did not verify runtime behavior — 2. Marginal value: adds remote control, session persistence and multi-machine support over using agent CLIs directly, though at deployment cost — 2. Cost-benefit: requires self-hosted hub, runner, HTTPS/relay, multi-platform builds and coordinated upgrades across machines, a high operational burden — 1.
Claim traceability: most claims in the privacy policy and installation docs map to repository files and config keys — 2. Cross-source corroboration: README, FAQ, installation and privacy docs corroborate commands, ports and push modes — 2. Fact/inference separation: docs distinguish self-hosted data from external services and the privacy policy labels metadata versus encrypted content, but there is no independent validation of security claims — 2.
- Without --workspace-root the runner can browse and spawn sessions anywhere the OS account can reach and exposes a remote terminal; restrict workspace roots explicitly before deployment.
- The default official push relay at push.hapi.run processes device tokens, encrypted envelopes and source IPs; private FCM builds send unencrypted notification payloads, which needs compliance review.
- Install depends on Bun 1.4.0, external agent CLIs, a tunwg download and npm platform packages; a long chain where mirror lag or version mismatch breaks setup.
- Publisher identity is unverified and SECURITY.md is a single line, with no maintainers, support scope or vulnerability-response commitment.
- No CHANGELOG and no dependency security audit evidence, leaving upgrade and vulnerability-handling paths opaque.
FAQ
Does HAPI call an LLM itself, and who pays?
Is the official relay mandatory?
--relay is the quick-start path; the docs also describe Cloudflare Tunnel and Tailscale deployments that avoid the relay entirely.What can I do from the phone, and what can't I do?
hapi runner start --workspace-root.Which agents are supported?
hapi --help to see the list the installed version actually accepts.