Skip to content

CLI: 20 options and arguments show no description in --help #643

Closed

Description

@LoopGlitch26

tracekit <command> --help describes most options in one line. Twenty options and arguments in tracekit/cli.py have no help=, so --help lists them with nothing after the name. For example, tracekit export --help shows:

  -o OUT, --out OUT
  --last                the most recent run (default)
  --run RUN

What's wrong: these have no description (line numbers at 098d0e4):

Command Options and arguments Lines
init --proxy-port L328
uninstall --project, --agent L369-L372
daemon --home L433
proxy --home, --port, --upstream L435-L438
approvals show, approve, reject approval_id, and --reason for approve and reject L489, L494-L495
approvals slack slack_action L501
grant revoke --reason (added by #642, after this issue was written) L519
export -o/--out, --run L522-L525
verify bundle, --json L555, L568
policy action, file L573-L574

init --no-hooks had the same problem; it gets its line in the upkeep PR for #464, so leave it out.

What done looks like:

  • Each one in the table has a one-line help= that says what it does, in the style of its neighbours (--last's "the most recent run (default)", --since's "RFC3339 time, e.g. ..."). Read the code that uses each one before you word it. For example, export --out defaults to tracekit.tkb, and verify --json prints the report as JSON.
  • Only help= text changes. No option is renamed, added or removed, and no behaviour changes.
  • A test fails if any option or argument of tracekit's parser has no help. One way: patch argparse.ArgumentParser.parse_args to keep self and raise SystemExit, call cli.main(["status"]), then walk parser._actions, following each argparse._SubParsersAction's choices. Skip --help, --version and nargs=argparse.REMAINDER arguments (those commands parse their own options). With main's code the walk finds the 20 in the table.

Where to start:

  • tracekit/cli.py, the lines in the table
  • Tests: a new class in tests/test_cli_help.py, or next to the other cli.main([... "--help"]) tests (see HarnessList in tests/test_agent_hooks.py)

How to run the tests: make test takes about 10 minutes, so while you work, run only your file:

python -m pytest -q tests/test_cli_help.py

and look at the result the way a user would: python -m tracekit export --help.

Done when: every option and argument in the table has a description, the test passes (and fails on main), and CI passes on your PR.

Comment here to claim it. Commits need a DCO sign-off (git commit -s).

Activity

  1. changed the title [-]CLI: 19 options and arguments show no description in `--help`[/-] [+]CLI: 20 options and arguments show no description in `--help`[/+] on Nov 7, 2026
  2. LoopGlitch26 commented on Nov 7, 2026

    @LoopGlitch26
    MemberAuthor

    @jay23606 Corrected: main now has 20 options and arguments with no help, not 19. #642 added grant revoke --reason (cli.py L519) after this issue was written, so a test that walks the parser finds it too. The table's line links now point at 098d0e4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions