Skip to main content

General

HAPI is a local-first, self-hosted platform for running and controlling AI coding agents (Claude Code, Codex, Gemini, OpenCode) remotely. It lets you start coding sessions on your computer and monitor/control them from your phone.
HAPI (哈皮) is a Chinese transliteration of “Happy”, reflecting the project’s goal of making AI coding assistance a happier experience by freeing you from the terminal.
Yes, HAPI is open source and free to use under the AGPL-3.0-only license.
HAPI supports:
  • Claude Code (recommended)
  • OpenAI Codex
  • Cursor Agent
  • Google Gemini
  • OpenCode

Setup & Installation

HAPI includes an embedded hub. Just run hapi hub on your machine - no external hub required.
hapi server remains supported as an alias.
For local network access:
http://<your-computer-ip>:3006
For internet access:
  • If the hub has a public IP, access it directly (use HTTPS via reverse proxy for production)
  • If behind NAT, set up a tunnel (Cloudflare Tunnel, Tailscale, or use the built-in relay with hapi hub --relay)
The CLI_API_TOKEN is a shared secret that authenticates:
  • CLI connections to the hub
  • Web app logins
  • Telegram account binding
It’s auto-generated on first hub start and saved to ~/.hapi/settings.json.
The auto-generated token is 256-bit (cryptographically secure).
Yes. HAPI supports lightweight multi-account access via namespaces for shared team hubs. See the Namespace documentation for details.
Yes. Telegram is optional. You can use the web app directly in any browser or install it as a PWA.

Usage

  1. When your AI agent requests permission (e.g., to edit a file), you’ll see a notification
  2. Open HAPI on your phone
  3. Navigate to the active session
  4. Approve or deny the pending permission
HAPI supports two methods:
  1. PWA Push Notifications - Enable when prompted, works even when app is closed
  2. Telegram Bot - Set up a Telegram bot for instant notifications
PWA notifications work even when the app is closed on your device.
Yes, with runner mode:
  1. Run hapi runner start on your computer
  2. Your machine appears in the “Machines” list in the web app
  3. Tap to spawn new sessions from anywhere
In the session view, tap the “Files” tab to:
  • Browse project files
  • View git status
  • See diffs of changed files
Yes. Open any session and use the chat interface to send messages directly to the AI agent.
Yes. Open a session in the web app and tap the Terminal tab for a remote shell.
Set ELEVENLABS_API_KEY, open a session in the web app, and click the microphone button. See the Voice Assistant documentation for details.

Security

Yes. HAPI is local-first:
  • All data stays on your machine
  • Nothing is uploaded to external servers
  • The database is stored locally in ~/.hapi/
The auto-generated token is 256-bit (cryptographically secure). For external access, always use HTTPS via a tunnel.
Always use HTTPS for external access to protect your token in transit.
Only if they have your access token. For additional security:
  • Use a strong, unique token
  • Always use HTTPS for external access
  • Consider Tailscale for private networking

Comparison

AspectHappyHAPI
DesignCloud-firstLocal-first
UsersMulti-userSingle user
DeploymentMultiple servicesSingle binary
DataEncrypted on serverNever leaves your machine
See Why HAPI for detailed comparison.
FeatureClaude CodeHAPI + Claude Code
Remote accessNoYes
Mobile controlNoYes
Permission approvalTerminal onlyPhone/web
Session persistenceNoYes
Multi-machineManualBuilt-in

Contributing

Visit the GitHub repository to:
  • Report issues
  • Submit pull requests
  • Suggest features
Open an issue on GitHub Issues.

Build docs developers (and LLMs) love