Skip to content

feat(cli): add clidoc OpenCLI docgen and CI validation - #58

Merged
bhouston merged 2 commits into
mainfrom
feat/clidoc-docgen
Sep 25, 2026
Merged

bhouston merged 2 commits into
mainfrom
feat/clidoc-docgen

Conversation

@bhouston

Copy link
Copy Markdown
Owner

Summary

  • Add a docgen command to hdrify (JSON default, --format markdown/yaml) and the hidden __opencli discovery subcommand, both built from @clidoc/core and @clidoc/yargs, deriving the OpenCLI document from the real yargs command tree (convert, info, reference) rather than hand-maintained metadata.
  • Add a CI step that generates the spec (packages/cli/opencli.json, gitignored) and validates it with bhouston/clidoc-action@v1, so a spec-breaking change to the CLI fails the build.

Closes #57

Test plan

  • hdrify docgen --output cli.json and hdrify __opencli produce identical, valid OpenCLI documents (checked with clidoc validate)
  • pnpm build
  • pnpm tsc
  • pnpm lint
  • pnpm test --coverage (floors met: 89.22/72.29/93.92/89.78 stmts/branches/fns/lines)
  • pnpm release:check
  • pnpm size
  • pnpm audit --audit-level=high (124 findings, identical to main; pre-existing)
  • Existing hdrify convert/info/reference/--help behavior unchanged

Add a `docgen` command (JSON/YAML/Markdown) and the hidden `__opencli`
discovery subcommand to the hdrify CLI using @clidoc/core and
@clidoc/yargs, derived from the existing yargs command tree. CI now
generates the spec and validates it with bhouston/clidoc-action.

Closes #57
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@bhouston
bhouston merged commit f16a249 into main Sep 25, 2026
2 checks passed
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.

feat: generate OpenCLI docs for hdrify CLI with clidoc

2 participants