Skip to main content

A Telegram bot that interfaces with a self-hosted Readeck instance to manage bookmarks. It's based on the python-telegram-bot framework.

Features:

  • /register (create a new user) or /token to register the bot with an existent user
  • Save bookmarks by sending a URL (with optional title and tags).
  • Read. Create a simplified version of the article in telegra.ph
  • /md_ return the raw markdown
  • /list . unread articles
  • /epub generate an epub with the unread articles
  • /version show the current bot version
  • /restart restart the bot process (for upgrades, requires systemd or similar process manager)

Setup a development environment

1. Clone the bot repository

git clone https://github.com/mgaitan/readeckbot.git
cd readeckbot

2. Download the Readeck binary

Download the appropriate binary for your system from the official site: https://readeck.org/en/download

Place the readeck binary in the same directory as the bot code.

3. Start the Readeck API server in a console

Open a terminal and run

./readeck serve

or readeck.exe serve on Windows

This will start the Readeck backend on http://127.0.0.1:8000 by default.

4. Set up your environment variables

Create a file named .env in the project root. This file stores config variables used by the bot.

TELEGRAM_BOT_TOKEN=<your_bot_token>
READECK_BASE_URL=http://127.0.0.1:8000
READECK_CONFIG=./config.yaml      # optional, can be left out
READECK_DATA=./data               # optional, use if you want to customize where data is stored

LLM_KEY=<your_llm_key>           # optional, use if you want to enable LLM features
LLM_MODEL=<model_name>           # optional, by default it's gemini-2.0-flash-lite
LLM_SUMMARY_MAX_LENGTH=<int>     # optional , use if you want to customize the max length of LLM summary

📄 What’s a .env file? It's a simple file format for storing key=value pairs, that are loaded as environment variables by apps.

5. Get your own Telegram bot token

To connect your bot to Telegram, you’ll need to create a bot and get its API token.

  • Open Telegram and message @BotFather
  • Run /newbot and follow the prompts.
  • Copy the token it gives you and paste it into your .env file under TELEGRAM_BOT_TOKEN

More info: https://core.telegram.org/bots#creating-a-new-bot

6. Run the bot in development mode

This project uses uv, a fast Python package manager and runner.

Don't have it yet? Install it from here: https://github.com/astral-sh/uv#installation

Then in another terminal run the bot:

uv run --extra llm readeckbot

The first time it will install Python and the depenencies as needed and can take a bit, but that’s it!

You can now start chatting with your bot on Telegram using your own token.

Special commands for bot management

  • /version — Replies with the current version of the bot (from the code).
  • /restart — Restarts the bot process. This is useful for upgrades: if you run the bot under systemd (or similar), it will be relaunched and pick up the latest version (for example, if you use uvx to always run the latest code).
    Note: You may want to restrict this command to admin users in production.

Happy hacking and happy reading! 📚🤖

Metadata

Release files for readeckbot 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for readeckbot 0.1.2
File Size Uploaded
readeckbot-0.1.2.tar.gz 14.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for readeckbot 0.1.2
File Interpreter ABI Platform
readeckbot-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 31.1 kB

Release files / readeckbot-0.1.2.tar.gz

Download URL readeckbot-0.1.2.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ca46225ba67e07a3a46b9a02d18677ee98e8ebcb4b2dc6dff004b0ab5e57fe44
BLAKE2b-256 checksum
How to use checksums
52fb3ee08f0f5de6a3bf0ad73a76ccf824c73a1e1ec526200747a84faf0c8e16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 7, 2025.

Transparency log

Release files / readeckbot-0.1.2-py3-none-any.whl

Download URL readeckbot-0.1.2-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d47feb9fc12646a481174b4a8023c2cf742214d82d829dfc752f7b73e35e089
BLAKE2b-256 checksum
How to use checksums
67a9e94d5b5d9184f11bae133856fb98e72779e0932e4964ed787999b32e42e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 7, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page