WORK-163
ID:WORK-163Status:draft

refrakt --help lists installed plugins + new refrakt plugins list command

Surface the installed plugin set in two places: the top-level refrakt --help output (so users discover available namespaces without reading docs) and a dedicated refrakt plugins list command (canonical machine-readable output for tooling, including MCP clients debugging their setup).

Priority:mediumComplexity:simpleMilestone:v0.11.0Source:SPEC-043

Criteria completion

Criteria completion: 0 of 6 (0%) checked; tracking started on May 1, no incremental history yet0%25%50%75%100%May 1May 11

Tracking started May 1 — check back for trends.

Branches 2
History 2
  1. ce8fb3c
    Created (draft)by bjornolofandersson
  2. 2b1f874
    Content editedby Claude
    plan(v0.11.0): scaffold milestone and 17 work items

Acceptance Criteria

  • refrakt --help includes an "Installed plugins:" section that lists each <namespace> with the package it came from and a one-line description (the package's cli-plugin namespace description, or the package name if none)
  • When no plugins are installed, the section is omitted (not shown empty)
  • New command refrakt plugins list (handled in packages/cli/src/commands/plugins.ts) prints a human-readable table with namespace, package name, version, command count, and command names
  • refrakt plugins list --format json emits a JSON array matching the DiscoveredPlugin[] shape from discoverPlugins()
  • refrakt plugins --help documents the list subcommand (and leaves room for future subcommands like info)
  • Tests cover: text and JSON output for both populated and empty plugin sets

Approach

  1. Add packages/cli/src/commands/plugins.ts with a runPlugins(args) handler that dispatches list (default subcommand) and emits text or JSON.

  2. Wire plugins into packages/cli/src/bin.ts as a top-level command alongside inspect, contracts, etc.

  3. Update printUsage() in bin.ts to call discoverPlugins() and append the plugin section. Keep the help output cached so it doesn't re-scan on every --help.

Dependencies

  • WORK-160 — needs discoverPlugins()

References

  • SPEC-043 — Refrakt MCP Server (Example: refrakt plugins list)
  • packages/cli/src/bin.tsprintUsage to extend