Skip to content

Clearer --help output - #9

Merged
bk1202 merged 1 commit into
mainfrom
feature/cli-help
Oct 16, 2026
Merged

bk1202 merged 1 commit into
mainfrom
feature/cli-help

Conversation

@bk1202

@bk1202 bk1202 commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

proofcli --help used to describe only run, and validate --help and init --help repeated that same sentence. Top-level help now lists every command with its own one-line description, and each command's help describes that command. proofcli SPEC still runs a spec. Exit codes, flags, and the JSON report are unchanged.

Before

proofcli --help, proofcli validate --help, and proofcli init --help all started from the same description: "Run an argv command and verify its explicit output contract."

usage: proofcli [-h] [--version] [--json] [--report REPORT]
                [--artifacts ARTIFACTS]
                spec

Run an argv command and verify its explicit output contract.

positional arguments:
  spec                  path to a version 1 JSON spec

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --json                emit a single JSON report
  --report REPORT       save the complete JSON report to this path
  --artifacts ARTIFACTS
                        copy generated output into a new directory

Commands: run SPEC, validate SPEC, init PATH. The original proofcli SPEC form also works.
Example: proofcli run contract.json --report verification.json --artifacts evidence
Exit: 0 passed, 1 failed/deadline, 2 invalid/I/O, 130 interrupted, 143 SIGTERM.
Commands/specs must be trusted. See README for limits and assertion semantics.

proofcli validate --help kept that description and this usage:

usage: proofcli validate [-h] [--version] [--json] spec

proofcli init --help kept it as well:

usage: proofcli init [-h] [--version] [--json] [--force] path

After

proofcli --help:

usage: proofcli [-h] [--version] [--json] {run,validate,init} ...
       proofcli [-h] [--version] [--json] [--report REPORT] [--artifacts ARTIFACTS] SPEC

Verify command output contracts instead of trusting exit code zero.

options:
  -h, --help           show this help message and exit
  --version            show program's version number and exit
  --json               emit a single JSON report

commands:
  {run,validate,init}
    run                Run an argv command and verify its output contract.
    validate           Check a spec's schema without executing its command.
    init               Write a starter spec without executing it.

Commands: run SPEC, validate SPEC, init PATH. The original proofcli SPEC form also works.
Example: proofcli run contract.json --report verification.json --artifacts evidence
Exit: 0 passed, 1 failed/deadline, 2 invalid/I/O, 130 interrupted, 143 SIGTERM.
Commands/specs must be trusted. See README for limits and assertion semantics.

proofcli run --help describes run and keeps the run usage:

usage: proofcli run [-h] [--version] [--json] [--report REPORT]
                    [--artifacts ARTIFACTS]
                    spec

Run an argv command and verify its output contract.

proofcli validate --help:

usage: proofcli validate [-h] [--version] [--json] spec

Check a spec's schema without executing its command.

proofcli init --help:

usage: proofcli init [-h] [--version] [--json] [--force] path

Write a starter spec without executing it.

The second line of proofcli --help is the existing proofcli SPEC form, with the same --report and --artifacts options as run.

proofcli --help lists run, validate, and init with a one-line description
each. Subcommand help no longer shares the run description. The proofcli
SPEC shorthand, exit codes, and report output stay the same.
@bk1202
bk1202 marked this pull request as ready for review October 16, 2026 14:15
@bk1202
bk1202 merged commit 8816ca1 into main Oct 16, 2026
26 checks passed
@bk1202
bk1202 deleted the feature/cli-help branch October 16, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant