shotext
Your screenshots are a goldmine, stop losing what's in them.
Every day you capture code snippets, meeting notes, error messages, and diagrams as screenshots. They pile up on your Desktop and become a black hole: impossible to search, impossible to organise. shotext fixes that.
It watches your screenshots folder, automatically runs OCR to extract the text from every image, and stores it in a full-text search index. Seconds after you press ⌘⇧3, the content of that screenshot is searchable from your terminal.
How It Works
Screenshot taken ──▶ Detected ──▶ OCR (Tesseract) ──▶ Indexed (Tantivy) ──▶ Searchable
- Capture: Take a screenshot as you normally would on macOS.
- Detect: shotext watches
~/Desktop(or a custom folder) and picks up new.pngfiles automatically. - Extract: Tesseract OCR reads the text from the image. Each file is blake3-hashed for deduplication.
- Index: The extracted text, file path, and timestamp are stored in a Sled database and a Tantivy full-text search index.
- Search: Find any screenshot by what was in it, not by its filename.
Installation
Prerequisites
- Rust toolchain (
cargo) - Tesseract OCR engine and language data
# Install Tesseract via Homebrew
# Clone and build
# The binary is at target/release/shotext
Quick Start
# 1. Initialise config (creates ~/.config/shotext/config.toml)
# 2. Index all existing screenshots on your Desktop
# 3. Start watching for new screenshots in real-time
# 4. Search, what was in that error message?
# 5. Or launch the interactive fuzzy finder
Commands
| Command | Description |
|---|---|
shotext ingest |
Scan the screenshots folder and index all new images. Use -f to force re-index everything. |
shotext watch |
Watch the folder for new screenshots and index them the moment they appear. |
shotext search <query> |
Full-text search across all extracted text. Supports stemming ("develop" → "developer", "developing"). |
shotext search |
Interactive fuzzy finder (powered by skim) over all indexed screenshots. |
shotext list |
List all indexed screenshots. Add -v for dates and text snippets. |
shotext view <target> |
Open a screenshot in a native GUI viewer alongside its extracted text. Accepts a file path or a blake3 hash. |
shotext config |
Show the current configuration. Use -e to open it in your $EDITOR. |
Configuration
Config lives at ~/.config/shotext/config.toml and is created automatically on first run:
[]
= "/Users/you/Desktop" # Folder to watch / ingest
= "/Users/you/Library/Application Support/shotext/index.db"
[]
= "eng" # Tesseract language code (eng, swe, deu, …)
Tech Stack
| Component | Crate | Role |
|---|---|---|
| CLI | clap | Command parsing with derive macros |
| OCR | tesseract | Text extraction via libtesseract |
| Hashing | blake3 | Fast deduplication of screenshot files |
| Database | sled | Embedded key-value store for metadata |
| Search | tantivy | Full-text search index with stemming |
| Watcher | notify | Filesystem polling for new screenshots |
| Fuzzy find | skim | Interactive terminal search UI |
| Viewer | eframe/egui | Native GUI window for image + text |