Skip to main content

Local knowledge base CLI — hybrid search over markdown files with AI embeddings

Project description

kbx

Local knowledge base CLI with hybrid search over markdown files. Indexes meeting transcripts, notes, and entity records into SQLite (FTS5) and LanceDB (vector) for fast retrieval by humans and AI agents.

Install

pip install kbx                      # core CLI + FTS5 search
pip install "kbx[search]"            # + vector search (Qwen3 embeddings)
pip install "kbx[search,mlx]"        # + Apple Silicon acceleration

Requires Python 3.10+.

Quick Start

kbx init                   # create kbx.toml in the current directory
kbx index run              # index markdown files
kbx search "quarterly planning"      # hybrid search (FTS5 + vector)
kbx search "quarterly planning" --fast   # keyword-only (no model needed)

Features

  • File-first architecture -- markdown files are the source of truth; the DB (SQLite + LanceDB) is a derived search index rebuilt from those files
  • Full-text search -- SQLite FTS5 with BM25 ranking and natural date filters
  • Vector search -- Qwen3-Embedding-0.6B via sentence-transformers, fused with FTS5 using reciprocal rank fusion (RRF)
  • Entity linking -- auto-links people, projects, and glossary terms to documents via regex matching
  • Entity CRUD -- manage people, projects, and glossary terms from the CLI with markdown file sync
  • MCP server -- stdio transport for integration with Claude, Cursor, and other AI tools
  • Granola sync -- pull meeting transcripts from the Granola API or ingest local exports
  • Configurable -- kbx.toml controls source directories, search behaviour, and extras
  • Incremental indexing -- content-hash based; only re-indexes changed files

Configuration

kbx looks for configuration in this order:

  1. $KBX_CONFIG environment variable
  2. ./kbx.toml in the current directory
  3. ~/.config/kbx/config.toml

Run kbx init to generate a starter config file.

Optional Extras

Extra What it adds
search LanceDB + sentence-transformers + NumPy for vector search
mlx MLX backend for faster embeddings on Apple Silicon
mcp MCP server for AI tool integration
all Everything above plus test and dev dependencies

Install with: pip install "kbx[search,mlx,mcp]"

Development

git clone https://github.com/tenfourty/kbx.git
cd kbx
uv sync --all-extras
uv run pre-commit install
uv run pytest -x -q --cov

See CONTRIBUTING.md for guidelines.

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kbx-0.1.42.tar.gz (580.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kbx-0.1.42-py3-none-any.whl (145.7 kB view details)

Uploaded Python 3

File details

Details for the file kbx-0.1.42.tar.gz.

File metadata

  • Download URL: kbx-0.1.42.tar.gz
  • Upload date:
  • Size: 580.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kbx-0.1.42.tar.gz
Algorithm Hash digest
SHA256 cf241a6c6f71be0ec2ba38c7379fd68487e8b27d0ee1121a271c9712ac82d1ff
MD5 2843815b93e2436362fb1710cbd82c08
BLAKE2b-256 b0e9e195b1626696cd4dbd1da4b213c0db78064a37c0fe4fedccb34dcc8b0405

See more details on using hashes here.

Provenance

The following attestation bundles were made for kbx-0.1.42.tar.gz:

Publisher: release.yml on tenfourty/kbx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kbx-0.1.42-py3-none-any.whl.

File metadata

  • Download URL: kbx-0.1.42-py3-none-any.whl
  • Upload date:
  • Size: 145.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kbx-0.1.42-py3-none-any.whl
Algorithm Hash digest
SHA256 7daa54711e0f6b3f4d6fca89f4a029cfef26936f6769a11240adae52769bf1ca
MD5 ae7a2ffa632278fdab99b11099e3709b
BLAKE2b-256 2268e2aae53e8f1d665ca26dd3d62497e344e72c27a4fd3aed8aee595fd763a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for kbx-0.1.42-py3-none-any.whl:

Publisher: release.yml on tenfourty/kbx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page