← Back to Leaderboard
Htiann

tiann/hapi

Local-first CLI and hub for handing off coding-agent sessions across devices

Open-Source AI AppQuickstart ↓
Engineering Health (Methodology)
A · 86/100
Maintenance Activity
● Updated today
Latest Release
v0.37.1
Commercial License Check
AGPL-3.0 · Copyleft Warning

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption20/25
Release Cadence20/20
License Clarity11/20
Self-HostedCLI
Total Stars
★ 5,528
24h Growth
+15
7d Growth
+68
Forks
686

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

tiann/hapi Star History (2025-12-23 - 2026-12-04) ALL-TIME STAR HISTORY (2025-12 – 2026-12) +5.5k in 346d · avg +16/day 5.8k 2.9k 0 2025-12-23: ★ 12026-01-17: ★ 7282026-02-07: ★ 1,2742026-02-28: ★ 1,8772026-03-21: ★ 2,8662026-04-11: ★ 3,3092026-05-02: ★ 3,7002026-05-23: ★ 3,9692026-06-13: ★ 4,1652026-07-04: ★ 4,3122026-07-25: ★ 4,5542026-08-15: ★ 4,6922026-09-05: ★ 4,9062026-09-26: ★ 5,0862026-10-17: ★ 5,2232026-11-07: ★ 5,3592026-12-04: ★ 5,528 ★ 5.5k 2025-12 2026-06 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

HAPI is a local-first control layer for coding agents already installed on a working machine. The hapi CLI wraps an agent’s own terminal session; the hub connects paired clients to it so users can continue the session, send input, and handle approval prompts remotely. Commands still run on the working machine. HAPI is neither a model-serving runtime nor a replacement for the agent CLI.

The TypeScript monorepo has separate cli/, hub/, web/, relay/, and shared/ directories, along with native ios/ and android/ clients. The package scripts expose separate CLI, hub, and web build targets plus a single-executable build. Client integrations have a published contract at docs/api/client-contract/index.md. Relay mode uses WireGuard and TLS to encrypt traffic end to end between the device and the machine.

Key Capabilities & Differentiators

HAPI supports Claude Code, Codex, Cursor Agent, Grok Build, OpenCode, Kimi, Copilot, Antigravity, Pi, and DeepSeek Harness. Its core workflow is handing off an existing session from terminal to remote client and back without restarting it. Simultaneous use is a separate capability: shared Codex sessions support terminal and phone use at the same time with Codex 0.154.0 or later. Do not assume that behavior extends to other agents.

The Web/PWA includes a remote terminal and voice assistant. Native iOS and Android clients support chat, approvals, session creation, files, dictation, and native push; Telegram Mini App is another access option. Workspace browsing is opt-in: start the runner with one or more --workspace-root flags to allow web users to browse the selected trees and create sessions in permitted subdirectories.

Trade-offs & Limitations

Compared with using an agent CLI directly, HAPI adds remote approvals, handoff, and session access across devices, but also introduces a hub, client pairing, and a network path to maintain. It is a local-first alternative to Happy; the practical comparison is whether each tool supports your agents and preserves the workflow you need on your preferred clients. The web/PWA is free, while the distributed native apps are paid.

Treat remote terminal access as access to the working machine, not merely to a chat UI. End-to-end encryption protects data in transit; it does not decide who should be allowed to pair. Workspace root flags scope the browser and session creation, not necessarily terminal or agent execution. For shared deployments, review pairing and host privileges, upstream agent data handling, and the AGPL-3.0 obligations that apply if you modify and serve the software.

Hardware & Deployment Guide

On the work host, install and configure the agent you intend to use, then start the hub with npx @twsxtd/hapi hub --relay and launch an agent session with npx @twsxtd/hapi. Automation must specify the agent explicitly. The hub presents a URL and separate web and companion QR codes for client connection. Cloudflare Tunnel and Tailscale are alternative access paths. The machine must stay on and reachable while clients use its sessions; self-hosting the hub does not make an upstream agent work offline.

Source builds require Bun 1.4.4: run bun install followed by bun run build:single-exe. Recent releases show where the session workflow is evolving: v0.36.8 added local Cursor session import; v0.37.0 grouped spawned sessions under their leader and added web group dissolution; v0.37.1 brought group support, dissolution, and /sessions links to iOS.

Session integration: HAPI wraps existing agent CLIs instead of moving inference or execution into the remote client.
Codex concurrency: Shared sessions support simultaneous terminal and phone use with Codex 0.154.0 or later.
Workspace scope: Repeat hapi runner start --workspace-root flags to expose selected file trees for browsing and session creation.
Remote transport: Relay mode uses WireGuard and TLS for device-to-host encryption; Cloudflare Tunnel and Tailscale are other documented access paths.
Client split: The free Web/PWA includes terminal access and a voice assistant; paid native iOS and Android apps support dictation and native push notifications.
Session organization: v0.37.0 groups spawned sessions under a leader and adds web group dissolution; v0.37.1 extends group support to iOS.
Best For

Developers and small teams that already run supported coding agents on a reachable machine and want remote approvals or session handoff without changing their terminal workflow.

Skip If

You need a managed execution host, sandboxed execution for multiple users, or offline inference independent of the agent you choose.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Self-HostedCLI
npx @twsxtd/hapi hub --relay     # start hub with E2E encrypted relay
npx @twsxtd/hapi                 # choose an agent and start a session

Comparison vs. Top Coding, Skills & MCP Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
hapi ★5.5k+68TypeScriptAGPL-3.0Local-first CLI and hub for handing off coding-agent sessions across devices
cc-switch159.1k+1.7kRustMITTauri desktop manager for AI coding providers, local routing, and MCP config
magpie45.5k+2.9kGoMITA local API gateway that pools model subscriptions across coding agents
herdr54.1k+871RustApache-2.0Rust terminal multiplexer for persistent, multi-machine coding-agent workspaces

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/tiann/hapi.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

tiann/hapi Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about hapi

Does HAPI replace the coding agent, and how do scripts start a session?

HAPI wraps the existing agent CLI and connects its session to a hub for remote access. It does not replace the agent or its model backend. Interactive hapi lets you select an agent; scripts must name one explicitly, for example hapi codex.

How much CPU, memory, or VRAM should I budget?

Size the agent and HAPI separately. HAPI coordinates sessions and serves clients; GPU and VRAM needs depend on where and how the selected agent runs inference. There are no fixed CPU, RAM, or VRAM figures to plan around. Measure host load with the agents, concurrent sessions, and remote terminal usage you expect.

Can a company self-host HAPI, and what does AGPL-3.0 require?

AGPL-3.0 permits commercial use; it is not a noncommercial license. If you modify the covered software and let users interact with it remotely over a network, the license requires offering those users the Corresponding Source of the modified version. Distribution has its own obligations. The paid native apps are separate from the free web/PWA client, so review the relevant terms before rollout.

How should I choose between HAPI, Happy, and the agent CLI on its own?

Use the agent CLI alone if everyone works on the host and remote approvals or handoff would add little value. HAPI is a local-first alternative to Happy for teams that want to keep their existing agent CLI while adding a self-hosted hub and remote clients. For a choice between the two, test agent compatibility, handoff behavior, and the client and network setup you intend to use; there is no basis here for a performance ranking.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining tiann/hapi? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature tiann/hapi on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare