Skip to content

sasha-computer/x-likes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

x-likes demo

x-likes

Fuzzy search your X/Twitter likes from the terminal. Fetches all your liked tweets into a local SQLite database with FTS5 full-text search, then lets you browse them interactively with fzf.

Install

git clone https://github.com/sasha-computer/x-likes.git
cd x-likes
uv sync

Symlink the main script somewhere on your PATH:

ln -sf "$(pwd)/x-likes" /opt/homebrew/bin/x-likes

Usage

Fuzzy search with fzf

x-likes              # open fzf with all likes
x-likes "rust"       # start with a query

Press Enter to open the tweet in your browser. The preview panel shows full tweet text, metrics, quoted tweets, and links.

CLI search

uv run search.py "async rust"
uv run search.py --author swyx "ai agents"
uv run search.py --after 2025-01-01 "zk proofs"
uv run search.py --limit 5 "domain hacks"

Supports FTS5 query syntax: phrases ("exact match"), boolean (AI AND agents), prefix (encryp*), column filters (author_username:swyx).

Sync your likes

Requires a Chromium-based browser running with remote debugging enabled and logged into x.com:

# Launch your browser with CDP enabled
chromium --remote-debugging-port=9222

# Fetch likes
uv run fetch.py
uv run fetch.py --limit 500    # just the latest 500

The fetcher extracts your auth cookies from the browser automatically via Chrome DevTools Protocol. No API keys needed.

How It Works

  1. Fetch — Uses twikit to paginate through your liked tweets, extracting text, authors, URLs, quotes, and engagement metrics. Stores everything in SQLite with WAL mode.
  2. Index — An FTS5 virtual table indexes author names, usernames, tweet text, quoted tweets, and URLs. Triggers keep the index in sync on insert/update/delete.
  3. Search — The fzf interface loads all likes into memory and lets you fuzzy-filter instantly. The preview panel runs a SQLite query for full details. CLI search uses FTS5 MATCH with ranked results.

Configuration

Variable Default Description
X_LIKES_DB ~/.local/share/x-likes/likes.db Database path
XDG_DATA_HOME ~/.local/share Base data directory

Requirements

  • uv
  • fzf
  • Python 3.12+
  • A Chromium-based browser (for syncing)

License

MIT

About

Fuzzy search your X likes from the terminal. SQLite FTS5 + fzf.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors