Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

mnem commit

Record the staged memory state as a commit.

Synopsis

mnem commit [OPTIONS] --message <MESSAGE>

Description

Records everything currently staged by add and rm as a new commit on the current branch, with --message as the commit message. --author records who or what made the commit; it falls back to the $MNEM_AUTHOR environment variable, then to "unknown" - the same fallback shape --reviewer, registry publish, and every other author-recording flag in mnem use.

A commit's id is the content hash of its own bytes (ADR-0005), so the same staged state, message, author and time always produces the same id - committing is deterministic, not timestamped-and-random the way many systems' ids are.

Options

FlagDescription
-m, --message <MESSAGE>The commit message.
--author <AUTHOR>Who or what made the commit. Falls back to $MNEM_AUTHOR, then "unknown".

Examples

$ mnem add plan "canary rollout, 5% then 50% then 100%"
Staged plan as f1e2d3c4b5a6
$ mnem commit -m "record the rollout plan" --author alice
[a1b2c3d4e5f6] record the rollout plan

Setting $MNEM_AUTHOR once instead of passing --author every time:

$ export MNEM_AUTHOR=my-agent
$ mnem commit -m "update after tool call"

See also

  • add, rm - what gets committed.
  • log - reads back what commit wrote.
  • blame - resolves a node to the commit that introduced it.