mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
Enables building hapi as standalone Bun-compiled executables for macOS, Linux, and Windows (x64/arm64). Adds build script, bootstrap entry point, runtime asset management, and automatic deployment of bundled tools (ripgrep, difftastic). Includes MCP stdio bridge support and proper environment handling for compiled binaries. Updates documentation with build and installation instructions for single executable distribution.
2.0 KiB
2.0 KiB
hapi
Code on the go controlling Claude Code from your mobile device.
Free. Open source. Code anywhere.
Installation
# Download the prebuilt hapi binary for your platform
# (macOS/Linux/Windows x64/arm64) and place it on your PATH.
Usage
hapi
This will:
- Start a Claude Code session
- Register the session with your
hapi-serverinstance - Allow real-time session control from the Telegram Mini App
Commands
hapi auth– Manage authenticationhapi codex– Start Codex modehapi mcp– Start MCP stdio bridgehapi connect– Not available in direct-connect modehapi notify– Not available in direct-connect modehapi daemon– Manage background servicehapi doctor– System diagnostics & troubleshooting
Options
-h, --help- Show help-v, --version- Show version-m, --model <model>- Claude model to use (default: sonnet)-p, --permission-mode <mode>- Permission mode: auto, default, or plan--claude-env KEY=VALUE- Set environment variable for Claude Code--claude-arg ARG- Pass additional argument to Claude CLI
Environment Variables
HAPPY_BOT_URL- Bot URL (default: http://localhost:3006)CLI_API_TOKEN- Shared secret for bot authentication (required)HAPI_HOME_DIR- Custom home directory for hapi data (default: ~/.config/hapi)HAPPY_EXPERIMENTAL- Enable experimental features (set totrue,1, oryes)
Requirements
- Prebuilt hapi binary (no Bun or Node required at runtime)
- Claude CLI installed & logged in (
claudecommand available in PATH) - Bun (for building from source)
Building the executable
# From repo root
bun run build:cli:exe
bun run build:cli:exe -- --target bun-darwin-x64
# Platform-only target uses the host arch
bun run build:cli:exe -- --target bun-linux
# Build all targets
bun run build:cli:exe:all
Note: Windows arm64 builds require arm64 tool archives in cli/tools/archives.
License
MIT