| @@ -1,17 +1,17 @@ |
| # 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 can be automatically tagged via local ONNX embeddings (opt-in; set `tagging_enabled = true` in config). |
| +A local search engine for your browser bookmarks and history. Import bookmarks/history from Firefox, Zen, Chrome, or Chromium, search them with full-text queries, and optionally forward searches to external engines like wikipedia or SearXNG (aggregates results from dozens of backends). Content can be automatically tagged via local ONNX embeddings (opt-in; set `tagging_enabled = true` in config). |
| |
| ## Install |
| |
| -**Binaries** are available at [vit.am/~ololduck/search_hub/latest](https://vit.am/~ololduck/search_hub/latest/). Download the archive or the statically-linked binary for your architecture, extract, and run. |
| +**Binaries** are available at [vit.am/~ololduck/search_hub/latest](https://vit.am/~ololduck/search_hub/latest/). Download the binary for your architecture, extract, and run. |
| |
| **Source:** Clone the [repository](https://vit.am/~ololduck/search_hub/repository.git) and build with Rust: |
| |
| **Prerequisites:** Rust (install via [rustup](https://rustup.rs/)). |
| |
| ```sh |
| -git clone https://vit.am/~ololduck/search_hub/repository.git |
| +git clone https://vit.am/~ololduck/search_hub/repository.git search_hub |
| cd search_hub |
| cargo install --path . |
| ``` |
| @@ -35,7 +35,7 @@ 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](https://crates.io) via its public JSON API, and optionally [SearXNG](https://searx.space) (which aggregates Google, Bing, DDG, and dozens more) if `[[engines]]` is configured. Works as a custom search provider in Firefox/Zen via the OpenSearch protocol (your browser should auto-discover it at `/opensearch.xml`). |
| +Search queries are also forwarded to external engines: Wikipedia, [crates.io](https://crates.io) via its public JSON API, and optionally [SearXNG](https://searx.space) (which aggregates Google, Bing, DDG, and dozens more) if `[[engines]]` 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 |
| |
| @@ -58,7 +58,7 @@ Search queries are also forwarded to external engines: [crates.io](https://crate |
| |
| 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 127 MB). |
| +The first time you use a search or insert command, SearchHub downloads an ONNX embedding model to `$XDG_CACHE_DIR` (defaults to `~/.cache/search_hub`) (about 127 MB). |
| |
| ## Configuration |
| |
| @@ -132,7 +132,9 @@ instance = "https://search.kael.ink" |
| Keeps the web UI running in the background, starts automatically on login. |
| |
| ```sh |
| -cp contrib/search-hub-web.service ~/.config/systemd/user/ |
| +VERSION=(search_hub --version | cut -d\ -f2) |
| +mkdir -p ~/.config/systemd/user |
| +wget -O ~/.config/systemd/user/search-hub-web.service https://vit.am/~ololduck/search_hub/repository/browse/v$VERSION/contrib/search-hub-web.service |
| systemctl --user daemon-reload |
| systemctl --user enable --now search-hub-web.service |
| ``` |
| @@ -142,8 +144,10 @@ Check status with `systemctl --user status search-hub-web`. View logs with `jour |
| ## Auto-import with systemd |
| |
| ```sh |
| -cp contrib/search-hub-import.service ~/.config/systemd/user/ |
| -cp contrib/search-hub-import.timer ~/.config/systemd/user/ |
| +VERSION=(search_hub --version | cut -d\ -f2) |
| +mkdir -p ~/.config/systemd/user |
| +wget -O ~/.config/systemd/user/search-hub-import.service https://vit.am/~ololduck/search_hub/repository/browse/v$VERSION/contrib/search-hub-import.service |
| +wget -O ~/.config/systemd/user/search-hub-import.timer https://vit.am/~ololduck/search_hub/repository/browse/v$VERSION/contrib/search-hub-import.timer |
| systemctl --user daemon-reload |
| systemctl --user enable --now search-hub-import.timer |
| ``` |
| @@ -153,8 +157,10 @@ This imports bookmarks from Zen Browser daily. Edit the file to import from anot |
| ## Auto-update with systemd |
| |
| ```sh |
| -cp contrib/search-hub-self-update.service ~/.config/systemd/user/ |
| -cp contrib/search-hub-self-update.timer ~/.config/systemd/user/ |
| +VERSION=(search_hub --version | cut -d\ -f2) |
| +mkdir -p ~/.config/systemd/user |
| +wget -O ~/.config/systemd/user/search-hub-update.service https://vit.am/~ololduck/search_hub/repository/browse/v$VERSION/contrib/search-hub-update.service |
| +wget -O ~/.config/systemd/user/search-hub-update.timer https://vit.am/~ololduck/search_hub/repository/browse/v$VERSION/contrib/search-hub-update.timer |
| systemctl --user daemon-reload |
| systemctl --user enable --now search-hub-self-update.timer |
| ``` |
| @@ -195,7 +201,7 @@ See `docker-compose.yaml` at the project root. A SearXNG service is included as |
| |
| ```sh |
| mkdir -p ~/.config/containers/systemd |
| -cp contrib/search-hub.container ~/.config/containers/systemd/ |
| +wget -O ~/.config/containers/systemd/search-hub.container https://vit.am/~ololduck/search_hub/repository/browse/main/contrib/search-hub.container |
| systemctl --user daemon-reload |
| systemctl --user enable --now search-hub |
| ``` |
| @@ -206,4 +212,4 @@ The Quadlet file uses `%h` (your home directory) for volume source paths. |
| |
| - **Downloads:** [vit.am/~ololduck/search_hub/latest](https://vit.am/~ololduck/search_hub/latest/) |
| - **Repository browser:** [vit.am/~ololduck/search_hub/repository](https://vit.am/~ololduck/search_hub/repository) |
| -- **Git clone:** `git clone https://vit.am/~ololduck/search_hub/repository.git` |
| +- **Git clone:** `git clone https://vit.am/~ololduck/search_hub/repository.git search_hub` |