Send a thought to Telegram. Get an AI-organized note in your Obsidian vault.
No folders. No categories. No deciding where something goes before you've finished thinking it.
Most note systems make you file a thought before you've finished having it. Focus Bot inverts that.
You send a message. Claude reads it, gives it a title, tags it by what kind of thing it is, and weaves [[wiki-links]] through the body around the concepts worth exploring later. The file lands in your vault. Structure emerges from the graph instead of from a folder tree you have to maintain.
Tags classify what something is โ
ideas,quotes,articles,books,recipes. Format, not subject.Wiki-links classify what something is about โ inline, organic, no upfront taxonomy. Frequently linked concepts become hubs on their own.
That's the whole philosophy. Two axes, zero hierarchy.
You: "I've been thinking about how trees communicate
through mycelium networks underground"
Bot: ๐
โ creates Mycelium Communication Networks.md:
--- captured: 2026-02-06T14:34 source: telegram status: inbox tags: - captures - ideas --- I've been thinking about how [[trees]] communicate through [[mycelium]] networks underground
The filename is the title โ Obsidian convention, no redundant frontmatter field. captures is always applied. Everything else is inferred.
You: https://www.youtube.com/watch?v=example
Bot: ๐
Bot: https://telegra.ph/Video-Title-02-06 โ readable AI summary
Bot: ๐ฏ โ replaces ๐ when enrichment finishes
URLs land in Bookmarks/ with page metadata, an AI summary in an Obsidian callout, and a Telegraph link in the frontmatter. YouTube links get their transcript pulled and summarized. The ๐ arrives immediately โ enrichment catches up behind it.
| โก Instant capture | Send a thought, get a note. The write path never waits on enrichment. |
| ๐ง AI metadata | Claude generates titles, type-based tags, and inline [[wiki-links]] |
| ๐๏ธ Voice notes | Dictate a note โ Groq Whisper transcribes, then multi-turn editing lets you refine the draft before it saves |
| ๐ URL enrichment | YouTube transcripts and article text fetched and summarized |
| ๐ฐ Telegraph publishing | Summaries published for Telegram's Instant View |
| โ๏ธ Editable prompts | Every AI prompt is a Markdown file inside your vault. Edit it; the next message uses it. No restart. |
| ๐ Debug logging | Full prompt/response transcripts for iterating on prompts |
| ๐ Access control | Telegram user ID whitelist |
flowchart TD
A[Telegram message] --> B[Grammy long poll]
B --> C{Auth middleware}
C -->|whitelisted| D[captureNote]
D --> E[Claude haiku<br/>title ยท tags ยท wiki-links]
E --> F[Write .md to vault]
F --> G[๐ reaction]
G -.fire and forget.-> H[processNote]
H --> I[Fetch transcript / article text]
I --> J[Claude summary]
J --> K[Publish to Telegraph]
K --> L[Reply with link โ ๐ฏ]
The fast path and the slow path are deliberately separate. Capture is never blocked on a network fetch or a long summarization โ you get an acknowledgment in about a second, and enrichment lands later.
Voice takes a parallel route: OGG download โ Groq Whisper โ Claude draft โ in-place editing over multiple turns โ ๐ to save.
Prerequisites โ Bun ยท Claude Code CLI on your PATH ยท a bot token from @BotFather ยท an Obsidian vault ยท yt-dlp for YouTube ยท a Groq key for voice
git clone https://github.com/namick/focus-bot.git cd focus-bot bun install cp .env.example .env # then edit it bun run dev # hot reload
| Variable | Required | Purpose |
|---|---|---|
TELEGRAM_BOT_TOKEN |
โ | Bot token from @BotFather |
ALLOWED_USER_IDS |
โ | Comma-separated Telegram user IDs โ @userinfobot tells you yours |
NOTES_DIR |
โ | Absolute path to your Obsidian vault root |
GROQ_API_KEY |
โ | Voice transcription (Whisper large-v3-turbo) |
ANTHROPIC_API_KEY |
โ | Falls back to your Claude subscription if unset |
CAPTURE_MODEL |
โ | Model for capture (default haiku) |
ENRICHMENT_MODEL |
โ | Model for summaries (default haiku) |
PROMPTS_DIR |
โ | Vault subdirectory for editable prompts, e.g. Prompts |
TRANSCRIPT_LOG |
โ | Debug log path (default /tmp/focus-bot-transcripts.log) |
CLAUDE_CODE_PATH |
โ | Path to the claude CLI |
your-vault/
โโโ Bookmarks/ # auto-created โ URL notes land here
โ โโโ Article Title.md
โ โโโ Video Title.md
โโโ Prompts/ # created when PROMPTS_DIR is set
โ โโโ Focus Bot/
โ โโโ note-capture.md # text note metadata extraction
โ โโโ voice-assistant.md # voice drafting system prompt
โ โโโ video-summary.md # YouTube summaries
โ โโโ article-summary.md # article summaries
โโโ Note Title.md # text and voice notes go in the root
โโโ Another Note.md
- Text โ note in the vault root with AI metadata
- Voice โ transcribed by Groq Whisper, drafted, refined over as many turns as you want (send more voice or text, react ๐ to save)
- URL โ
Bookmarks/note + Telegraph summary - YouTube โ transcript fetched, summarized, published
/start |
Help message |
/health |
Bot health and uptime |
/status |
systemd service status |
/logs |
Recent log entries |
/restart |
Restart the service |
Set PROMPTS_DIR=Prompts. On startup the bot seeds its default prompts as Markdown into Prompts/Focus Bot/ in your vault. Edit any of them and the change takes effect on the next message โ no restart. Prompts use {{variable}} placeholders ({{message}}, {{transcript}}, โฆ) substituted at call time.
This turns out to be the feature that matters most in daily use: tuning how the bot thinks is just editing a note.
tail -f /tmp/focus-bot-transcripts.log
Every voice transcription and every LLM exchange โ full prompt, full response, timestamped.
SERVICE_SETUP.md walks through running it as a persistent background service โ a systemd user service on Linux (no root required) or a launchd agent on macOS. The /status, /logs, and /restart Telegram commands are wired to that service, so once it's installed you can manage the bot from your phone.
It's otherwise a plain Bun process, so any supervisor works:
pm2 start "bun run start" --name focus-botText note
--- captured: 2026-02-06T14:34 source: telegram status: inbox tags: - captures - ideas --- I've been thinking about how [[trees]] communicate through [[mycelium]] networks underground
URL note (Bookmarks/)
--- captured: 2026-02-06T14:34 source: telegram status: inbox url: "https://example.com/article" telegraph: "https://telegra.ph/Article-Title-02-06" tags: - captures - articles - links --- Check out this article on [[machine learning]] https://example.com/article > **Article Title** > A look at recent advances in neural network architectures. > โ example.com > [!summary] Summary > This article explores recent advances in machine learning... > - Key point one > - Key point two
Tag vocabulary
Always plural, always a type, never a subject:
captures (always applied, enforced in code) ยท ideas ยท quotes ยท articles ยท links ยท books ยท recipes ยท poems ยท songs ยท tools ยท movies
Subject matter is handled entirely by [[wiki-links]] in the body.
Bun (runs TypeScript directly, no build step) ยท Grammy ยท Claude Agent SDK ยท Zod ยท telegra.ph ยท yt-dlp ยท Groq Whisper
The repo follows TDD โ bun test should be green before anything ships.
MIT