cli: plugin list shows - for ID of TUI-only plugins configured in cli.json

Offen Anfängerfreundlich
#64,175 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@yash-alla arbeitet bereits daran.

Seit 16.11.2026.

  • #64287 von @yash-alla — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
72/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
cli

Rechercherichtung

Verfolge, wie opencode plugin list die ID-Spalte erstellt und Plugin-Daten liest, und beginne dabei mit dem CLI-Befehl und seinen Tests. Vergleiche die serverseitigen Registrierungsdaten mit dem Paketnamen, der bereits in SOURCE angezeigt wird, und ergänze dann einen sinnvollen Fallback für Plugins, die nur in der TUI konfiguriert sind. Die Aufgabe ist abgeschlossen, wenn die ID-Spalte für ein Plugin, das nur in cli.json konfiguriert ist, einen aussagekräftigen Wert anzeigt und die relevanten Tests bestehen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area/cli platform/windows type/feature version/v2

Summary

opencode plugin list shows - in the ID column for TUI-only plugins (packages exporting only ./tui, configured in cli.json), even though the plugin loads and works correctly. The ID column should fall back to something useful — ideally the package name — when the plugin has no server-side registry entry.

Environment

  • opencode version: 2.3.0
  • OS: reproduced on Windows 11, but this is platform-independent CLI output
  • Active plugins: a TUI-only package (exports only ./tui) configured in cli.json, alongside server+TUI packages configured in opencode.json

Reproduction

  1. Publish (or link) a plugin package that exports only a TUI part and declares a TUI id:

    "exports": { "./tui": "./dist/tui.js" }
    
    export default Plugin.define({ id: "usage.quota", setup(ctx) { /* ... */ } })
    
  2. Configure it in ~/.config/opencode/cli.json (the documented location for TUI-only packages):

    { "plugins": ["your-tui-only-plugin"] }
    
  3. Run opencode plugin list, with at least one server+TUI plugin configured in opencode.json for comparison.

Expected Behavior

The ID column should display something useful for TUI-only plugins. Two reasonable fallbacks, in order of preference:

  1. The package name — it is already available and displayed in the SOURCE column, so the data needs no new plumbing.
  2. The TUI part's declared id (e.g. usage.quota) when there is no server-side entry.

Actual Behavior

The ID column shows - for the TUI-only plugin, while server+TUI plugins configured in opencode.json show their IDs:

ID                       VERSION  SOURCE
-                        0.2.2    opencode-coding-quota
<server-plugin-a>        1.0.0    <server-plugin-a>
<server-plugin-b>        1.0.0    <server-plugin-b>

Additional Context

  • The plugin itself works fine (loads in the TUI, renders its UI). This is purely a display issue in plugin list, but it is confusing for plugin authors: it looks like the package is broken or not detected.
  • Verified against the running service via GET /api/plugin: the TUI-only plugin is absent from the server-side registry because it is loaded directly by the TUI from cli.json — by design, per the docs, so it remains active against remote servers. The plugin list ID column appears to read only that server-side registry, hence the -.
  • Reproduced consistently on every invocation.
  • Real-world npm package that triggers this: opencode-coding-quota.
  • No workaround short of adding an empty server part to the package and moving it to opencode.json — which sacrifices the documented remote-server benefit of cli.json for TUI-only packages.
Vorherrschende Sprache
TypeScript
Sterne
227k
Forks
30.7k
Ø Merge
4 Std. 35 Min.
Gemergte PRs (30 T.)
498

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus anomalyco/opencode

Alle Issues in anomalyco/opencode

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.