Skip to content

Simple CLI for processing Twitter/X bookmarks with AI assistance. Works with bird.

Notifications You must be signed in to change notification settings

lukaskawerau/bookmark-processor

Repository files navigation

bm — Bookmark Processor 🐦

A simple CLI for processing Twitter/X bookmarks with AI assistance.

Built to work with bird by @steipete.

The Workflow

  1. Bookmark tweets on X
  2. poll-bookmarks.sh fetches new bookmarks every N minutes (via systemd timer)
  3. Use bm CLI to review, discuss with your AI assistant, and process into your knowledge base
  4. Mark as done when processed

Requirements

  • bird — Twitter CLI
  • jq — JSON processor
  • Bash

Setup

1. Install bird and configure credentials

npm install -g @steipete/bird

# Create credentials file
mkdir -p ~/.config/bird
cat > ~/.config/bird/env << 'EOF'
AUTH_TOKEN=your_auth_token_here
CT0=your_ct0_here
EOF
chmod 600 ~/.config/bird/env

Get auth_token and ct0 from Chrome DevTools on x.com (F12 → Application → Cookies).

2. Clone this repo

git clone https://github.com/lukaskawerau/bookmark-processor ~/Code/bookmark-processor

3. Add to PATH

ln -sf ~/Code/bookmark-processor/bm ~/.local/bin/bm

4. Set up automatic polling (optional)

# Symlink systemd units
ln -sf ~/Code/bookmark-processor/bookmark-poll.service ~/.config/systemd/user/
ln -sf ~/Code/bookmark-processor/bookmark-poll.timer ~/.config/systemd/user/

# Enable timer (polls every 5 minutes)
systemctl --user daemon-reload
systemctl --user enable --now bookmark-poll.timer

# Check status
systemctl --user list-timers | grep bookmark

CLI Usage

bm list          # Show all unprocessed bookmarks
bm next          # Show next bookmark in detail
bm show ID       # Show specific bookmark
bm done ID       # Mark as processed (moves to data/processed/)
bm open ID       # Open in browser
bm count         # Show inbox/processed counts
bm json ID       # Show raw JSON
bm help          # Show help

Data Storage

data/
├── inbox/           # Unprocessed bookmarks (*.jsonl)
├── processed/       # Processed bookmarks (*.jsonl)
└── last_seen.txt    # State for incremental fetching

Each bookmark is stored as a single JSONL file named by tweet ID.

Example Workflow with AI Assistant

You: bm next
AI: Shows bookmark details

You: [voice note or text with your thoughts]
AI: Transcribes, files to Obsidian, adds tags/connections

You: bm done 1234567890
AI: ✅ Marked as processed

Customization

  • Edit poll-bookmarks.sh to change fetch count (default: 20)
  • Edit bookmark-poll.timer to change polling interval (default: 5 min)
  • The bm script is simple bash — hack away!

Credits

  • bird by @steipete — the Twitter CLI that makes this possible
  • Inspired by @alexhillman's bookmark workflow

License

MIT

About

Simple CLI for processing Twitter/X bookmarks with AI assistance. Works with bird.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages