SearchHub
A local search engine for your browser bookmarks. Import bookmarks from Firefox, Zen, Chrome, or Chromium, search them with full-text queries, and optionally forward searches to external engines like crates.io (via its public JSON API) or SearXNG (aggregates results from dozens of backends). Content is automatically tagged via local ONNX embeddings.
Install
Binaries are available at vit.am/~ololduck/search_hub/latest — download the archive or the statically-linked binary for your architecture, extract, and run.
Source: Clone the repository and build with Rust:
Prerequisites: Rust (install via rustup).
git clone https://vit.am/~ololduck/search_hub/repository.git
cd search_hub
cargo install --path .
This installs the search_hub binary to ~/.cargo/bin/search_hub.
To update later, pull the latest code and reinstall.
First steps
# Import bookmarks from Firefox (auto-discovers your profile)
search_hub import firefox
# Import from Chrome
search_hub import chrome
# Start the web UI
search_hub serve
Open http://127.0.0.1:8080 in your browser. You can now search your bookmarks.
Search queries are also forwarded to external engines: crates.io via its public JSON API, and optionally SearXNG (which aggregates Google, Bing, DDG, and dozens more) if [engines.searxng] is configured. Works as a custom search provider in Firefox/Zen via the OpenSearch protocol (your browser should auto-discover it at /opensearch.xml).
CLI reference
| Command | What it does |
|---|---|
search_hub serve | Start web UI on port 8080 |
search_hub serve --port 3000 | Start on a custom port |
search_hub import firefox | Import bookmarks from Firefox |
search_hub import chrome | Import from Chrome/Chromium |
search_hub import zen | Import from Zen Browser |
search_hub search "query" | Search bookmarks from the terminal |
search_hub list | List all bookmarks |
search_hub insert "Title" https://..." | Add a bookmark (fetches content, auto-tags) |
search_hub remove --id 1 | Delete a bookmark by ID |
search_hub retag --all | Re-run auto-tagging on all bookmarks |
search_hub init-config | Create a default config file at ~/.config/search_hub/config.toml |
All commands use ~/.local/share/search_hub/bookmarks.db by default. Override with --db-path or set db_path in the config file.
The first time you use a search or insert command, SearchHub downloads an ONNX embedding model to .fastembed_cache/ in the project directory (about 30 MB).
Configuration
Run search_hub init-config to create ~/.config/search_hub/config.toml with all available options commented out. Or create it manually:
# Bookmark database path (default: platform data directory)
# db_path = "/home/you/.local/share/search_hub/bookmarks.db"
# Custom tags override the built-in defaults
# [[tags]]
# name = "my-custom-tag"
# examples = ["example text one", "example text two"]
# Which external search engines to use (default: ["crates.io"])
# enabled_engines = ["crates.io"]
# Minimum confidence for auto-tagging (0.0 to 1.0, default: 0.6)
# tagging_threshold = 0.6
# Hosts to skip when fetching content for bookmarking (default: local addresses)
# exclude_urls = ["localhost", "127.0.0.1", "::1"]
# Per-engine configuration (optional)
# [engines.searxng]
# instance = "https://search.kael.ink"
# Best: use an existing public instance (see https://searx.space).
# Also possible: run your own with Docker:
# docker run -d --name searxng -p 8888:8080 searxng/searxng
Run the web server as a systemd user service
Keeps the web UI running in the background, starts automatically on login.
cp contrib/search-hub-web.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now search-hub-web.service
Check status with systemctl --user status search-hub-web. View logs with journalctl --user -u search-hub-web -f.
Auto-import with systemd (Zen Browser)
cp contrib/search-hub-import.service ~/.config/systemd/user/
cp contrib/search-hub-import.timer ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now search-hub-import.timer
This imports bookmarks from Zen Browser daily.
Resources
- Downloads: vit.am/~ololduck/search_hub/latest
- Repository browser: vit.am/~ololduck/search_hub/repository
- Git clone:
git clone https://vit.am/~ololduck/search_hub/repository.git