Skip to content

Commit 6428a89

Browse files
intel352claude
andcommitted
feat(wfctl): add plugin registry install/search/list/update/remove commands
Adds wfctl plugin management subcommands backed by the GoCodeAlone/workflow-registry: - `plugin search [query]` — lists registry plugins, filters by name/description/keyword - `plugin install <name>[@ver]` — fetches manifest, downloads OS/arch tarball, verifies SHA256 checksum (when present), extracts to data/plugins/<name>/, writes plugin.json - `plugin list` — scans data/plugins/ and prints installed plugins + versions - `plugin update <name>` — re-installs latest version from registry - `plugin remove <name>` — deletes installed plugin directory New files: - cmd/wfctl/registry.go: RegistryManifest struct, FetchManifest, ListPluginNames, SearchPlugins, FindDownload — registry client using net/http + stdlib only - cmd/wfctl/plugin_install.go: install flow (gzip+tar extraction with zip-slip guard, SHA256 verification), local plugin list/remove helpers - cmd/wfctl/registry_test.go: unit tests for manifest parsing, OS/arch matching, checksum verification, path traversal guard, list/remove commands Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e7a7c43 commit 6428a89

File tree

4 files changed

+850
-3
lines changed

4 files changed

+850
-3
lines changed

cmd/wfctl/plugin.go

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ func runPlugin(args []string) error {
1919
return runPluginDocs(args[1:])
2020
case "test":
2121
return runPluginTest(args[1:])
22+
case "search":
23+
return runPluginSearch(args[1:])
24+
case "install":
25+
return runPluginInstall(args[1:])
26+
case "list":
27+
return runPluginList(args[1:])
28+
case "update":
29+
return runPluginUpdate(args[1:])
30+
case "remove":
31+
return runPluginRemove(args[1:])
2232
default:
2333
return pluginUsage()
2434
}
@@ -28,9 +38,14 @@ func pluginUsage() error {
2838
fmt.Fprintf(flag.CommandLine.Output(), `Usage: wfctl plugin <subcommand> [options]
2939
3040
Subcommands:
31-
init Scaffold a new plugin project
32-
docs Generate documentation for an existing plugin
33-
test Run a plugin through its full lifecycle in a test harness
41+
init Scaffold a new plugin project
42+
docs Generate documentation for an existing plugin
43+
test Run a plugin through its full lifecycle in a test harness
44+
search Search the plugin registry
45+
install Install a plugin from the registry
46+
list List installed plugins
47+
update Update an installed plugin to its latest version
48+
remove Uninstall a plugin
3449
`)
3550
return fmt.Errorf("plugin subcommand is required")
3651
}

0 commit comments

Comments
 (0)