ctx/internal/cli/plugins.go
Ricardo Carneiro 69cadb4ea6 chore: initial scaffold with plugin system and placeholders
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 13:43:10 -03:00

16 lines
391 B
Go

package cli
import (
"github.com/ricarneiro/ctx/internal/core"
"github.com/spf13/cobra"
)
// registerPluginCommands iterates the core registry and adds each plugin's
// root command as a subcommand of rootCmd. Called once from Execute().
func registerPluginCommands(rootCmd *cobra.Command) {
ctx := newContext()
for _, p := range core.All() {
rootCmd.AddCommand(p.Command(ctx))
}
}