Skip to content

Conversation

@assagman
Copy link
Contributor

@assagman assagman commented Jan 8, 2026

Summary

Add describe property to debug command and all its subcommands so they appear in --help output.

Fixes: #7330
Supersedes: #1524 (stale since Aug 2025, missing newer subcommands)

Changes

  • Add help text to debug command and subcommands (config, lsp, file, skill, agent, ripgrep, scrap, snapshot)
  • Fix web command description (differentiate from serve)
  • Handle null message in yargs fail handler

Before

$ opencode --help | rg "debug"
opencode --help | rg "web"
opencode debug --help 2>&1 | rg "config|lsp|file|skill|agent|rg|scrap|snapshot|paths|wait"
opencode debug lsp --help 2>&1 | rg "diagnostics|symbols|document-symbols"
opencode debug file --help 2>&1 | rg "read|status"
opencode debug rg --help 2>&1 | rg "tree|files|search"
opencode debug snapshot --help 2>&1 | rg "track|patch|diff"

  opencode web                 starts a headless opencode server

After

$ bun run dev --help | rg "debug"
bun run dev --help | rg "web"
bun run dev debug --help 2>&1 | rg "config|lsp|file|skill|agent|rg|scrap|snapshot|paths|wait"
bun run dev debug lsp --help 2>&1 | rg "diagnostics|symbols|document-symbols"
bun run dev debug file --help 2>&1 | rg "read|status"
bun run dev debug rg --help 2>&1 | rg "tree|files|search"
bun run dev debug snapshot --help 2>&1 | rg "track|patch|diff"

  opencode debug               debugging and troubleshooting tools

  opencode web                 start opencode server and open web interface

  opencode debug config        show resolved configuration
  opencode debug lsp           LSP debugging utilities
  opencode debug rg            ripgrep debugging utilities
  opencode debug file          file system debugging utilities
  opencode debug scrap         list all known projects
  opencode debug skill         list all available skills
  opencode debug snapshot      snapshot debugging utilities
  opencode debug agent <name>  show agent configuration details
  opencode debug paths         show global paths (data, config, cache, state)
  opencode debug wait          wait indefinitely (for debugging)
  opencode debug lsp diagnostics <file>      get diagnostics for a file
  opencode debug lsp symbols <query>         search workspace symbols
  opencode debug lsp document-symbols <uri>  get symbols from a document
  opencode debug file read <path>     read file contents as JSON
  opencode debug file status          show file status information
  opencode debug rg tree              show file tree using ripgrep
  opencode debug rg files             list files using ripgrep
  opencode debug rg search <pattern>  search file contents using ripgrep
  opencode debug snapshot track         track current snapshot state
  opencode debug snapshot patch <hash>  show patch for a snapshot hash
  opencode debug snapshot diff <hash>   show diff for a snapshot hash

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

Signed-off-by: assagman <ahmetsercansagman@gmail.com>
Signed-off-by: assagman <ahmetsercansagman@gmail.com>
Signed-off-by: assagman <ahmetsercansagman@gmail.com>
Signed-off-by: assagman <ahmetsercansagman@gmail.com>
@assagman assagman force-pushed the fix/cli-debug-help-text branch from 1c5cd04 to 1378d47 Compare January 8, 2026 13:00
@rekram1-node rekram1-node merged commit adae0d1 into anomalyco:dev Jan 8, 2026
2 checks passed
thdxr pushed a commit that referenced this pull request Jan 8, 2026
Signed-off-by: assagman <ahmetsercansagman@gmail.com>
@assagman assagman deleted the fix/cli-debug-help-text branch January 8, 2026 19:01
aryasaatvik pushed a commit to aryasaatvik/opencode that referenced this pull request Jan 10, 2026
)

Signed-off-by: assagman <ahmetsercansagman@gmail.com>
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.

2 participants