Local-first semantic indexing and search for your downloads folder.
It scans files, extracts searchable snippets, generates embeddings with Gemini, and lets you query from CLI or a local HTTP API.
- Zig
0.15.1(or compatible with this project setup) - A Gemini API key
- Optional external tools for richer extraction:
pdftotext(PDF text extraction)exiftool(image metadata)zipinfo(archive listing)
Set your key in environment variable GEMINI_API_KEY.
Current shell session:
export GEMINI_API_KEY="your_key_here"Persistent for zsh:
echo 'export GEMINI_API_KEY="your_key_here"' >> ~/.zshrc
source ~/.zshrcYou can also provide it inline for one command:
GEMINI_API_KEY="your_key_here" zig build run -- search "invoice pdf"zig buildRun the binary through build runner:
zig build run -- <command> [options]Available commands:
scanscan [--all]embed [--all] [--batch N] [--concurrency N](defaults:--batch 256,--concurrency 16)search <query> [--top N]classify [--model]backup [--apply](default is dry-run)serve [--port N]statsdupes
zig build run -- scan
zig build run -- embed --all --batch 256 --concurrency 16
zig build run -- search "find receipts" --top 10
zig build run -- statsTo build embeddings quickly in one go, use:
zig build run -- embed --all --batch 256 --concurrency 16By default, scan runs in a strict generic-files mode (docs/media/archives) and skips source-code style files. If you really want broad scanning, pass --all:
zig build run -- scan --allDry-run backup plan:
zig build run -- backupApply backup actions:
zig build run -- backup --applyStart server:
zig build run -- serve --port 7842Endpoints:
GET /search?q=<query>&top=<n>GET /file/:idPOST /labelwith JSON body:{ "file_id": 123, "label": "important" }
GET /stats
GEMINI_API_KEY(required forembed,search,serve,classify --model)DLR_DB_PATH(default:~/.downloader/index.db)DLR_ROOT(default:~/Downloads)DLR_DIMS(default:768)DLR_SERVER_PORT(default:7842)DLR_BACKUP_DIR(default:~/Archive)
zig build test