mindmap-cli
A small CLI for inspecting and safely editing one-line MINDMAP files (default: ./MINDMAP.md).
One-node-per-line format: [N] **Title** - description with [N] references. IDs are stable numeric values.
Core usage examples:
# Print primer (e.g. when starting a new conversation with your coding agent)
# show a node
# list nodes (filter by type or grep)
# similar to list --grep
# add a node (auto picks next free ID)
# (interactive) add (opens $EDITOR and tries to store the saved data as a new node)
# (interactive) open node in $EDITOR for safe edit
# partial (scriptable) update: change title and/or description
# full-line replace (must keep same id)
# delete a node (use --force to remove even if referenced)
# BATCH non-interactive mutations:
# lint the file for syntax / ref issues
# list orphan nodes (no incoming and no outgoing references)
# Examples: piping JSON output and separating stderr (meta) from stdout (data)
# show node 12 as JSON and extract the node id
|
# show node 12 while capturing meta on stderr (Bash example)
For more details run mindmap-cli --help or mindmap-cli <subcommand> --help or see the DESIGN.md files in this repository.
Output formats
By default the CLI prints human-readable output. Use the global flag --output json to emit structured JSON to stdout for scripting. Informational messages, confirmations, and warnings are written to stderr so stdout remains machine-actionable when you pipe the output.
Example (pipe JSON to jq):
# show node 12 as JSON and extract the node id
|
# list nodes as JSON
|