- Streaming: use claude --output-format stream-json, edit TG message
every 5s with progress, show tool use status during execution,
◎ cursor indicator while processing
- File transfer: download user uploads to ~/incoming/, scan
~/outgoing/{sid}/ for new files after claude completes
- Error handling: wrap post-auth logic in handle_inner, all errors
reply to user instead of silently failing
- Remote deploy: make deploy-hera via SSH, generate service from
template with dynamic PATH/REPO
- Service: binary installed to ~/bin/noc, WorkingDirectory=%h
- Invoke claude directly instead of ms wrapper
- Session state persisted to disk across restarts
NOC
Telegram bot that bridges messages to claude sessions.
How it works
- User sends a message to the bot
- First message must be the auth passphrase, otherwise the bot replies "not authenticated"
- Once authenticated, messages are piped to
ms --resume <session_id>via stdin claudestdout is sent back as the reply- Sessions are scoped per chat and refresh daily at 5am local time
Setup
cp config.example.yaml config.yaml
# edit config.yaml with your values
Config
| Key | Description |
|---|---|
tg.key |
Telegram bot token |
auth.passphrase |
Passphrase required to authenticate each session |
session.refresh_hour |
Hour (local time, 24h) when sessions reset |
Deploy
make deploy
This builds the release binary and installs a systemd --user service.
Logs
journalctl --user -u noc -f
Description
Languages
Rust
99%
Makefile
1%