Skip to content
On this page

Move, back up, or uninstall ​

Taking rules out again, or carrying an install to another machine: remove for one source or one memory, the files that carry an install for a backup or a move, and the two commands that uninstall everything. What a failed run leaves behind is on the guarantees page.

Remove a source or a memory ​

bash
npx -y @vivswan/maxims remove @Octocat/rules                  # a whole source
npx -y @vivswan/maxims remove prefer-timeouts-to-hangs  # one memory by name

remove takes the source or memory out of state and syncs; there is no separate uninstall path, because the regenerated output no longer contains those lines.

In a terminal it lists "Memories to remove:" and asks "Are you sure you want to remove them?" before acting, then reports "Removed 2 memories". The non-interactive rules own what happens without a TTY.

after removeresult
a rule file that was only the maxims blockdeleted
a rule file with hand-written content beside the blockthe block goes, the rest stays byte for byte
a live local source (installed with --link)the store symlink is unlinked; the source directory is never touched
the hookleaves its scope with the last source there for its harness

Back up or move to a new machine ​

State carries the intent, so a backup of your intent and configuration is a copy of the files in step 1, and moving an install is three steps; rule files and memory bodies are not in that copy, since sync writes them again from the sources.

  1. Copy ~/.agents/maxims/state.json to the same path on the new machine, config.json beside it if you want the same defaults, and harnesses.json if you declared your own harnesses. Without that file a source naming one in intent.harnesses restores nothing for it, every sync prints the line below instead, and the dropped-harness notice owns the way out:

    text
    !  maxims: @Octocat/rules: skipped my-harness (not defined in harnesses.json; run maxims unlink <source> -a <id> to drop it)
  2. Edit the old machine's absolute paths by hand: the key and intent.from.path of every local source, the path of every out destination, the root of every project destination, and each project root under disabled.project and hooks.project.

  3. Run npx -y @vivswan/maxims sync; the failure paths own the refetch of a missing store copy, and the verb table owns what a sync writes.

Uninstall everything ​

bash
npx -y @vivswan/maxims remove --all      # every source out of state, then a sync
rm -rf ~/.agents/maxims                  # or $MAXIMS_HOME: the store, state, config, and log

remove --all takes every source out of state and syncs; the remove section above owns what that sync removes and when the hook goes. What remains is the canonical home itself, with an empty state and your config.json, and you delete that by hand.

Built from main at 5f6e985Source: docs/move-or-uninstall.md