{
"snapshot" => "Capture a heap snapshot to JSON",
"inspect" => "Inspect current process (embedded) or a saved capture",
"diff" => "Diff two snapshots (scorecard + table + report)",
"monitor" => "Sample the current process for a duration",
"watch" => "Monitor with anomaly alerts enabled (alias)",
"trends" => "Summarize a monitor/report timeline",
"report" => "Render a text/HTML/markdown/JSON report",
"compare" => "Compare a baseline to a current report",
"baseline" => "Create a baseline from a report",
"sessions" => "List saved .heapscope sessions",
"history" => "Show recent session reports",
"validate" => "Validate a report JSON schema",
"suggest" => "Suggest ignore_patterns from a report",
"ignore-suggest" => "Alias of suggest",
"pack" => "Export a local JSON+HTML+Markdown report bundle",
"export" => "Alias of pack",
"probe" => "Measure a Ruby file/snippet and print a scorecard",
"measure" => "CLI wrapper around HeapScope.measure",
"retention" => "CLI wrapper around HeapScope.retention_test",
"flamegraph" => "Export allocation sites as folded stacks or Speedscope JSON",
"findings" => "List/filter findings from a report",
"scorecard" => "Print scorecard only from a report",
"table" => "Print growth table from a report",
"explain" => "Print diagnostic encyclopedia entry for a code",
"open" => "Write HTML for a report and print the path",
"html" => "Alias of open",
"self-test" => "Run a built-in retention demo and show findings",
"env" => "Print HeapScope-relevant environment variables",
"completion" => "Generate bash/zsh/powershell completion scripts",
"man" => "Extended about + examples",
"codes" => "List diagnostic codes (HS001–HS010)",
"doctor" => "Diagnose runtime capabilities & config",
"overhead" => "Measure HeapScope snapshot overhead",
"config" => "Load a YAML/Ruby config file",
"about" => "Branding, docs, and funding links",
"capabilities" => "Show runtime capabilities",
"version" => "Print version",
"help" => "Show help (or help <command>)"
}.freeze
{
"snapshot" => <<~U,
"inspect" => <<~U,
"diff" => <<~U,
"monitor" => <<~U,
"watch" => <<~U,
"probe" => <<~U,
"measure" => <<~U,
"retention" => <<~U,
"flamegraph" => <<~U,
"findings" => <<~U,
"scorecard" => "Usage: heapscope scorecard REPORT.json [--json] [--title NAME]\n",
"table" => "Usage: heapscope table REPORT.json [--markdown] [--top N]\n",
"explain" => "Usage: heapscope explain CODE\n\nExample: heapscope explain HS001\n",
"open" => "Usage: heapscope open REPORT.json [-o out.html]\n",
"html" => "Usage: heapscope html REPORT.json [-o out.html]\n",
"self-test" => "Usage: heapscope self-test [--json] [-o report.json]\n\nRuns a built-in intentional retention demo (local only).\n",
"env" => "Usage: heapscope env [--json]\n",
"completion" => "Usage: heapscope completion bash|zsh|powershell\n",
"man" => "Usage: heapscope man\n\nExtended branding, privacy notes, and examples.\n",
"pack" => <<~U,
"export" => "Alias of pack. See: heapscope help pack\n",
"suggest" => <<~U,
"ignore-suggest" => "Alias of suggest. See: heapscope help suggest\n",
"report" => <<~U,
"baseline" => "Usage: heapscope baseline create REPORT.json -o baseline.json\n",
"compare" => <<~U,
"codes" => "Usage: heapscope codes\n",
"doctor" => <<~U,
Usage: heapscope doctor [options]
--json Machine-readable doctor payload
--fix Write starter heapscope.yml
--config-out PATH Path for --fix (default ./heapscope.yml)
--force Overwrite existing config with --fix
U
"overhead" => "Usage: heapscope overhead [--mode MODE] [--runs N] [--json]\n",
"config" => "Usage: heapscope config PATH\n",
"about" => "Usage: heapscope about [--json]\n",
"capabilities" => "Usage: heapscope capabilities [--json]\n",
"sessions" => "Usage: heapscope sessions\n",
"history" => "Usage: heapscope history [--limit N]\n",
"validate" => "Usage: heapscope validate REPORT.json\n",
"trends" => "Usage: heapscope trends REPORT.json\n",
"version" => "Usage: heapscope version\n",
"help" => "Usage: heapscope help [command]\n"
}.freeze