LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

enzyme

Local-first index and search for Markdown knowledge bases

TLDR

Install agent instructions for Claude Code in this notes folder
$ enzyme install claude
copy
Propose a `.enzyme` program from the current directory (prints the path)
$ enzyme compile -v
copy
Build the local index and catalysts
$ enzyme init --quiet
copy
Show what was indexed and any problems
$ enzyme doctor
copy
Search notes by wording and meaning
$ enzyme catalyze -n [10] "[why we keep rewriting the auth layer]"
copy
Show the petri map of entities and catalyst questions
$ enzyme petri -n [2]
copy
Refresh the index after new notes
$ enzyme refresh
copy
Index an Apple Notes workspace from its SQLite store
$ enzyme --workspace apple-notes compile --preset apple-notes [$HOME/Library/Group Containers/group.com.apple.notes/NoteStore.sqlite]
copy
$ enzyme --workspace apple-notes init
copy
Sign in to memory.enzyme.garden (needed after the first vault)
$ enzyme login
copy
Print the CLI version
$ enzyme --version
copy

SYNOPSIS

enzyme [-p|--vault PATH] [--workspace NAME] [-v] command [options]

DESCRIPTION

enzyme is the Enzyme CLI: a local-first compile step for Markdown knowledge bases (Obsidian vaults, meeting notes, agent memory). It reads how notes are already organized (folders, tags, links, and dates), writes a short editable `.enzyme` program, and builds a local index so a coding agent can retrieve related passages and cite them.The invoked binary is enzyme (Cargo `[[bin]]` in crate `enzyme-cli`). Workspace package version 0.13.1. Search runs on the machine. Catalyst generation (questions about what you decided, changed, or left open) may call Enzyme's hosted service or a local GGUF model.A typical Markdown setup is compile (propose settings), init (build the index), doctor (report what was indexed), then petri (map) and catalyze (search). refresh picks up later notes. install writes agent skills and instruction markers for claude, codex, hermes, or openclaw.Named workspaces live under `~/.enzyme/workspaces/` plus the workspace name (override the home with ENZYME-HOME). --workspace / --collection selects one and cannot be combined with -p / --vault. Without either, the vault is the current directory; legacy vault data is `vault/.enzyme/` (database `enzyme.db`, log `enzyme.log`).

PARAMETERS

-p, --vault PATH

Vault directory. Defaults to the current directory. Global. Conflicts with --workspace
--workspace NAME, --collection NAME
Named workspace declared under the Enzyme home. NAME is a single filesystem component (no slashes). Global. Conflicts with --vault
-v, --verbose
Raise log verbosity. Repeatable. Default is warnings only; once is info, twice is debug, three times is trace. Global. enzyme compile -v prints the generated program
--version
Print the package version and exit
--help
Print clap help for the CLI or a subcommand

CONFIGURATION

~/.enzyme

Enzyme home when ENZYME-HOME is unset. Holds `config.toml`, `models/`, workspace programs in `configs/`, named workspace data in `workspaces/`, and apply journals under `configs/.enzyme-apply/`
_vault_/.enzyme/
Legacy per-vault data: `enzyme.db`, `enzyme.log`, `refresh.lock`, `workspace.lock`. Named workspaces store the same files under `~/.enzyme/workspaces/`
`.enzyme` program
Readable settings compiled by enzyme compile. Declares `workspace`, `source markdown` / `source sqlite`, and `learn questions from` readings with a profile (`operational`, `decisiontrace`, `resonancetrace`, `reflective`, `relational`, `preferenceevidence`, or default `tensiontrace`)
OPENAI-API-KEY, OPENAI-BASE-URL, OPENAI-MODEL
Used only with --llm env. OPENAI-BASE-URL `https://openrouter.ai/api/v1` takes precedence for Markdown compile

COMMANDS

compile

