Replace leaanthony/clir with spf13/cobra across all command packages. This provides better subcommand handling, built-in shell completion, and a more widely-used CLI framework. Changes: - Update cmd/core.go with cobra root command and completion support - Convert all subcommand packages to use *cobra.Command - Use init() functions for flag registration instead of inline setup - Maintain all existing functionality and flag behaviors Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
21 lines
472 B
Go
21 lines
472 B
Go
package dev
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// addAPICommands adds the 'api' command and its subcommands to the given parent command.
|
|
func addAPICommands(parent *cobra.Command) {
|
|
// Create the 'api' command
|
|
apiCmd := &cobra.Command{
|
|
Use: "api",
|
|
Short: "Tools for managing service APIs",
|
|
}
|
|
parent.AddCommand(apiCmd)
|
|
|
|
// Add the 'sync' command to 'api'
|
|
addSyncCommand(apiCmd)
|
|
|
|
// TODO: Add the 'test-gen' command to 'api'
|
|
// addTestGenCommand(apiCmd)
|
|
}
|