
memex-kb
Searchable Markdown KB built for AI workflows. Hybrid search, typed relations, wiki links, graph views. Token-efficient CLI for agents, static publishing for…
Install with your AI
Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.
Install and set up memex-kb (git-clone project) into my current project. Found on https://claudeers.com/memex-kb Repo: https://github.com/chriskd/memex-kb Homepage/docs: https://memex-kb.sh Detected install method: git-clone → git clone https://github.com/chriskd/memex-kb Category: rag. Platforms: cli, api. Read the repo's README for exact setup and env vars, then install it and wire it into my project. Claudeers Health Verdict: unknown; community-verified: false. Confirm the source before running anything.
git clone https://github.com/chriskd/memex-kb
// compatibility
| Platforms | cli, api |
|---|---|
| Operating systems | — |
| AI compatibility | claude |
| License | MIT |
| Pricing | open-source |
| Language | Python |

Memex
CLI-first knowledge base for Markdown + YAML frontmatter across project and user scopes, with static publishing and agent-focused workflows.
Start Here
kb/guides/index.md(published docs landing page)kb/guides/quick-start.md(KB quick start)kb/guides/ai-integration.md(Claude Code, Codex, and skill-aware harnesses)kb/reference/cli.md(full command reference)
Install
# Recommended
uv tool install memex-kb
# Optional semantic search deps
uv tool install 'memex-kb[search]'
# Or pip
pip install memex-kb
pip install 'memex-kb[search]'
# Verify
mx --version
Keyword search is available by default. Semantic search is optional ([search] extra).
If dependencies are missing, run mx doctor.
From a repo checkout, prefix with uv run:
uv sync --dev
uv run mx --version
First Run
# Guided check; initialize if missing (non-interactive)
mx onboard --init --yes
# Same check, but only current directory context
mx onboard --init --yes --cwd-only
# Direct project KB initialization
mx init --sample
mx init --path docs/kb --sample
# User KB initialization
mx init --user --sample
Notes:
mx onboard --init --yescan create a KB when none is configured.- In onboarding, sample behavior is configurable with
--sample/--no-sample. - When both project and user KBs are active, paths may be scoped (
@project/...,@user/...).
Common Commands
# Search (keyword default; semantic optional)
mx search "deployment"
mx search "deployment" --mode=keyword
mx search "deployment" --mode=semantic
mx search "deployment" --scope=project
mx search "deployment" --include-neighbors --neighbor-depth=2
# Create/read/update
mx add --title="Setup" --tags="docs" --category=guides --content="..."
mx quick-add --content="Capture this note"
mx get @project/guides/setup.md
mx replace @project/guides/setup.md --tags="docs,setup"
mx delete @project/guides/setup.md --force
# Multi-KB visibility and context
mx info
mx context show
mx context validate
# Agent session handoffs
mx sessions start --goal "Implement deployment cleanup" --harness codex
mx sessions append --latest --summary "Updated deployment docs" --files README.md
mx sessions append --latest --summary "Linked transcript" --transcript /tmp/session.jsonl
mx sessions finish --latest --summary "Ready for review"
mx sessions recent
# Maintenance
mx health
mx doctor
mx doctor --timestamps
mx doctor --timestamps --fix
mx relations-lint --strict
Publish
# Basic build
mx publish -o _site
# Source selection
mx publish --kb-root ./kb -o _site
mx publish --scope=project -o _site
# Landing page and base URL
mx publish --index guides/index --base-url /my-kb
# Content controls
mx publish --include-drafts --include-archived
mx publish --no-clean
# GitHub Pages workflow
mx publish --setup-github-actions
mx publish --setup-github-actions --dry-run
Agents + Skills
Memex integrates with assistants in two layers:
mxis the stable interface for any harness with shell access.skills/memex-kb/is the bundled reusable skill for harnesses that supportSKILL.md.
# Project-local hooks
mx sessions hook claude --install --path .claude/settings.local.json
mx sessions hook codex --install --path .codex/hooks.json
mx sessions hook claude --install --turns 5
# Claude Code native skill install from a repo checkout
mkdir -p .claude/skills
ln -s "$PWD/skills/memex-kb" .claude/skills/memex-kb
# Codex local skill install from a repo checkout (restart Codex after)
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
ln -s "$PWD/skills/memex-kb" "${CODEX_HOME:-$HOME/.codex}/skills/memex-kb"
# Installed package: locate the bundled skill first
python3 -c 'from importlib.resources import files; print(files("memex").joinpath("skills", "memex-kb"))'
# Portable helpers for any harness
mx prime
mx session-context
mx sessions hook codex --instructions
mx sessions hook codex --print
mx sessions hook codex --print --turns 5
mx sessions hook claude --print
mx schema --compact
mx batch < commands.txt
mx --json-errors search "query"
Hooks load context at session start. Add --turns N to install a periodic session-log reminder that
asks the agent to append only the latest delta, not the whole session.
For the full setup matrix, including Claude permissions, Codex skill conventions, and generic
skill installation guidance, see kb/guides/ai-integration.md.
Config
Project config file: .kbconfig at repo root.
# kb_path is canonical; project_kb still appears in some help/output
kb_path: ./kb
primary: inbox
warn_on_implicit_category: true
boost_paths:
- inbox/*
- guides/*
default_tags:
- myproject
publish_base_url: /my-kb
publish_index_entry: guides/index
Environment variables:
| Variable | Description |
|---|---|
MEMEX_USER_KB_ROOT | Override user KB root (default ~/.memex/kb) |
MEMEX_CONTEXT_NO_PARENT | Only consider .kbconfig in current directory |
MEMEX_INDEX_ROOT | Override index root |
MEMEX_QUIET | Suppress warnings |
Useful global flags:
--json-errorsoutputs structured errors with error codes.-q, --quietsuppresses warnings (same effect asMEMEX_QUIET=1).
// faq
What is memex-kb?
Searchable Markdown KB built for AI workflows. Hybrid search, typed relations, wiki links, graph views. Token-efficient CLI for agents, static publishing for humans.. It is open-source on GitHub.
Is memex-kb free to use?
memex-kb is open-source under the MIT license, so it is free to use.
What category does memex-kb belong to?
memex-kb is listed under rag in the Claudeers registry of Claude-compatible tools.
// embed badge
[](https://claudeers.com/memex-kb)
// retro hit counter
[](https://claudeers.com/memex-kb)
// reviews
// guestbook
// related in RAG & Knowledge
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant contex…
✨ Light and Fast AI Assistant. Support: Web | iOS | MacOS | Android | Linux | Windows
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 60-95% fewer tokens, same answers. Library, proxy, MCP server.
A light-weight and powerful meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.