GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - namick/focus-bot: Telegram bot that turns thoughts, links, and voice notes into AI-organized Obsidian notes

BranchesTags
Open more actions menu

Latest commit

 

History

48 Commits
48 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude
.claude
 
 
.planning
.planning
 
 
public
public
 
 
src
src
 
 
tests
tests
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
CLAUDE.md
CLAUDE.md
 
 
README.md
README.md
 
 
SERVICE_SETUP.md
SERVICE_SETUP.md
 
 
bun.lock
bun.lock
 
 
bunfig.toml
bunfig.toml
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Focus Bot

Focus Bot

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.

Bun TypeScript Claude Agent SDK Telegram Obsidian License: MIT

Focus Bot

The idea

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.


What it looks like

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.

Send a link instead

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.


Features

โšก 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

Architecture

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 โ†’ ๐Ÿ’ฏ]
Loading

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.


Quick start

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

Configuration

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

Vault layout

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

Usage

Message types

  • 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

Commands

/start Help message
/health Bot health and uptime
/status systemd service status
/logs Recent log entries
/restart Restart the service

Editing the prompts

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.

Debugging

tail -f /tmp/focus-bot-transcripts.log

Every voice transcription and every LLM exchange โ€” full prompt, full response, timestamped.


Deployment

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-bot

Note format reference

Text 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.


Stack

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.

License

MIT

About

Telegram bot that turns thoughts, links, and voice notes into AI-organized Obsidian notes

Topics

anthropicbunclaudenote-takingobsidianpkmtelegram-bottypescript

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.