Generate and save a readable `.enzyme` program. --preset is `arena`, `apple-notes`, or a path to a `.enzyme.in` template; remaining arguments are the preset source (Are.na channel URL, Apple Notes database path). --output writes a new file and never overwrites an existing one. --dry-run prints without saving. --json emits the program and the inventory it was selected from. --packet prints selection questions and evidence as JSON for an agent to answer; local only, saves nothing; conflicts with --preset, --output, --dry-run, and --json. --color is `auto` (default), `always`, or `never`. Markdown compile may call a model; source presets do not
init
Build or update the vault index and catalysts. -q / --quiet suppresses human output (for agents). --json-progress writes JSONL progress on stderr. --force / --regenerate discards the existing index and regenerates every entity's catalysts. --stage stops after a pipeline stage (for example `index`). --min-top-catalysts raises the ceiling for the largest entity. --lock-timeout SECS waits for another init/refresh of this workspace (default 1800; 0 fails immediately). --llm is documented under Catalyst generation
refresh
Incrementally refresh the index. Same -q, --min-top-catalysts, and --llm as init. --full / --force starts a complete catalyst rebase (still built detached). --lock-timeout defaults to 1800, or 5 with --quiet
catalyze QUERY
Rank notes by keyword and meaning. Each result notes the connecting catalyst. -n / --limit defaults to 10. --candidates N lists up to N further hybrid matches (path, date, snippet). --routing is `hybrid` (default) or `catalysts`. --target DIR prepares and searches that directory instead of the vault and always routes through catalysts. --json always emits the JSON envelope, including when stdout is a terminal
search QUERY
Read-only search of the index: catalyst, direct, and exact-phrase hits. -n / --limit is the maximum per mode (default 10). --phrase is the literal phrase (defaults to the query). --json emits the `enzyme.search.v1` envelope
petri
Show top entities and their catalyst questions. -n is how many entities to show (default 15; 0 means all). --query ranks entities and catalysts by relevance. --catalyst-budget is the maximum catalysts per entity in query mode (default 3). In a terminal this draws a tree; piped, it emits JSON
status
Show vault status and configuration. --json emits `enzyme.status.v1`
doctor
Report diagnostic facts. Read-only; never writes. --json emits structured JSON
install [TARGET]
Install or update this workspace's agent integration. TARGET is `claude`, `codex`, `hermes` (default), or `openclaw`. --source is `auto` (fetch GitHub copy, fall back to packaged; default), `remote`, or `local`. Claude and Codex skills go under the vault (`.claude/skills` or `.agents/skills`). Hermes and OpenClaw skills go under ~/.hermes / ~/.openclaw (or HERMES-HOME / OPENCLAW-HOME)
login
Sign in to memory.enzyme.garden. --no-open does not launch a browser. --json emits JSONL events for agent-mediated login. The first vault on a machine can init without login; refresh, publishing, account credits, and further vaults require this
logout
Sign out of memory.enzyme.garden
update
Check for and install Enzyme binary updates. --check only reports, as JSON
mcp
Start an MCP server on stdio
serve
Start the HTTP API for the explore UI. --port defaults to 8765
model install [NAME]
Download a GGUF into ~/.enzyme/models. Default name is `catalyst-135m-v3`. --url downloads a GGUF directly; --sha256 is the expected checksum for that URL
model list
List installed and available models. --json emits `enzyme.models.v1`
model use NAME
Select an installed model and require local catalyst generation
model auto
Return to automatic selection (local when installed, otherwise hosted)
model disable
Disable local catalyst generation and use Enzyme hosted
model status
Show the configured and effective catalyst-generation mode
model verify [NAME]
Verify an installed model's file and registry checksum (defaults to the selected model)
model rm NAME
Remove an installed model
workspace plan NAME --desired FILE
Plan replacing workspace NAME's program with the text in FILE (`-` is stdin). Never writes the program; may finish an interrupted apply first. --json prints the plan; --out also saves it
workspace apply --plan FILE
Apply a saved plan. Refuses stale or altered plans; replays already-applied ones. --json prints the receipt. After a write, index with enzyme refresh --workspace NAME
workspace recover
Complete interrupted applies. --discard drops journals whose program was edited mid-apply, leaving the program as it is. --json prints the outcome
spec compile FILE
Parse and resolve a source file (no vault access, no model). --instructions or --normalized change the printout; default is the resolved plan as JSON
spec profiles
Export built-in profile definitions. --json emits `enzyme.profiles.v1`
spec inspect VAULT
Print the effective runtime config. --instructions prints the compiled agent policy instead
spec plan [FILE]
Preview what a program would do on an indexed vault (read-only, no model). Global -p / --workspace select the vault. --json, --limit N, --prompts DIR, --local (local-model prompts)
spec migrate
Migrate `config.toml` to `configs/*.enzyme`, keeping a timestamped backup. --home overrides the Enzyme home
spec serve
Serve the syntax playground (Rust parser only). --bind defaults to `127.0.0.1`, --port to 4178
ingest
Ingest structured data into the Enzyme database. -q / --quiet emits JSON instead of human output
embed-entries
Embed structured entries without creating an Enzyme database. -i / --input is a JSON file (array, `{"entries": [...]}`, or `{"entry": ...}`); stdin if omitted
benchmark QUERIES
Benchmark retrieval. QUERIES is JSONL or plain text, one query per line. -n / --limit defaults to 10. --conditions is a comma list: `esedirect`, `esecatalysts`, `arcticdirect`, `arcticcatalysts` (default: all)
dump-prompts
Dump catalyst prompts to JSONL. -o / --output defaults to `prompts.jsonl`. --min-top-catalysts as on init

CATALYST GENERATION

init and refresh take --llm MODE:env

OpenAI-compatible endpoint from OPENAI-API-KEY (required), OPENAI-BASE-URL (default `https://api.openai.com/v1`), and OPENAI-MODEL (default `gpt-4o-mini`). Never Enzyme auth. --use-env-llm is an alias
local
The selected model in ~/.enzyme/models. Fails (exit 3) if none is installed
hosted
Enzyme hosted generation
none
Index, embed, and select only; no catalyst generation or network
Omit --llm to use the persisted enzyme model preference (an installed local model when selected or available), otherwise hosted. Without --llm and without any hosted or env key, catalyst generation is skipped and local search still works. Default init uses Enzyme's hosted bootstrap and ignores inherited OpenAI variables so it does not spend a personal key.Markdown compile is an OpenRouter Decisions call. It reuses the hosted lease from login. Catalyst generation uses OPENAI-MODEL; Decisions uses ENZYME-JEV-MODEL (default `typesafe/jev-1.13`).

CAVEATS

Exit codes: 0 success (including warnings), 1 index or runtime failure, 2 usage (bad flags or workspace name), 3 configuration (unreadable program, undeclared workspace, missing --llm env / local prerequisites), 4 workspace busy (lock held past --lock-timeout), 5 init indexed but catalysts failed their quality gate.Concurrent init / refresh on one workspace wait on `workspace.lock`, bounded by --lock-timeout. A detached catalyst worker may hold `refresh.lock` separately.On FUSE mounts, the SQLite database is mirrored under `/tmp/enzyme/` because FUSE cannot support SQLite's `xDelete`.scan is a hidden command still used by the SQLite source skill (`enzyme scan --workspace` NAME); prefer compile for setup.This is Enzyme Labs' knowledge CLI, not the LLVM Enzyme automatic-differentiation plugin.

HISTORY

Enzyme is developed by Enzyme Labs (Joshua Pham). The public tree is a Rust workspace (`enzyme-cli`, `enzyme-core`, `enzyme-api`) under Business Source License 1.1, version 0.13.1 as of 2026-10-24. Releases and `install.sh` are published on GitHub.

SEE ALSO

rg(1), grep(1), jq(1), claude(1), codex(1), obsidian(1), sqlite3(1), llm(1)

RESOURCES

Copied to clipboard
Kai