Skip to content

Repository files navigation

Rei NeuroSync

Rei NeuroSync is a Telegram bot for personal task capture and planning. It routes plain text messages into a Markdown vault, stores tasks in an Obsidian-compatible index.md, and can sync with GitHub-backed repositories. Optional integrations add Gemini, Ollama, Google Calendar, Notion, and a Telegram Mini App.

Features

  • Telegram quick capture for tasks and notes.
  • Obsidian-compatible Markdown tasks with stable block IDs.
  • GitHub REST API sync for user vaults.
  • AI-assisted routing and summaries through Gemini or local Ollama.
  • BYOK mode for user-owned API keys.
  • Google Calendar and Notion adapters.
  • Morning briefings, evening reflection prompts, weekly stats, and periodic sync jobs.
  • Telegram Mini App API for live task views.

Requirements

  • Python 3.10+
  • Telegram bot token from BotFather
  • SQLite
  • Optional: Ollama for local AI mode
  • Optional: Vercel deployment for the Telegram Mini App

Setup

pip install -r requirements.txt
cp .env.example .env
python main.py

Fill .env before starting the bot:

BOT_TOKEN=
CHAT_ID=
ADMIN_ID=
REPO_PATH=
GEMINI_API_KEY=
REI_ENCRYPTION_KEY=
LOG_LEVEL=INFO
OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=gemma3:12b

Generate REI_ENCRYPTION_KEY with:

python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"

User Modes

Mode AI source
classic No AI, keyword routing only
ai Server-side Gemini key
byok User-provided Gemini key
local Ollama

Data Model

Tasks are stored as Markdown checklist items:

- [ ] Example task P1 due:2026-06-01 ^a1b2c3

Block IDs are six-character Obsidian-compatible references used for stable updates.

Security

Do not commit .env, SQLite databases, local vaults, Telegram tokens, GitHub tokens, Gemini keys, OAuth credentials, or user data. Runtime state belongs under data/ and should stay local.

Before making a private repository public, scan the complete Git history for secrets and remove any committed databases or credentials.

About

rei_neuro_sync

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages