Skip to content

feat(star): add builtin command to show the command tree #341

Open

Description

@David-Noble-at-work

Migrated from NobleFactor/noblefactor-engprod#71 (star now lives in this repository; GitHub blocks private→public transfers). Original discussion remains there.

Summary

Add a builtin star tree (or star commands) command that prints the full command tree — both hardcoded builtins and dynamically discovered extension commands.

Motivation

  • No way to see the full command tree at a glance today
  • Useful for shell completions (machine-readable output of all commands + flags)
  • Useful for documentation generation
  • Extensions are discovered dynamically, so the tree isn't knowable without running discovery

Requirements

  • Builtin (not an extension) — must work even if no extensions are installed
  • Shows hierarchical tree of all commands (builtins + extensions)
  • Should support a --json or --completion flag for machine-readable output
  • Could feed into star completion for dynamic completions

Notes

Extension commands are registered dynamically from extension.yaml files discovered at runtime. The tree command needs to run after runtime.LoadAll() to capture them all.

Activity

  1. David-Noble-at-work commented on Sep 5, 2026

    @David-Noble-at-work
    ContributorAuthor

    A shape for this under the tree grammar noblefactor-ops#161 wrote into star-extensions.md (star <service> <resource> <verb>; star's own commands elide the service): star docs commands — the tree is documentation of the surface, and docs is where star's own documentation lives.

    Rows as the result — {path, kind: builtin|extension, extension, owner, help} — so -o table, -o json, -o csv come from the pipeline for the completions and doc-generation uses named above; --view tree renders the indented tree for a person. Sectioning by service (devlore, gh, session, and star's own) falls out of the first path token.

    Two things it would have caught this week: that report epics broke the grammar before anyone typed it, and that session had one verb.

  2. David-Noble-at-work commented on Sep 5, 2026

    @David-Noble-at-work
    ContributorAuthor

    Ruled 2026-09-05: the tree pages like git diff — TTY-only, less -FRX, $PAGER honoured, --no-pager. That is a root concern, not this command's: #830 puts it in the shared pipeline so docs starlark, the report and this all get it without knowing.

  3. David-Noble-at-work commented on Nov 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    star github triage sweep added this issue to Triage: devlore, for the rule it breaks:

    • no-evidence: no Evidence of completion section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions