Currently only supports basic text file formats like txt, md, and pdf SOON this would support source code files like c, cpp, py, js, etc. and is not optimized for large files.
$ cargo run or cargo build # to build the project and use the prebuilt index
$ cargo run -- refresh or cargo build -- refresh # to refresh the index
These are the benchmarks on my ryzen 7 5700
=== Indexing Benchmark ===
Indexed 859 files in 3.54s
Indexing Throughput: 242.98 files/sec
Effectively: 23.1 MB/sec
=== Search Benchmark ===
Average Search Latency: 1.68ms
=== Search Throughput Benchmark (5s) ===
Total Queries: 2600
Throughput: 518.58 QPS- Background indexing so the tool starts immediately.
- Local index stored in
.finder.jsonfor faster subsequent runs. - Debounced input to keep the interface responsive.
- Fuzzy filename matching.
- Full-text search across files.
- Results ranked by relevance, with filename matches prioritized over content matches.
- Live file preview with query highlighting.
- Syntax highlighting where applicable.
- Keyboard navigation (Up/Down) and mouse support.
- Supports
.khojignorefor excluding files and directories, same format as .gitignore - Opens results in VS Code or the editor defined in environment variables.
| Option | Description |
|---|---|
--refresh, -r |
Rebuilds the index and ignores any existing .finder.json. |
When opening a file, Khoj checks editors in the following order:
codeorcode-insidersKHOJ_EDITOREDITORnanovi
To force a specific editor:
export KHOJ_EDITOR=nvim