Ludext is a self-hosted assistant that runs on a Raspberry Pi. Every morning it collects your emails, calendar events, tasks, and news from your own infrastructure, builds a briefing, and sends you a Telegram message before you start your day.
No data ever leaves your home network. No subscriptions. No third-party APIs.
Most assistants send your personal data to external servers. Ludext is built around a different principle: your data stays yours.
- π Self-hosted data β Nextcloud stores your calendar, tasks, notes, photos, and news feeds on hardware you own and control.
- π Everything runs locally β even the semantic photo search uses a local CLIP model on the Pi; nothing is sent to any cloud provider.
- πΈ No subscriptions β Once set up, Ludext runs for free indefinitely.
| Layer | Technology | Role |
|---|---|---|
| Gmail (IMAP) | Fetches and filters unread messages | |
| Self-hosted data | Nextcloud | Calendar, tasks, news feeds, notes, photos |
| Photo search | CLIP (sentence-transformers) | Semantic photo search, runs locally |
| Delivery | Telegram Bot | Sends the briefing and accepts commands |
| Runtime | Raspberry Pi 4/5 | Runs the whole stack, 24/7 |
- π§ Unread emails β filtered and summarized, only what matters
- π Calendar β events for today and tomorrow
- β Pending tasks β most urgent ones highlighted
- π° News β relevant articles from your Nextcloud News feeds
- π Medicines β which ones to take today and at what time
Manage tasks, calendar events, medicines, shopping list, car expenses, and wishlist directly from Telegram. Search your Nextcloud photos by natural-language description (local CLIP model). The bot also monitors system health and sends automatic alerts for high CPU temperature, RAM, or disk usage.
β Full command reference
β Feature documentation
- Raspberry Pi 4 or 5 (8 GB RAM recommended)
- Calendar β for CalDAV events and tasks
- News β for RSS feed summaries
- Notes β for shopping list, car expenses, and medicine tracking
- A Gmail account with IMAP enabled
- A Telegram account to create a bot
nmapinstalled on the Pi (for the/redcommand)
git clone https://github.com/iamLudok/ludext.git ~/Ludext
cd ~/Ludextbash deploy/setup.shThis installs system dependencies, creates a Python virtual environment, installs the packages from requirements.txt, configures the daily cron job at 7:30, and installs the Telegram bot as a systemd service.
cp .env.example .env
nano .env| Variable | Description |
|---|---|
GMAIL_USER |
Your Gmail address |
GMAIL_APP_PASSWORD |
Gmail app password (see below) |
NEXTCLOUD_URL |
Your Nextcloud URL, e.g. http://192.168.1.50:8080 |
NEXTCLOUD_USER |
Your Nextcloud username |
NEXTCLOUD_PASSWORD |
Your Nextcloud password |
NEXTCLOUD_CALDAV_URL |
Usually NEXTCLOUD_URL/remote.php/dav |
TELEGRAM_TOKEN |
Your Telegram bot token |
TELEGRAM_CHAT_ID |
Your Telegram chat ID |
Gmail requires an app-specific password for IMAP access:
- Go to myaccount.google.com/security
- Enable 2-Step Verification if not already active
- Go to App passwords and create a new one named "Ludext"
- Copy the 16-character code into
.envβGMAIL_APP_PASSWORD
- Open Telegram and search for @BotFather
- Send
/newbotand follow the steps - Copy the token into
.envβTELEGRAM_TOKEN - Send any message to your new bot, then open:
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates - Find
"id"inside"chat"β that's yourTELEGRAM_CHAT_ID
This makes Telegram show the command menu when you type / in the chat.
Run setMyCommands once with whichever commands you want to expose (replace <YOUR_TOKEN>):
curl -X POST "https://api.telegram.org/bot<YOUR_TOKEN>/setMyCommands" \
-H "Content-Type: application/json" \
-d '{
"commands": [
{"command": "ayuda", "description": "Muestra todos los comandos"},
{"command": "tareas", "description": "Lista tus tareas pendientes"}
]
}'Full list of available commands: /ayuda inside the bot or docs/commands.md.
You only need to do this once β the commands persist on Telegram's side and survive bot restarts.
source ~/ludext-env/bin/activate
python3 ludext.pyUse --debug to save the generated briefing to a file:
python3 ludext.py --debug
cat ludext_briefing.txtLudext/
βββ .env.example β Template for .env
βββ .gitignore β Excludes files from git
βββ LICENSE β MIT license
βββ ludext.py β Daily briefing script (runs via cron)
βββ README.md β Project documentation
βββ requirements.txt β Python dependencies
βββ bot/
β βββ __main__.py β Telegram polling and background threads
β βββ background.py β Background alerts
β βββ handlers.py β Telegram bot command handlers
βββ core/
β βββ ai.py β Builds the briefing text
β βββ config.py β Reads .env and exposes CONFIG
β βββ sources.py β Data collection (emails, calendar, tasks, news)
βββ deploy/
β βββ setup.sh β Automated installation script
βββ docs/
β βββ commands.md β Full Telegram command reference
β βββ features.md β Feature documentation
βββ notes/
β βββ api.py β Nextcloud Notes interface
β βββ car.py β Car expenses
β βββ gf_gifts.py β Gift ideas list
β βββ medicine.py β Medicine tracking
β βββ shopping.py β Shopping list
β βββ wishlist.py β Wishlist
βββ photos/
β βββ indexer.py β Indexes Nextcloud photos with CLIP
β βββ search.py β Semantic photo search
βββ scheduling/
β βββ events.py β Event CRUD (Nextcloud CalDAV)
β βββ tasks.py β Task CRUD (Nextcloud CalDAV)
βββ system/
βββ monitor.py β System monitor (CPU temp, RAM, disk, uptime)
βββ network.py β Network device scanner
crontab -l # daily briefing schedule
sudo systemctl status ludext-bot # Telegram bot service
cat ~/ludext.log # daily briefing logs
journalctl -u ludext-bot -n 50 --no-pager # bot logsMIT License β see LICENSE for details.