Skip to main content

Local, folder-first LLM knowledge bases: format spec, CLI, MCP server, and agent skills.

Project description

llmkb — local, folder-first LLM knowledge bases

A template and toolkit for LLM knowledge bases that are just a git directory of markdown pages, in the style of Karpathy's LLM-wiki. An agent plus that directory is a complete system: agents ingest sources and file what they learn, the wiki compounds synthesis over time, and a small CLI keeps the bookkeeping honest. No server, no database, no proprietary format.

This repo ships the format spec, a CLI, an optional MCP server, and agent skills. Actual knowledge bases are separate directories stamped out per project — this repo never contains anyone's knowledge.

Install

uv tool install llmkb          # or: pipx install llmkb
# optional MCP server:
uv tool install "llmkb[mcp]"

Quickstart

llmkb init my-project-kb --description "notes for my project"
# drop sources into my-project-kb/raw/, then use the kb-ingest skill
llmkb reindex --kb my-project-kb
llmkb lint --kb my-project-kb
llmkb search "some query" --kb my-project-kb

What's in a KB

A knowledge base is a directory:

my-project-kb/
  kb.yaml           # identity + format version
  SCHEMA.md         # the writing discipline agents follow
  raw/              # curated sources, never modified
  wiki/
    summaries/  concepts/  entities/
    index.md        # derived catalog (llmkb reindex rebuilds it)
    log.md          # append-only operation record

See docs/FORMAT.md for the full versioned contract and examples/example-kb/ for a working example.

CLI

  • llmkb init <dir> — scaffold a new KB.
  • llmkb reindex — rebuild wiki/index.md from page frontmatter.
  • llmkb lint — catch broken links, orphans, index drift, malformed frontmatter; exit code reflects health.
  • llmkb search <query> — full-text search (SQLite FTS5, cached in .llmkb/).

All commands take --kb <dir> (repeatable; defaults to the current directory) and tag multi-KB output by name.

MCP server (optional)

llmkb-mcp --kb <dir> runs a read-only MCP stdio server exposing search, get_page, get_index, and list_kbs to any MCP-capable agent.

Skills

Four portable, dual-harness skills live in skills/kb-ingest, kb-query, kb-lint, kb-init. Install them once (user-wide or as a plugin); never copy them into a KB instance, so they evolve centrally.

License

Apache-2.0. See LICENSE.

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

llmkb-0.1.0.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

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

llmkb-0.1.0-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file llmkb-0.1.0.tar.gz.

File metadata

  • Download URL: llmkb-0.1.0.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for llmkb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 91b3cba47eb33bc5f3f80b3a0ce6321cd31fa0db0e0cc92fd6c2e0c4f209c767
MD5 017b47ab6f59470ffd72c54ab2082b88
BLAKE2b-256 e7def882e4b3e7086838a7da247819c5bea8e1751bb1f3d2b8ad650d354d671e

See more details on using hashes here.

Provenance

The following attestation bundles were made for llmkb-0.1.0.tar.gz:

Publisher: release.yml on hogu-dev/llmkb

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

File details

Details for the file llmkb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: llmkb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for llmkb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4cf889dc759990f340c37808175bef3506ad3dca445e4b0f22b65f0948f43f24
MD5 0ee91c47c139a60a56a9b6f80319af90
BLAKE2b-256 6826b3d51b11ccfb9bb721e64fd6fe4fb1894da9d15e837701ab6629c042bcf5

See more details on using hashes here.

Provenance

The following attestation bundles were made for llmkb-0.1.0-py3-none-any.whl:

Publisher: release.yml on hogu-dev/llmkb

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