feat: schema-first CLI documentation system #1357
Draft
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.
Summary
agents-cli/src/schemas/defining all CLI commands with metadata (options, arguments, examples, descriptions)CLIReferenceReact component that imports schemas directly and renders documentationprecomponent for proper bash syntax highlighting in code examplesMotivation
CLI documentation at
agents-docs/content/docs/typescript-sdk/cli-reference.mdxwas maintained separately from actual CLI definitions, leading to documentation drift. This change ensures docs are always in sync with the CLI implementation.Changes
New files
agents-cli/src/schemas/types.ts- Type definitions for command metadataagents-cli/src/schemas/commander-builder.ts- Utilities to build Commander.js commands from schemasagents-cli/src/schemas/commands/*.schema.ts- Individual command schemas (13 files)agents-docs/src/components/cli-reference.tsx- React component that renders CLI docs from schemasModified files
agents-cli/src/index.ts- Updated to use schema-based command registrationagents-cli/tsdown.config.ts- Added schema exports for docs consumptionagents-docs/content/docs/typescript-sdk/cli-reference.mdx- Simplified to use the new componentTest plan
inkeep --help/typescript-sdk/cli-reference🤖 Generated with Claude Code