Hybrid search, typed relations, static publishing. Built for humans and AI agents.
uv tool install memex-kb
Everything you need to manage knowledge, nothing you don't.
BM25 keyword search combined with semantic embeddings, merged with Reciprocal Rank Fusion.
Explicit directed links in frontmatter with CLI helpers and linting.
Wikilinks, relations, and semantic links queryable via CLI and published sites.
Project KB (./kb/) and user KB (~/.memex/kb/) with shared search.
Generate HTML with embedded search, tag pages, and graph visualization.
Portable CLI workflows plus a bundled SKILL.md for Claude Code, Codex, and other shell-capable harnesses.
uv tool install memex-kb
uv tool install 'memex-kb[search]' # Optional semantic search
pip install memex-kb
pip install 'memex-kb[search]' # Optional semantic search
Requires Python 3.11+. Keyword search is available by default. Install the [search] extra for semantic search, embeddings, and semantic link suggestions.
mx init # Create kb/ directory
mx add --title="API Notes" \ # Add an entry
--tags="api,docs" \
--category=reference \
--content="Endpoint details..."
mx search "authentication" # Search the KB
mx get reference/api-notes.md # Read an entry
| Command | Description |
|---|---|
mx search <query> |
Keyword search by default |
mx search --mode=semantic |
Semantic search (requires [search]) |
mx get <path> |
Read an entry |
mx list --tags=<tag> |
List entries by tag |
mx tree |
Directory structure |
mx whats-new |
Recent changes |
| Command | Description |
|---|---|
mx add |
Create new entry with metadata |
mx append |
Append to existing or create |
mx patch |
Find/replace in an entry |
mx ingest |
Import file into KB |
| Command | Description |
|---|---|
mx relations <path> |
Query entry relations |
mx relations-add |
Add typed relation |
mx relations-lint |
Check relation consistency |
mx hubs |
Find high-connectivity entries |
mx suggest-links |
Semantic link suggestions |
| Command | Description |
|---|---|
mx health |
Audit KB integrity |
mx reindex |
Rebuild search indices |
mx eval |
Search quality metrics (--dataset required) |
mx publish |
Generate static site |
| Command | Description |
|---|---|
mx prime |
Session context for agents |
mx schema --compact |
CLI schema (minimal tokens) |
mx batch |
Multiple commands, one invocation |
Entries are Markdown files with YAML frontmatter:
---
title: API Guide
tags: [api, docs]
description: Endpoints and auth
relations:
- path: reference/auth.md
type: documents
---
# API Guide
See [[reference/auth]] for auth details.
Relation types: depends_on, implements,
extends, documents, references,
blocks, related.