Telegram bot that clips URLs and text into Obsidian markdown notes, powered by Claude Code CLI.
iPhone / Mac / Anywhere
→ Share URL to Telegram Bot
→ Node.js bot on server
→ Detect source (X/YouTube/Web/...)
→ Pre-extract content
→ Claude CLI generates structured note
→ GitHub API commits to repo
→ Bot replies with .md file
→ Obsidian syncs from GitHub
- Node.js >= 18 (or Bun)
- Claude Code CLI with OAuth token
- Telegram bot token (from @BotFather)
- GitHub repo for Obsidian vault with fine-grained PAT (Contents: read/write)
yt-dlp(optional, for YouTube transcript extraction)
git clone <this-repo>
cd obsidian-clip-bot
bun install
# Configure environment
cp .env.example .env
# Edit .env with your values
bun start| Variable | Description |
|---|---|
TELEGRAM_BOT_TOKEN |
Bot token from @BotFather |
ALLOWED_USER_ID |
Your Telegram user ID (from @userinfobot) |
CLAUDE_CODE_OAUTH_TOKEN |
Claude Code OAuth token (from claude setup-token) |
GITHUB_TOKEN |
Fine-grained PAT with Contents read/write on your Obsidian repo |
GITHUB_REPO |
GitHub repo in owner/name format (e.g. sskys18/Obsidian) |
| Source | Detection | Extraction |
|---|---|---|
| Twitter/X | x.com, twitter.com |
fxtwitter API + linked articles |
| YouTube | youtube.com, youtu.be |
yt-dlp metadata + subtitles |
| Substack | *.substack.com |
Readability |
| Web/Blog | Any URL | Readability + JSDOM |
| Plain text | No URL detected | Passed directly to Claude |
To use the /company application generation feature, create a Project/Resume/ folder in your Obsidian vault with your portfolio materials:
Project/Resume/
projects.md — project descriptions, tech stack, outcomes
experience.md — work history, roles, achievements
skills.md — technical + soft skills inventory
stories.md — reusable narratives (teamwork, challenges, motivation)
자기소개서/
삼성전자_2025.md — previously submitted cover letters
No strict format required — free-form markdown is fine.
pm2 start "bun run start" --name clip-bot- You send a URL or text to the Telegram bot
- Bot detects source type (Twitter, YouTube, web, etc.)
- Content is pre-extracted using source-specific methods
- Extracted content is sent to Claude CLI with a structured prompt
- Claude returns
{filename, content}JSON via--json-schema - Note is committed to
Resource/inbox/via GitHub Contents API - Bot replies with the
.mdfile as a document attachment - Bot confirms with filename and path
| Frequency | Task |
|---|---|
| Yearly | Renew OAuth token: claude setup-token |
| Occasionally | Update yt-dlp: yt-dlp -U |
| Occasionally | Update deps: bun update |