Files
hapi/README.md
T
weishu 4f03f29ac3 docs: rebrand Happy to HAPI and add component documentation
This commit rebrands the project from "Happy" to "HAPI" throughout the codebase, including documentation, comments, logs, and tool references. It also adds comprehensive README files for the server and web components, clarifies the monorepo structure in AGENTS.md and root README.md, and removes the outdated roadmap.md file.

Changes include:
- Rebrand references from Happy to HAPI in CLI, server, and web components
- MCP tool names updated from mcp__happy__ to mcp__hapi__
- Process/service names updated consistently
- New server/README.md with deployment and configuration guide
- New web/README.md with stack and development instructions
- Updated root README.md with quickstart guide
- Updated AGENTS.md with cleaner structure documentation
- Removed cli/roadmap.md (now superseded by documentation)
2025-12-21 18:49:04 +08:00

2.0 KiB

hapi

HAPI means "哈皮," a Chinese transliteration of happy, great credit to the original Happy project.

Run Claude Code / Codex / Coding Agent sessions locally and control them remotely through a Web / PWA / Telegram mini App.

Quickstart (single executable)

  1. Download the prebuilt hapi binary for your platform and put it on your PATH.

  2. Start the server on a machine you control:

export TELEGRAM_BOT_TOKEN="..."
export ALLOWED_CHAT_IDS="12345678"
export CLI_API_TOKEN="shared-secret"
export WEBAPP_URL="https://your-domain.example"   # required for Telegram Mini App

hapi server
  1. If the server has no public IP, expose it over HTTPS:
  1. Run the CLI on the machine where you want sessions:
# If the server is not on localhost:3006
export HAPI_BOT_URL="https://your-domain.example"

hapi

The CLI will prompt for CLI_API_TOKEN and save it locally.

  1. Open the UI:
  • In Telegram, run /app in the bot chat.
  • In a browser, open WEBAPP_URL and log in with CLI_API_TOKEN.

CLI config file

You can store the token in ~/.config/hapi/settings.json instead of an env var. Environment variables take priority over the file.

Example:

{
    "cliApiToken": "shared-secret"
}

Requirements

  • Claude CLI installed and logged in (claude on PATH).
  • A Telegram bot token from @BotFather (for Mini App access).
  • Bun if building from source.

Build from source

bun install
bun run build

Build a single binary with embedded web assets:

bun run build:single-exe

Build CLI-only binaries:

bun run build:cli:exe
bun run build:cli:exe:all

Docs

  • cli/README.md - CLI usage and config
  • server/README.md - server setup and architecture
  • web/README.md - web app behavior and dev workflow