Hapi.run, a wrapper for CLI agents (Claude Code, Codex, Gemini-cli). clone of happy.engineering (which is buggy and glitchy, but has its advantages).
Consists of three parts:
- Server
- Client
- Daemon (but we don't need it today)
➡️ Quick launch:
1️⃣ Install the project:npm install -g @twsxtd/hapi
2️⃣ Enter the bot token (first, you need to create it in @botfather):
export TELEGRAM_BOT_TOKEN=111:TOKEN_BOTA
3️⃣ Start the server:hapi server
In the screenshot, I showed how the server generates a token (a password). If everything is done correctly, you'll see at the bottom that your bot has started.
4️⃣ However, the bot won't work without a tunnel (it needs to attach buttons from the mini app):
• cloudflare (without registration)
• ngrok (with registration)
• or something else.brew install cloudflarecloudflare tunnel --url http://localhost:3006
You'll see the tunnel address. Which you need to export:export WEBAPP_URL="https://your-public-url"
As you've probably guessed, the client will connect to the server. To start the client, enter:hapi
The client will ask you to enter the token, which you already received in the previous step. If you forgot to start the server - it will be started automatically.
5️⃣ In your bot, be sure to press /start
The bot will respond with a welcome message with a link to the mini app - enter the token in the mini app. Now you can manage your coding agents from your desktop and mobile simultaneously and receive all notifications via SMS in the Telegram bot.
All settings are stored in~/.hapi/settings.json- edit them if something has changed, for example the tunnel address, or check the token there if you've forgotten it.
🦾 @PromptXplore
