fix(cli): make the documented invocation the real one; regenerate CLI reference; release 0.6.0 - #238
Merged
Merged
Conversation
Every command was attached to a redundant second `manifest` group, so the real invocation was `manifest manifest verify signed.json` while the README, the docs site, the PyPI description, and this module's own docstring all printed `manifest verify signed.json`. Anyone following the published quickstart hit `Error: No such command 'keygen'` on the first step. tests/test_cli.py invoked the nested form, which is why CI stayed green over a CLI nobody could drive as documented. Attach the commands to the top-level group. The nested spelling still resolves, is hidden from --help, and prints a deprecation warning; it goes away in 1.0. Also makes help output readable: \b markers stop click rewrapping the example blocks onto one line, and -o/--output, --enforce-hitl and --enforce-attestation carry help text instead of appearing bare. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The hand-written reference had drifted into fiction. It documented `manifest keygen --out/--print-pub`, `manifest verify --revocation-url/--min-slsa-level`, `manifest create --agent-id/--issuer/--model/--ttl-hours` and `manifest revoke --crl-file/--key-file`, none of which exist, while omitting the options that do. Render the page from click's own help text, following the same committed-generated-file pattern as tests/vectors. test_cli_reference.py regenerates it in memory and fails if the committed copy drifts, so a change to a command cannot land with stale docs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
key-rotation.md used `manifest keygen --out ... --print-pub`, neither flag of which exists. index.md and python/README.md printed `manifest verify` without --public-key next to a `# VALID` comment, but with no trusted key the verifier fails closed as UNVERIFIABLE and exits 1. Every CLI invocation in the docs has now been executed against a clean install of the 0.6.0 wheel. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
imran-siddique
force-pushed
the
fix/cli-flat-commands
branch
from
July 27, 2026 00:24
1e7072b to
2ce5d29
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #237. Merge that one first; this branch contains its two commits and the diff collapses once it lands.
The bug
Every CLI command was attached to a redundant second
manifestgroup. The real invocation was:while the README, the docs site, the PyPI long description, and
cli.py's own module docstring all printed:Anyone following the published quickstart hit
Error: No such command 'keygen'on step one.tests/test_cli.pyinvoked the nested form, which is why CI stayed green over a CLI nobody could drive as documented.What changed
Commands are top level, as documented. The nested spelling still resolves, is hidden from
--help, and prints a deprecation warning (removal in 1.0), so any script written against 0.5.0 keeps working.test_documented_commands_are_top_levelandtest_deprecated_nested_invocation_still_workspin both halves.The CLI reference is generated, not written.
docs/api-reference/cli.mdhad drifted into fiction: it documentedkeygen --out/--print-pub,verify --revocation-url/--min-slsa-level,create --agent-id/--issuer/--model/--ttl-hours, andrevoke --crl-file/--key-file, none of which exist, while omitting the options that do. It now renders from click's own help viascripts/gen_cli_reference.py, following the same committed-generated-file pattern astests/vectors.test_cli_reference.pyfails if the committed page drifts from the code.Help output is readable.
\bmarkers stop click rewrapping the example blocks onto a single line, and-o/--output,--enforce-hitl,--enforce-attestationhave help text instead of appearing bare.Two more examples that could not have worked.
docs/operations/key-rotation.mdused the non-existentmanifest keygen --out ... --print-pub.docs/index.mdandpython/README.mdprintedmanifest verifywithout--public-keynext to a# VALIDcomment, but with no trusted key the verifier fails closed asUNVERIFIABLEand exits 1.Release
Version bumped to 0.6.0. Minor rather than patch: the crypto-profile check from #237 can turn a previously
VALIDmanifest intoMISMATCH(a post-quantum profile carrying a classical-only signature), and the command surface moved.Publishing is tag-driven (
python-v*-> OIDC trusted publish), so after merge:git tag python-v0.6.0 && git push origin python-v0.6.0.Verification
Not argued from reading the code. The documented quickstart was run verbatim against a clean venv with the built 0.6.0 wheel installed from
dist/:manifest revoke,manifest attest, andmanifest keygen -d keys/new/were run the same way.pytest: 617 passed, 18 skipped; coverage 84.55% (gate 80%)mypy src/agent_manifest: clean, 20 filesruff check src/ tests/ --select E,F,W --ignore E501: cleanbandit: 0 findingspython -m build+twine check dist/*: both artifacts PASSED