diff --git a/plugins/json-pretty/commands/format.md b/plugins/json-pretty/commands/format.md index 89a5f9f..193b558 100644 --- a/plugins/json-pretty/commands/format.md +++ b/plugins/json-pretty/commands/format.md @@ -17,25 +17,23 @@ Use when the user asks to: `${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py` -Also symlinked to `~/.local/bin/json-pretty` for PATH access. - ## Usage ```bash # From file -json-pretty input.json +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py input.json # From stdin/pipe -cat data.json | json-pretty -echo '{"foo":"bar"}' | json-pretty +cat data.json | python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py +echo '{"foo":"bar"}' | python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py # Save to file -json-pretty input.json -o output.json +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py input.json -o output.json # Options -json-pretty input.json --indent 4 # Custom indentation -json-pretty input.json --sort-keys # Sort object keys -json-pretty input.json --compact # Minify instead of prettify +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py input.json --indent 4 # Custom indentation +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py input.json --sort-keys # Sort object keys +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py input.json --compact # Minify instead of prettify ``` ## Options @@ -49,17 +47,17 @@ json-pretty input.json --compact # Minify instead of prettify **Prettify inline JSON:** ```bash -echo '{"name":"cal","items":[1,2,3]}' | json-pretty +echo '{"name":"cal","items":[1,2,3]}' | python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py ``` **Format a file:** ```bash -json-pretty messy.json -o clean.json +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py messy.json -o clean.json ``` **Sort keys and use 4-space indent:** ```bash -json-pretty data.json --indent 4 --sort-keys +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py data.json --indent 4 --sort-keys ``` ## Privacy Note