You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today there is NO zero-drift machine-readable command reference in this repo. Every existing surface is hand-maintained: kbagent context (curated f-string in commands/context.py), CLAUDE.md "All CLI Commands", plugins/kbagent/skills/kbagent/references/commands-reference.md, and now the help-docs pages. Convention #17 already documents these as silent-drift risks — and the review of connection-docs#1015 found real drift in both directions (CLAUDE.md missing init --read-only / config delete; docs/error-codes.md 20 codes stale, fixed in #490).
The only source that cannot drift is the Typer app itself.
What
scripts/gen_command_reference.py:
Introspect the root Typer app (walk groups → subcommands → params) and emit command-reference.md: one section per group, per-command usage line, flags with help text, categorized by the existing rich_help_panel values.
Deterministic output (stable ordering) so diffs are reviewable.
Wire into the release workflow: attach command-reference.md as a GitHub Release asset next to the wheel, so consumers (help docs, plugin, third parties) can fetch it pinned to a released version instead of scraping --help.
keboola/connection-docs plans a scheduled action that pulls the asset from the latest release and opens an auto-PR into their cli/commands page (see the PR discussion). The hand-written narrative pages stay hand-written; only the fact layer gets generated.
Why
The new help-docs CLI section (keboola/connection-docs#1015) hand-copies the command reference, and @jordanrburger raised the canonical-source question there: keboola/connection-docs#1015 (comment)
Today there is NO zero-drift machine-readable command reference in this repo. Every existing surface is hand-maintained:
kbagent context(curated f-string incommands/context.py),CLAUDE.md"All CLI Commands",plugins/kbagent/skills/kbagent/references/commands-reference.md, and now the help-docs pages. Convention #17 already documents these as silent-drift risks — and the review of connection-docs#1015 found real drift in both directions (CLAUDE.md missinginit --read-only/config delete;docs/error-codes.md20 codes stale, fixed in #490).The only source that cannot drift is the Typer app itself.
What
scripts/gen_command_reference.py:command-reference.md: one section per group, per-command usage line, flags with help text, categorized by the existingrich_help_panelvalues.command-reference.mdas a GitHub Release asset next to the wheel, so consumers (help docs, plugin, third parties) can fetch it pinned to a released version instead of scraping--help.check_error_codes.pyafter docs: complete error-codes.md (46 -> 66 codes) + enforce enum-doc sync #490).Consumer
keboola/connection-docs plans a scheduled action that pulls the asset from the latest release and opens an auto-PR into their
cli/commandspage (see the PR discussion). The hand-written narrative pages stay hand-written; only the fact layer gets generated.