https://github.com/madh93/karakeepbot
🔖 Telegram Bot for saving bookmarks to Karakeep (previously Hoarder)
https://github.com/madh93/karakeepbot
bookmarks bot go golang hoarder karakeep self-hosted telegram telegram-bot
Last synced: 2 months ago
JSON representation
🔖 Telegram Bot for saving bookmarks to Karakeep (previously Hoarder)
- Host: GitHub
- URL: https://github.com/madh93/karakeepbot
- Owner: Madh93
- License: mit
- Created: 2024-12-28T15:54:08.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-08T19:02:26.000Z (2 months ago)
- Last Synced: 2025-04-09T10:29:01.894Z (2 months ago)
- Topics: bookmarks, bot, go, golang, hoarder, karakeep, self-hosted, telegram, telegram-bot
- Language: Go
- Homepage:
- Size: 966 KB
- Stars: 28
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Karakeepbot
[](https://github.com/Madh93/karakeepbot/releases)
[](https://go.dev/doc/install)
[](https://pkg.go.dev/github.com/Madh93/karakeepbot)
[](LICENSE)`Karakeepbot` is a simple [Telegram Bot](https://core.telegram.org/bots) written in [Go](https://go.dev/) that enables users to effortlessly save bookmarks to [Karakeep](https://karakeep.app) (previously Hoarder), a self-hostable bookmark-everything app, directly through Telegram.

Features •
Requirements •
Installation •
Configuration •
Contributing •
License## Features
- 📄 Add **text** and **URL bookmarks** into your Karakeep instance (tested on [v0.20.0](https://github.com/karakeep-app/karakeep/releases/tag/v0.20.0)).
- 🤖 Obtain **AI-generated tags** in **hashtag format** for easy searching on Telegram.
- 🔒 Support **chat ID and thread ID allowlists**.
- 🐳 **Production-ready Docker image** for easy **deployment**.## Requirements
- A [Telegram bot token](https://core.telegram.org/bots/features#botfather) (you can get one by talking to [@BotFather](https://t.me/BotFather) on Telegram)
- A valid API key from [Karakeep](https://docs.karakeep.app/screenshots#settings).## Installation
### Docker
#### Using `docker run`
Use the `docker run` command to start `Karakeepbot`. Make sure to set the required environment variables:
```sh
docker run --name karakeepbot \
-e KARAKEEPBOT_TELEGRAM_TOKEN=your-telegram-bot-token \
-e KARAKEEPBOT_KARAKEEP_TOKEN=your-karakeep-api-key \
-e KARAKEEPBOT_KARAKEEP_URL=https://your-karakeep-instance.tld \
ghcr.io/madh93/karakeepbot:latest
```#### Using `docker compose`
Create a `docker-compose.yml` file with the following content:
```yml
services:
karakeepbot:
image: ghcr.io/madh93/karakeepbot:latest
restart: unless-stopped
# volumes:
# - ./custom.config.toml:/var/run/ko/config.default.toml # Optional: specify a custom configuration file instead of the default one
environment:
- KARAKEEPBOT_TELEGRAM_TOKEN=your-telegram-bot-token
- KARAKEEPBOT_KARAKEEP_TOKEN=your-karakeep-api-key
- KARAKEEPBOT_KARAKEEP_URL=https://your-karakeep-instance.tld
```Use the `docker compose up` command to start `Karakeepbot`:
```sh
docker compose up
```### From releases
Download the latest binary from [the releases page](https://github.com/Madh93/karakeepbot/releases):
```sh
curl -L https://github.com/Madh93/karakeepbot/releases/latest/download/karakeepbot_$(uname -s)_$(uname -m).tar.gz | tar -xz -O karakeepbot > /usr/local/bin/karakeepbot
chmod +x /usr/local/bin/karakeepbot
```### From source
If you have Go installed:
```sh
go install github.com/Madh93/karakeepbot@latest
```## Configuration
`Karakeepbot` comes with a [default configuration file](config.default.toml) that you can modify to suit your needs.
### Loading a custom configuration file
You can load a different configuration file by using the `-config path/to/config/file` flag when starting the application:
```sh
karakeepbot -config custom.config.tml
```### Overriding with environment variables
Additionally, you can override the configuration values using environment variables that begin with the prefix `KARAKEEPBOT_`. This allows you to customize your setup without needing to modify any configuration file:
```sh
KARAKEEPBOT_LOGGING_LEVEL=debug KARAKEEPBOT_TELEGRAM_ALLOWLIST=chat_id_1,chat_id_2 karakeepbot
```## Contributing
Contributions are welcome! Please open an issue or submit a pull request for any bug fixes or enhancements.
1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Commit your changes (`git commit -am 'Add new feature'`).
4. Push to the branch (`git push origin feature-branch`).
5. Open a Pull Request.## License
This project is licensed under the [MIT license](LICENSE).