Mem9 Cleanup
Resolve ./scripts/cleanup.mjs relative to this skill directory.
If you need the current CLI surface, flags, or examples, run node ./scripts/cleanup.mjs --help first.
Use command-specific help when needed, for example node ./scripts/cleanup.mjs run --help.
Run this workflow:
- Inspect the current cleanup targets first:
set -euo pipefail
node ./scripts/cleanup.mjs inspect
- Use the JSON summary to confirm whether cleanup should cover only global Codex files or the current project's local override too.
- Remove mem9-managed global Codex files with:
set -euo pipefail
node ./scripts/cleanup.mjs run
- When the current repository's local override should be removed too, run:
set -euo pipefail
node ./scripts/cleanup.mjs run --include-project
Common flags:
inspectrun--include-project--cwd <repo-root>
run removes mem9-managed entries from $CODEX_HOME/hooks.json, $CODEX_HOME/mem9/hooks/, $CODEX_HOME/mem9/install.json, $CODEX_HOME/mem9/config.json, and $CODEX_HOME/mem9/state.json.
run --include-project also removes <project>/.codex/mem9/config.json.
Keep $MEM9_HOME/.credentials.json, $CODEX_HOME/config.toml, and mem9 debug logs untouched.
Do not print API keys or credential file contents.