Skip to content

CLI Tree

chataction --tree uses the shared ChatStyle runtime to print the real Click command tree for the installed version, including command parameter signatures by default. chataction --tree-brief omits parameter signatures while preserving command nodes and descriptions. These trees are not handwritten README examples; new commands should update the runtime tree, tests, and documentation together.

chataction
├── --help  # Show this message and exit.
├── --version  # Show the version and exit.
├── --tree  # Print the registered CLI tree and exit.
└── --tree-brief  # Print the registered CLI tree without parameter signatures and exit.

No parameterized business subcommands are registered yet, so the detailed and brief trees currently show the same top-level option nodes above. Once a parameterized command is added, the detailed tree shows its argument/option signatures and the brief tree does not.

Status

Node Status Notes
--help Implemented Generated by Click.
--version Implemented Reads chataction.__version__.
--tree Implemented Rendered from the registered tree by ChatStyle add_tree_option(), with parameter signatures by default.
--tree-brief Implemented Omits parameter signatures while retaining command nodes and descriptions.
hello Absent Template demo commands are not part of the real package interface.
Business action subcommands Not implemented Future real actions need a reusable Python API plus CLI tests.

Update Rules

  • Add reusable Python APIs before visible CLI adapters.
  • Keep ChatStyle add_tree_option() on the top-level Click group and keep the public root name chataction.
  • Keep --tree and --tree-brief generated from the real registered tree rather than copying static examples.
  • Tests should cover --help, --version, both tree modes, and representative leaf/group commands.
  • README, MkDocs, CHANGELOG, and release metadata must stay aligned with the command tree.