Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

feat: add kilo help --all to dump full CLI reference as markdown#570

Closed
Githubguy132010 wants to merge 4 commits intoKilo-Org:devfrom
Githubguy132010:feat/kilo-help-all-command
Closed

feat: add kilo help --all to dump full CLI reference as markdown#570
Githubguy132010 wants to merge 4 commits intoKilo-Org:devfrom
Githubguy132010:feat/kilo-help-all-command

Conversation

@Githubguy132010
Copy link
Contributor

@Githubguy132010 Githubguy132010 commented Feb 21, 2026

Context

Fixes #560 — adds a kilo help command that outputs the complete CLI reference as Markdown or plain text.

Useful for generating LLM context files, documentation, and quick offline reference. Inspired by Fossil SCM's fossil help --all.

Implementation

Added a new packages/opencode/src/cli/cmd/help.ts command with a static registry of all commands, subcommands, options, and descriptions. Key design choices:

  • Static registry — The command metadata is a plain data structure (no yargs introspection needed), making it fast, reliable, and easy to maintain as commands evolve.
  • Two formattersformatMarkdown (default) and formatText produce pipeable output via process.stdout.write.
  • Internal command markers — Commands like debug and generate are tagged internal: true and rendered with an [internal] callout.
  • Scoped helpkilo help <command> filters to a single top-level command and its full subcommand tree.
  • Registered as a yargs command — Works alongside yargs' built-in --help flag without conflict.

Supported usage:

kilo help --all                   # full reference, markdown (default)
kilo help --all --format text     # plain text
kilo help auth                    # scoped to auth + subcommands
kilo help --all > REFERENCE.md    # pipeable

Screenshots

N/A

How to Test

# Build/run from packages/opencode
bun run --conditions=browser src/index.ts help --all
bun run --conditions=browser src/index.ts help --all --format text
bun run --conditions=browser src/index.ts help auth
bun run --conditions=browser src/index.ts help --all > /tmp/REFERENCE.md && cat /tmp/REFERENCE.md

# Run tests
bun test test/kilocode/help.test.ts

Get in Touch

thomas07374

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Feb 21, 2026

Code Review Summary

Status: 3 Issues Found (from prior review) | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
packages/opencode/src/cli/cmd/help.ts 368 findCommand matching logic — the existing comment flags that the base kilo command can't be matched, but line 369 (if (parts.length === 1 && parts[0] === name)) actually handles this case correctly. The test at line 99-107 in help.test.ts confirms kilo help kilo works. This comment may be a false positive.
packages/opencode/src/cli/cmd/help.ts N/A --models type was originally documented as "number" but the actual stats.ts definition accepts both boolean and number. The author has since updated it to `"boolean

SUGGESTION

File Line Issue
packages/opencode/src/cli/cmd/help.ts 264 The existing comment suggested help and completion commands were missing from the registry. Looking at the current code, both kilo help [command] (line 192) and kilo completion (line 200) ARE present in the registry. This comment appears to have been addressed.
Other Observations (not in diff)
  • The command registry is a static duplicate of actual command definitions. If commands are added or modified elsewhere, this registry must be manually kept in sync. Consider adding a comment in the file noting this maintenance requirement.
  • The --models option in stats.ts (line 61-63) has no explicit type in its yargs definition, relying on yargs' inference to accept both --models (boolean) and --models 5 (number). The help registry's "boolean|number" is a reasonable documentation of this behavior.
Files Reviewed (3 files)
  • packages/opencode/src/cli/cmd/help.ts — New file: static help command with markdown/text formatters and command registry (432 lines)
  • packages/opencode/src/index.ts — Import and register HelpCommand (2 changed lines)
  • packages/opencode/test/kilocode/help.test.ts — New file: comprehensive tests for help command (118 lines, 10 test cases)

@markijbema
Copy link
Contributor

Hi! Thank you for taking the time to contribute to this project—we really appreciate it. 🙏

We are currently working on re-platforming the core of our VS Code and JetBrains extensions to be based on our new Kilo CLI, with a complete rebuild based on OpenCode as our new foundation, and the moment has come to promote this repository to become the main repository. To do that, we moved the code from this repository to the kilocode repository.

This unfortunately means we cannot merge this branch here anymore. Please add https://github.com/Kilo-Org/kilocode.git as a remote, and push your branch there and create a new PR in https://github.com/Kilo-Org/kilocode . We unfortunately cannot do this for you as then the PR would not be in your name anymore. If you need any help, feel free to ask on our Discord in #kilo-dev-contributors

Sorry for the inconvenience and thank you for contributing to Kilo!

@markijbema markijbema closed this Feb 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: add kilo help --all to dump full CLI reference as markdown

2 participants