Free & local
Documentation for the versions you actually run
Models guess which Java, Angular or Tomcat you use. The knowledge library lets you keep the official docs for your exact
versions on your own machine. hexiel searches them first and cites the page it used. It is free, open source and nothing leaves your computer.
Quick start
hexiel knowledge find "Java 21 documentation" # free web search for the official docs
hexiel knowledge add https://docs.oracle.com/en/java/javase/21/language/ -t java-21
hexiel knowledge add https://tomcat.apache.org/tomcat-10.1-doc/ -t tomcat-10.1
hexiel # ask: "how do I enable HTTPS in Tomcat?"
add downloads the site and indexes it, so no separate sync is needed. You can also copy your own files into a topic folder and run
hexiel knowledge sync.
The library is part of the free core. Only Hexiel Remote, the hosted relay for controlling hexiel from a browser or phone, is paid.
The folder
hexiel knowledge path # ~/.local/share/hexiel/knowledge (override with HEXIEL_KNOWLEDGE)
knowledge/
java-21/ one folder per topic; the name is the version tag you search by
tomcat-10.1/
docker-compose/
sources.toml web sources remembered by `add`
.index/ the search index (safe to delete)
Drop in Markdown, text, HTML, reStructuredText, AsciiDoc, PDF or Word (.docx) files. Subfolders are fine.
Commands
| Command | What it does |
hexiel knowledge sync | Indexes what is new, changed or deleted. Only touched files are re-read and re-embedded. |
sync --refresh | Re-downloads every remembered web source first, then syncs. |
sync --rebuild | Rebuilds the index from scratch, for example after changing the embedding model. |
add <url> -t <topic> | Crawls a docs site into a topic. Defaults to 200 pages and depth 3; change with --pages and --depth. |
find <query> | Web-searches for the official docs of a technology and version. |
sources · status | List remembered sources; show topics, passages, whether semantic search is on, and the last sync. |
search <query> [-t topic] | Tries retrieval without a model, which is handy for checking what a doc set answers. |
/knowledge | Status and /knowledge sync inside the terminal and browser UIs. |
hexiel rag is an alias for hexiel knowledge.
How search works
Keyword + meaning
SQLite full-text search matches exact terms such as server.xml or --network host. Local Ollama embeddings
(nomic-embed-text, pulled on first sync) match by meaning. The two rankings are merged and the best passages returned.
Headings kept
Documents are split into passages by heading, and each passage remembers its trail (for example Connector > SSL).
Web pages become Markdown with code blocks kept and navigation removed.
Works without Ollama
With no embedding model, keyword search still works. Run sync once Ollama is up and the missing embeddings are filled in.
The model drives it
When the library has content, topics are listed in the prompt and the model searches before answering version-specific questions, citing the file.
If something is missing it can find docs and offer to download them, which asks for your approval.
Pin a project to versions
Create .hexiel/knowledge.toml in the project. Those topics are searched by default there, and named in the prompt.
topics = ["java-17", "tomcat-10.1", "angular-18"]
A topic of java matches java-21 and java-17; java-21 matches only that one.
The crawler is polite
It stays on the same host and under the start URL's folder, honours robots.txt, identifies itself, waits between requests, skips images and archives, and
never rewrites a page whose text did not change. Only keep copies of documentation you are allowed to keep; check each site's terms.
Troubleshooting
add saved only a few pages
The crawl stays under the start URL's folder. Start from a parent of the pages you want (for angular.dev use https://angular.dev/overview) and raise --pages for big manuals.
The first sync is slow
Embedding runs on your Ollama machine. On a modest mini-PC expect roughly 1–2 passages per second, so a 40-page site takes a few minutes. Later syncs only embed what changed.
"no Ollama embedding model available"
Start Ollama (ollama serve) and run hexiel knowledge sync. Keyword search works meanwhile.
find returns nothing
DuckDuckGo sometimes throttles bursts. hexiel retries; otherwise wait a few seconds, or set search_backend = "searxng" in config.toml.
A site is empty after add
Pages rendered in the browser have nothing to download. Try the site's static docs or a Markdown mirror, or download the docs and copy them into the topic folder.
Results come from the wrong version
Keep one topic folder per version, and pin the project or pass a topic.
Still stuck? Run hexiel --doctor, or open an issue.