feat: add kilo help --all command and auto-generated CLI reference docs#6116
Open
maphew wants to merge 13 commits intoKilo-Org:mainfrom
Open
feat: add kilo help --all command and auto-generated CLI reference docs#6116maphew wants to merge 13 commits intoKilo-Org:mainfrom
maphew wants to merge 13 commits intoKilo-Org:mainfrom
Conversation
…or text Add a 'kilo help' command that outputs the full CLI reference as Markdown or plain text, with support for scoping to a single command. - Extract command registrations into src/cli/commands.ts barrel - Implement generateHelp() in src/kilocode/help.ts using yargs internals - Add HelpCommand with --all, --format, and [command] positional - 8 tests covering markdown/text output, scoping, ANSI stripping, errors
Add generateCommandTable() to help.ts and a generation script that produces two artifacts: a Markdoc partial for the command table and a full CLI reference page. Both are generated by script/generate.ts and auto-committed by the generate.yml workflow on push to dev. Replace hand-written command table in cli.md with the generated partial and add a nav entry for the new CLI Command Reference page. Closes Kilo-Org#572
…add AttachStub - Add missing await on .rejects.toThrow() assertion (false-positive risk) - Gate generateHelp on options.all so callers get empty output when neither all nor command is set - Sanitize process.cwd() paths in generated CLI reference (was leaking developer's local path into published docs) - Add AttachCommand stub to test commands array for full coverage
|
Contributor
Code Review SummaryStatus: 10 Issues Found | Recommendation: Address before merge Fix these issues in Kilo Cloud Overview
Issue Details (click to expand)CRITICAL
WARNING
SUGGESTION
Other Observations (not in diff)
Files Reviewed (14 files)
|
…, remove marker Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019c868e-3120-7158-a07f-dadb49eff19d
…kspaceServeCommand Amp-Thread-ID: https://ampcode.com/threads/T-019ca02f-4446-772c-bc1a-c2176fcb4047 Co-authored-by: Amp <amp@ampcode.com>
…path Amp-Thread-ID: https://ampcode.com/threads/T-019ca02f-4446-772c-bc1a-c2176fcb4047 Co-authored-by: Amp <amp@ampcode.com>
- Restore JSON→SQLite migration code accidentally removed from middleware - Replace console.warn with Log.Default.warn in help.ts - Fix Windows path: use path.resolve(import.meta.dir) instead of new URL().pathname - Revert unrelated process.stderr.write→console.error change - Require --all flag explicitly; kilo help with no args shows usage hint Amp-Thread-ID: https://ampcode.com/threads/T-019ca5c0-c077-76ab-9e52-4a2a7e8ed1a7 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ca5c0-c077-76ab-9e52-4a2a7e8ed1a7 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ca5c0-c077-76ab-9e52-4a2a7e8ed1a7 Co-authored-by: Amp <amp@ampcode.com>
Contributor
Author
Bot Review Scorecard — All Issues Addressed
CI status: typecheck ✅ · unit (linux/windows) ✅ · docs build ✅ · link-checker ✅ · e2e ❌ flaky (unrelated \projects-switch.spec.ts) |
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.
Closes #6114
Summary
kilo help --allcommand that outputs full CLI reference in markdown or plain text formatgenerateCommandTable()function that produces a markdown command table from the command barrelscript/generate.ts: a Markdoc partial for the command table and a full CLI Command Reference pagecli.mdwith the generated partialCredit
The quick-reference table format was inspired by @Githubguy132010's contribution in #6294 — thanks for the idea!
Changes
kilo helpcommandsrc/kilocode/help.ts— CoregenerateHelp()+ newgenerateCommandTable()functionssrc/kilocode/help-command.ts—HelpCommandyargs CommandModulesrc/cli/commands.ts— Barrel file exporting all CommandModule objectssrc/index.ts— Replaced 19 individual.command()calls with barrel import + loopAuto-generated docs
script/generate-cli-docs.ts— Generation script (runs with--conditions=browser)src/kilocode/generate-cli-docs.ts— Entrypoint that writes both generated filesscript/generate.ts— Added CLI docs generation step before formatpackages/kilo-docs/markdoc/partials/cli-commands-table.md— Generated command table partialpackages/kilo-docs/pages/code-with-ai/platforms/cli-reference.md— Generated full reference pageDocs site updates
packages/kilo-docs/pages/code-with-ai/platforms/cli.md— Replaced hand-written table with{% partial %}packages/kilo-docs/lib/nav/code-with-ai.ts— Added "Command Reference" subLink under CLIUsage
Testing
test/kilocode/help.test.ts(no mocks) — markdown/text output, subcommands, filtering, ANSI stripping, table generation, edge casesbun turbo typecheck)cli-referencepage