# Telebrief
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**AI digests of your Telegram channels, delivered by your own bot**
Telebrief reads your Telegram channels, in any language, summarizes them with OpenAI, Anthropic or a local Ollama model, and sends you a daily digest through your own Telegram bot. The digest can be grouped by channel or by topics the AI picks out. It is written in English, Russian, Spanish, German or French (Russian by default).
Contents
- Features
- Prerequisites
- Quick start
- Bot commands
- Example output: channel mode, topic mode, deduplication
- Per-channel configuration: lookback window, AI instructions
- Persistent storage: SQLite, PostgreSQL, schema
- Extensibility: filters, prompts, group binding, storage queries
- MCP server: enabling, stdio mode, tools, single channel, searching, security
- Development and testing
- FAQ
- Contributing · License · Credits
Features
- Reads channels in any language: English, Russian, Ukrainian, Chinese and so on.
- Writes summaries, labels and bot messages in English, Russian, Spanish, German or French (Russian by default).
- Summarizes with OpenAI (including GPT-6 Luna, Sol and Astra), Anthropic, or a local Ollama model.
- Sends a digest on a daily schedule, or right away when you ask the bot.
- Reads your private chats and channels, not only public ones.
- Groups the digest by channel (default) or by topics such as News, Events and Sport.
- Formats the digest as Markdown with emojis, bullet points and clickable channel links.
- Splits a digest longer than Telegram's 4096-character limit into several messages instead of cutting it off.
- Runs on your own server for a single user. Your session, API keys and messages stay there.
- Deletes old digest messages automatically.
- Can serve digests over an optional MCP endpoint, so AI agents get them without reading Telegram.
Prerequisites
You need four things:
1. **Docker**: install Docker.
2. **Telegram app credentials** (api_id and api_hash) from my.telegram.org.
- If the form at my.telegram.org/apps only shows ERROR, Telegram rejected the request; Telebrief is not involved yet. These usually help:
- Use a unique, random alphanumeric App title and Short name (Short name: 5 to 32 letters or digits, no spaces).
- Turn off VPN, proxy and ad-blocking extensions; try a private window or another browser.
- Switch networks, for example to mobile data instead of Wi-Fi.
- Submit the form a few more times; the check fails intermittently.
- If nothing works, contact Telegram support. Never enter your login code on third-party sites that offer to create an app for you.
3. **A Telegram bot token**. Send /newbot to @BotFather and save the token it gives you.
4. **An AI provider**, one of:
- OpenAI: API key from platform.openai.com
- Anthropic: API key from console.anthropic.com
- Ollama: no key, install it locally
Quick start
You don't need to clone the repository or install Python. In an empty directory, run the setup wizard:
The wizard logs into your Telegram account (phone, code, 2FA), checks the bot token, lets you pick channels from your dialogs by number, and writes .env, config.yaml, docker-compose.yml and sessions/user.session. It takes your user ID from the login.
Then press **Start** in your bot's chat and launch the service:
Send /digest to the bot to get the first digest right away. You can re-run the wizard at any time: it reuses the existing session and asks before overwriting files.
To update to the latest release:
Each release is published to GitHub Container Registry with the tags latest, X.Y (minor) and X.Y.Z (patch). To build from source, replace the image: line in docker-compose.yml with build: .. Settings the wizard doesn't ask about are listed in config.yaml.example.
Bot commands
Message your bot in Telegram:
| Command | Description |
|---------|-------------|
| /start | Same as /help |
| /help | Lists all commands |
| /digest | Builds and sends a digest for the last 24 hours, using the configured digest_mode |
| /status | Shows the AI provider and model, the number of channels, auto-cleanup and the next scheduled run |
| /cleanup | Deletes old digest messages now |
Example output
digest_mode in config.yaml picks one of two layouts.