An open API service indexing awesome lists of open source software.

https://github.com/eunmin/haskclaw

Telegram ↔ Claude Code bridge bot in Haskell, with per-chat isolation and a cron scheduler (MCP).
https://github.com/eunmin/haskclaw

anthropic claude-code claw cron haskell mcp model-context-protocol scheduler telegram-bot

Last synced: about 2 months ago
JSON representation

Telegram ↔ Claude Code bridge bot in Haskell, with per-chat isolation and a cron scheduler (MCP).

Awesome Lists containing this project

README

          

# haskclaw

Telegram ↔ Claude Code bridge bot with per-chat isolation and a cron scheduler.

## Features

- Long-polling Telegram bot
- Per-chat working directory under `~/.haskclaw/chats//`
- Session resume via `claude -p --resume`
- Scheduler MCP server (`schedule_task`, `list_tasks`, `cancel_task`, ...) — register recurring tasks in natural language

## Requirements

- [Stack](https://haskellstack.org)
- [Claude Code CLI](https://docs.claude.com/en/docs/claude-code) on `PATH`
- A Telegram bot token ([@BotFather](https://t.me/BotFather))

## Build & Run

```sh
stack build
TELEGRAM_BOT_TOKEN=xxx stack exec haskclaw-exe
```

## CLI Options

Pass flags after `--` when running through `stack exec`:

```sh
stack exec haskclaw-exe -- --help
```

| Option | Description |
| --- | --- |
| `-h`, `--help` | Show the help message and exit. |
| `--all`, `--all-messages` | Dispatch every message in group chats. Default behavior is to forward only messages that mention the bot or reply to one of its messages. |
| `--dangerously-skip-permissions` | Forward this flag to the underlying `claude` subprocess so it skips its permission prompts. |

| Environment Variable | Description |
| --- | --- |
| `TELEGRAM_BOT_TOKEN` | Required. Telegram Bot API token from [@BotFather](https://t.me/BotFather). |

## Layout

```
~/.haskclaw/
├── CLAUDE.md # shared instructions (auto-seeded)
├── state.json # chat → session id
└── chats//
├── .mcp.json # haskclaw MCP server registration
├── .claude/settings.json
├── schedules.json # scheduled tasks
└── bot.log
```

## Example

Send to the bot in Telegram:

> "Every morning at 8am, give me the weather."

Claude registers a cron task; the bot delivers the response each tick.

## License

MIT.