What is HAPI?
HAPI is a local-first platform that lets you run AI coding agents (Claude Code, Codex, Cursor Agent, Gemini, OpenCode) on your machine and control them remotely through web, PWA, and Telegram.Seamless Handoff
Work locally, switch to remote when needed, switch back anytime. No context loss, no session restart.
Native First
HAPI wraps your AI agent instead of replacing it. Same terminal, same experience, same muscle memory.
AFK Without Stopping
Step away from your desk? Approve AI requests from your phone with one tap.
Your AI, Your Choice
Claude Code, Codex, Cursor Agent, Gemini, OpenCode—different models, one unified workflow.
Why HAPI?
HAPI is a local-first alternative to Happy. While Happy uses a centralized server that stores your encrypted data, HAPI is decentralized—each user runs their own hub, and data never leaves your machine.| Aspect | Happy | HAPI |
|---|---|---|
| Architecture | Centralized (cloud server stores encrypted data) | Decentralized (each user runs own hub) |
| Data | Encrypted on server (server cannot read) | Stays on your machine |
| Deployment | Multiple services (PostgreSQL, Redis, app server) | Single binary |
| Complexity | High (E2EE, key management, scaling) | Low (one command) |
Choose HAPI if: You want data sovereignty, self-hosting, and minimal setup.Choose Happy if: You need a managed cloud service with multi-user collaboration.
How It Works
HAPI consists of three components that work together:HAPI Hub
Central coordinator that handles persistence, real-time sync, and remote access. Runs on your machine with a single command.
HAPI CLI
Wraps AI agents (Claude Code, Codex, Cursor, Gemini, OpenCode) and connects them to the hub via Socket.IO.
Architecture Overview
Key Features
Terminal Anywhere
Run commands from your phone or browser, directly connected to the working machine.Voice Control
Talk to your AI agent hands-free using the built-in voice assistant powered by ElevenLabs.Multi-Agent Support
Remote Session Spawning
With the runner, spawn new sessions from your phone:Security Model
HAPI offers two modes of remote access:Public Relay
End-to-end encrypted with WireGuard + TLS via
tunwg. The relay only forwards encrypted packets it cannot read.Self-Hosted
Run on your own server, Cloudflare Tunnel, or Tailscale. You control the full network path—no E2EE needed.
Supported AI Agents
| Agent | Command | Requirements |
|---|---|---|
| Claude Code | hapi | Claude CLI installed (claude on PATH) |
| OpenAI Codex | hapi codex | Codex CLI installed |
| Cursor Agent | hapi cursor | Cursor Agent CLI installed (agent on PATH) |
| Google Gemini | hapi gemini | Gemini CLI installed (via ACP) |
| OpenCode | hapi opencode | OpenCode CLI installed (opencode on PATH) |
Quick Example
Get started in under 2 minutes:Next Steps
Quickstart
Get HAPI running in under 2 minutes
Installation
Complete setup guide with all installation options
How It Works
Deep dive into architecture and data flow
GitHub
View source code and contribute