SuperAPIAI Directory

hapi-rust

github.com · AI coding

HAPI-Rust is a local-first remote controller and Rust session wrapper for managing sessions of AI coding agents such as Claude Code, OpenAI Codex, Antigravity, Pi, OpenCode, and Cursor Agent in a browser or PWA. Forked from tiann/hapi, it replaces the original per-session Bun/TypeScript wrapper with a Rust binary of about 4.4 MiB, which is claimed to use about 19 times less memory than the Bun/TS approach, and supports automatic sleep after 24 hours. A single Linux or Windows machine can keep more than 100 AI coding sessions alive simultaneously, controlled through a free Web/PWA interface. The project offers downloads for linux-x64, linux-arm64, and windows-x64, and requires hapi and hapi-session-wrapper to be placed in the same bin directory. macOS is currently supported through automatic fallback to the TypeScript wrapper, while a native macOS Rust build is still in progress.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

HAPI-Rust is a local-first remote controller and also a session wrapper written in Rust, aimed at AI coding agents such as Claude Code, OpenAI Codex, Antigravity, Pi, OpenCode, and Cursor Agent. Forked from tiann/hapi, the upstream project remains a pure TypeScript implementation, while HAPI-Rust replaces the per-session Bun/TypeScript wrapper with a Rust binary of about 4.4 MiB, enabling a single Linux or Windows machine to keep more than 100 AI coding sessions alive simultaneously and control them through a free Web/PWA interface.

In terms of main capabilities, HAPI-Rust shares the same hub, Web/PWA, and protocol as upstream, with the key improvements being lower resource usage and automatic sleep. According to the project, 100 Rust wrappers together use only a few hundred MiB of memory, whereas the Bun/TS approach may require 8 to 20 GiB or more; idle sessions automatically sleep after 24 hours. The project also provides an exit-86 automatic fallback mechanism: when a feature has not yet been implemented in Rust, it automatically falls back to the TypeScript wrapper, and fallback can also be disabled by setting HAPI_RUST_WRAPPER_FLAVORS=none.

In terms of usage, users can download the linux-x64, linux-arm64, or windows-x64 versions from the Latest Release, and must ensure that hapi and hapi-session-wrapper are in the same bin directory. The project notes that the upstream npm package @twsxtd/hapi does not include the Rust wrapper. Developers can run cargo test --workspace and bun run test:parity offline without a paid LLM API key.

The main use case is for developers who need to run a large number of AI coding agent sessions in parallel on a single host and want to view and control them remotely through a browser or PWA. In terms of limitations, macOS currently relies on automatic fallback to the TypeScript wrapper, and a native macOS Rust build is still being tracked; some features may not yet be available in Rustand therefore trigger fallback. The project is built on tiann/hapi (AGPL-3.0) and is unrelated to the hapi-rs crate of Houdini Engine.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools