1. What is here
This tier documents the binary’s whole surface: every command, every flag, every value a caller can send or read back.
Each page is generated while the site builds, from the source that defines the thing it documents, so none of these pages exists as a file in the repository. Where a page states a count, that number is the length of an array in the source, so a page here cannot claim a command or a code the binary does not have.
The registries, and how many members each one holds:
| Page | Registry | Members | Source |
|---|---|---|---|
reference/commands/… |
Commands | 47 | apps/cli/src/commands.ts |
| Global flags | Global flags | 3 | apps/cli/src/commands.ts |
| Guide topics | Guide topics | 7 | apps/cli/src/commands.ts |
| Response types | Response types | 41 | apps/cli/src/envelope.ts |
| Error codes | Error codes | 21 | apps/cli/src/envelope.ts |
| Environment variables | Environment variables | 17 | apps/cli/src/config.ts |
| MCP tools | MCP tools | 15 | apps/mcp/src/tools.ts |
| MCP resources | MCP resources | 3 | apps/mcp/src/resources.ts |
| Closed vocabularies | Closed vocabularies | 9 | packages/contracts/src/types.ts, packages/contracts/src/edges.ts |
| Sleep phases | Sleep phases | 17 | packages/sleep/src/contract.ts |
| RRF arms | RRF arms | 4 | packages/index/src/retrieval-sql.ts |
| Migrations | Migrations | 14 | packages/index/migrations |
| Requirements | Requirements | 107 | spec/memhtml.symspec.json |
| Workspace packages | Workspace packages | 15 | apps/, packages/ |
| Contract symbols | Contract symbols | 79 | packages/contracts/src |
2. The commands
memhtml accepts 47 commands, each with its own page below. A subcommand is one command with a space in its name, so memhtml index rebuild is a single entry rather than a tree.
| Command | Summary |
|---|---|
memhtml manifest |
Emit this CLI’s full machine-readable contract. |
memhtml help |
Describe one command: usage, arguments, flags, response type, examples. Markdown on a terminal, a cli.help envelope when piped. |
memhtml init |
Scaffold a memory repo at --repo/$MEMHTML_ROOT: git init, PARA dirs, merge driver. |
memhtml write |
Write one memory. Content-hash duplicates return the existing path, uncommitted. |
memhtml apply |
Write many memories from a JSONL op stream: ONE commit, ONE index update, per-op results. |
memhtml read |
Read one memory: its metas, links, article, and format warnings. |
memhtml search |
Ranked search: four RRF arms plus MMR. Degrades to the lexical floor. |
memhtml recall |
A disclosure pack under a character budget: arcs and memories folded separately. |
memhtml correct |
Supersede a memory: write the new file and archive the target in ONE commit. |
memhtml link |
Add an authored edge to the source file and commit it. Idempotent. |
memhtml neighbors |
The memory graph around one path, to a fixed depth of at most two hops. |
memhtml resolve |
Follow a possibly-moved path forward to the memory that carries the fact now. |
memhtml archive |
Soft-evict: git mv into archive/<YYYY>/ with the archive stamps. Never a delete. |
memhtml reinforce |
Bump access bookkeeping, gated by a 900-second per-path cooldown. |
memhtml list |
Page through the corpus by type, workspace, tag, entity, facet, or PARA bucket. |
memhtml entity activity |
Every entity with its file count and its last activity, newest first. Report only. |
memhtml task add |
Open a task: a task memory in projects/<ws>/tasks/ or areas/inbox/tasks/. |
memhtml task status |
Move a task’s status. done stamps AND archives it, in one commit. |
memhtml task list |
The task working set: a direct indexed scan with blockers, never ranked retrieval. |
memhtml index rebuild |
Rebuild index.db from the git tree at HEAD, keeping every stored vector whose chunk survives. Destroys nothing outside .memhtml/. |
memhtml index update |
Index only what moved since the recorded watermark, plus the dirty working tree. |
memhtml index embed |
Fill every chunk that has no vector in the configured space, without a rebuild. Safe to rerun; reports the gap it left. |
memhtml index status |
The index watermark, the vector space it was built in, and its row counts. |
memhtml trace index |
Scan $MEMHTML_TRACE_ROOT for Claude Code transcripts, reading only what changed. |
memhtml trace search |
FTS over session first-prompts and AI titles. Never enters memory retrieval. |
memhtml trace links |
The memory-session links, from either side. |
memhtml sleep run |
The curation cycle: 17 phases, each an isolated commit on a review branch. |
memhtml sleep resume |
Re-run only the phases with no Memhtml-Phase trailer on the branch. |
memhtml sleep review |
Per-phase counts, the commit list, diff --stat, and a per-file classification. |
memhtml sleep merge |
Fast-forward main to the run’s branch after the discrimination gate passes, then project the merged commit into the index. |
memhtml sleep status |
The latest sleep run and its per-phase outcomes. |
memhtml sleep plan |
Would a run change anything? Read the signals from index counts, running no phase. |
memhtml status |
Corpus health: HEAD, dirty state, counts by type, edges, index freshness. |
memhtml publish |
Regenerate the per-directory index.html listings and sitemap.xml, and commit them. |
memhtml doctor |
Corpus health: dangling hrefs, orphan state rows, inbox depth, vocabulary, staleness. |
memhtml eval discriminate |
The refusable retrieval gate: every probe must outrank its own wrong-fact twins. |
memhtml exec |
Run a read-only traversal script over the corpus in a sandbox: multi-hop in ONE execution. |
memhtml state export |
Write .memhtml/state/access.jsonl, the only durable copy of the state plane, and commit. |
memhtml state import |
Replay the committed sidecar into state.db. Counters merge by max, never last-wins. |
memhtml agents-doc |
Regenerate AGENTS.md from this command table. --check fails on drift. |
memhtml serve mcp |
Run the memhtml-mcp stdio server: 15 tools and 3 resources over this same repo. |
memhtml integrations install |
Wire a coding agent to this store: its MCP entry, its hooks, a fenced block in its instruction file, and a skill, recorded in a receipt so uninstall removes exactly what install wrote. |
memhtml integrations uninstall |
Remove exactly what install wrote for one host, matched against the receipt; a managed file that was modified since is refused. |
memhtml integrations list |
For every host: installed, modified, or not installed, at user scope and at the named project scope. |
memhtml integrations doctor |
Check a host’s wiring end to end: binary path and version, store root, MCP entry, hooks, instruction block, skill, transcript root, and a live initialize handshake with the server the entry names. |
memhtml integrations shell |
Print an eval-able shell snippet that exports MEMHTML_ROOT and puts this binary’s directory on PATH; --write appends it to your rc file inside a fence. |
memhtml hook |
The engine every installed hook calls. Reads the host’s hook payload on stdin, runs recall or transcript indexing under a hard time bound, and writes the HOST’S protocol to stdout (plain text or the host’s JSON), never this envelope; any failure prints nothing and exits 0, so a hook can never block a turn. |
3. Where the command table comes from
The single source of parsing, validation, and the manifest. A command lands here
before it lands anywhere else, so memhtml manifest and memhtml agents-doc describe
what the binary actually accepts rather than what someone remembered to document.
A subcommand is one entry with a space in its name (index rebuild), not a nested tree.
Flattening keeps nearest() able to suggest across the whole surface, a typo in the noun
(memhtml indx rebuild) and a typo in the verb (memhtml index rebiuld) both get a candidate, and
keeps one table driving parsing, the manifest, and the generated doc.
4. Provenance
A loader generates this page from apps/cli/src/commands.ts while the site builds, so no file in the repository holds it: a content-layer loader hands these pages straight to the docs collection, so the sidebar and the site search treat them as ordinary pages. Change the registry and this page changes with it.