---
title: "qmd vs Khoj (2026): which fits your files?"
canonical: "https://xerj.org/compare/qmd-vs-khoj-2026"
updated: "2026-12-04"
---

# qmd vs Khoj in 2026

SHORT ANSWER · UPDATED 2026-12-04
Pick qmd for local hybrid search over Markdown knowledge bases; pick Khoj for a personal AI over notes and documents. qmd is a command-line tool written in TypeScript under MIT, while Khoj is a self-hosted app written in Python under AGPL-3.0.
**Key number:** qmd: 31,830 GitHub stars, Khoj: 38,337 GitHub stars (3 Dec 2026).
Stars, licences, languages and releases for 3 tools were fetched live from the GitHub API, GitHub release pages and the Hugging Face API on 3 Dec 2026. Hosted services link to their official sites and carry no invented numbers.

**TL;DR** Pick qmd for local hybrid search over Markdown knowledge bases.

## Agent prompt

```text
Read https://xerj.org/llms.txt. I am choosing between qmd and Khoj. Index this project with xerj autoindex, connect xerj mcp, and use xerj_search to find where my code would call either one. Cite file and line.
```

## Pick one in ten seconds

- Pick [qmd](https://github.com/tobi/qmd) for local hybrid search over Markdown knowledge bases.
- Pick [Khoj](https://github.com/khoj-ai/khoj) for a personal AI over notes and documents.
- Pick [XERJ](https://github.com/xerj-org/xerj) when an AI agent should search local code, docs and logs over MCP, with citations.

## Where qmd shines

On-device search engine for Markdown notes and docs with BM25, vector search and reranking, plus MCP. It fits local hybrid search over Markdown knowledge bases. Plan for this: focused on Markdown collections.

## Where Khoj shines

Self-hostable AI second brain that searches and chats over your documents and the web. It fits a personal AI over notes and documents. Plan for this: a web app with its own server.

## Key differences

- **How it runs:** qmd is a command-line tool; Khoj is a self-hosted app.
- **Language:** qmd is mainly TypeScript, Khoj is mainly Python.
- **Licence:** qmd uses MIT; Khoj uses AGPL-3.0.
- **Release cadence:** qmd shipped v2.9.0 on 17 Nov 2026; Khoj's latest GitHub release is 2.0.0-beta.28 from 25 Mar 2026.
- **MCP:** qmd ships MCP support from the project itself.

## Where XERJ fits

XERJ is a new way for AI to search for data: one local Rust binary that indexes code, docs, logs and data with `xerj autoindex` and returns passages with file and line citations. `xerj mcp` is a stdio MCP server, and `xerj mcp --http` serves Streamable HTTP at `http://127.0.0.1:9330/mcp`, read-only unless you pass `--allow-writes`. A non-loopback bind needs `XERJ_MCP_TOKEN`. Use it next to qmd or Khoj when an agent has to answer from files on your machine.

## How we checked

Stars, licences, languages and releases for 3 tools were fetched live from the GitHub API, GitHub release pages and the Hugging Face API on 3 Dec 2026. Hosted services link to their official sites and carry no invented numbers. We describe what each project says it does and avoid ranking one above the other in general.

## Read next

- [qmd alternatives 2026: local note search tools for AI agents](https://xerj.org/compare/qmd-alternatives-2026)
- [Khoj alternatives 2026: local and desktop search](https://xerj.org/compare/khoj-alternatives-2026)
- [Khoj vs AnythingLLM (2026): which fits your files?](https://xerj.org/compare/khoj-vs-anythingllm-2026)
- [Khoj vs Open WebUI (2026): which fits your files?](https://xerj.org/compare/khoj-vs-open-webui-2026)
- [XERJ vs Khoj for searching your own documents](https://xerj.org/compare/xerj-vs-khoj)
- [BM25 vs vector search](https://xerj.org/science/bm25)
- [What is agentic search? AI agents that search in a loop (2026)](https://xerj.org/science/agentic-search)

## FAQ

### Is qmd better than Khoj?

Neither is better in general. qmd fits local hybrid search over Markdown knowledge bases, and Khoj fits a personal AI over notes and documents. The 4-question picker on this page scores both for your workload.

### Are qmd and Khoj open source?

qmd: MIT. Khoj: AGPL-3.0. Licences come from each repository on 3 Dec 2026.

### Which is easier to run, qmd or Khoj?

qmd runs as a command-line tool (focused on Markdown collections). Khoj runs as a self-hosted app (a web app with its own server).

### Which has more GitHub stars, qmd or Khoj?

Khoj had 38,337 stars and qmd had 31,830 on 3 Dec 2026. Stars measure attention, so weigh them with the fit questions above.

## Evidence

- [tobi/qmd](https://github.com/tobi/qmd): 31,830 stars, MIT, TypeScript, latest release v2.9.0, 17 Nov 2026 (GitHub API and release page, checked 3 Dec 2026).
- [khoj-ai/khoj](https://github.com/khoj-ai/khoj): 38,337 stars, AGPL-3.0, Python, latest release 2.0.0-beta.28, 25 Mar 2026 (GitHub API and release page, checked 3 Dec 2026).
- [xerj-org/xerj](https://github.com/xerj-org/xerj): 23,588 stars, Apache-2.0, Rust, latest release v1.0.0-rc.105, 23 Nov 2026 (GitHub API and release page, checked 3 Dec 2026).

## Comparison table

| Tool | What it is | Runs as | Language | Latest release | Licence | Stars |
|---|---|---|---|---|---|---|
| [qmd](https://github.com/tobi/qmd) | On-device search engine for Markdown notes and docs with BM25, vector search and reranking, plus MCP | Command-line tool | TypeScript | v2.9.0, 17 Nov 2026 | MIT | 31,830 |
| [Khoj](https://github.com/khoj-ai/khoj) | Self-hostable AI second brain that searches and chats over your documents and the web | Self-hosted app | Python | 2.0.0-beta.28, 25 Mar 2026 | AGPL-3.0 | 38,337 |
| [XERJ](https://github.com/xerj-org/xerj) | One local Rust binary that indexes code, docs, logs and data, and serves cited search to agents over MCP | Command-line tool | Rust | v1.0.0-rc.105, 23 Nov 2026 | Apache-2.0 | 23,588 |
