steve 2030976b85 Add GPU device control, Docker support, and v2 client-server design
- Add configurable device selection for embeddings (embedding.device) and
  Docling ingestion (ingestion.device) with env var overrides (KB_DEVICE,
  KB_INGEST_DEVICE) to control GPU/CPU usage per component
- Add `kb doctor` command for safe GPU diagnostics
- Add Dockerfile (NVIDIA CUDA) and compose.yaml for containerised GPU usage
- Add OpenSpec v2 change (kb-v2-client-server): proposal, design, specs, and
  tasks for client-server architecture with Go CLI, FastAPI engine, async
  ingestion queue, and GPU-vendor-agnostic Docker deployment
- Add uv.lock for reproducible installs
- Gitignore examples/ directory (test data only)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:17:31 +00:00
2026-03-23 20:38:42 +00:00
2026-03-23 20:38:42 +00:00
2026-03-23 20:38:42 +00:00
2026-03-23 20:38:42 +00:00

kb-search

CLI knowledge base with hybrid search (full-text + semantic vector search).

Install

pipx install kb-search

Quickstart

# Initialise (downloads embedding model ~90MB)
kb init

# Add documents
kb add ~/docs/manual.pdf --tags admin
kb add ~/notes/ --recursive
kb add --note "Always restart nginx after config changes" --tags ops

# Search
kb search "how to install git"
kb search "deploy process" --tags ops --type pdf
kb search "authentication" --format human

# Manage
kb list --format human
kb tags
kb status

How it works

  • Ingestion: Documents are chunked (PDFs via Docling, markdown by headers, code by AST/functions) and embedded locally
  • Storage: Everything in a single SQLite database (~/.kb/kb.db) using FTS5 for keyword search and sqlite-vec for vector search
  • Search: Hybrid retrieval combining BM25 keyword scoring and vector similarity via Reciprocal Rank Fusion
  • Output: JSON (for LLM tool use) or human-readable terminal format

Configuration

Optional YAML config at ~/.kb/config.yaml. Works with zero configuration.

kb config                              # View current config
kb config set chunking.pdf.max_tokens 2048  # Change a value

ENV overrides: KB_DATA_DIR, KB_MODEL, KB_DEFAULT_TOP, KB_DEFAULT_FORMAT

Claude Code Skill

This tool is designed to be wrapped as a Claude Code skill. See SKILL.md for the skill definition.

S
Description
Personal knowledge base with hybrid search (full-text + semantic). FastAPI engine with GPU-accelerated embeddings, Go CLI client, SQLite storage.
Readme 7.9 MiB
2026-05-15 18:37:12 +01:00
Languages
Python 62.5%
Go 27.1%
Shell 9.9%
Makefile 0.4%
Dockerfile 0.1%