Quick Start
The typical workflow is: index your source tree once, then serve and query it.
# 1. Index a project (writes .trailhead/db.sqlite by default)
th index . --sqlite-db ./.trailhead/graph.db --embed-model sentence-transformers/all-MiniLM-L6-v2
# 2. Start the server (watches for changes, keeps embeddings warm)
th serve . --sqlite-db ./.trailhead/graph.db --model sentence-transformers/all-MiniLM-L6-v2
# 3. Open the browser UI
start http://localhost:8000
# 4. Or query from the CLI or another terminal
th query similar "HTTP route registration"
curl "http://localhost:8000/api/query/similar?text=HTTP+route+registration"
The server re-indexes changed files automatically in the background. You do
not need to re-run th index while the server is running.
See the CLI guide for the full command reference and the HTTP API guide for everything the server exposes.