Split CLI command stubs into separate files
Move each command function from main.go into its own file (deploy.go, lifecycle.go, status.go, etc.) to enable parallel development by multiple workers without file conflicts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
45
cmd/mcp/service.go
Normal file
45
cmd/mcp/service.go
Normal file
@@ -0,0 +1,45 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func serviceCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "service",
|
||||
Short: "Service definition management",
|
||||
}
|
||||
|
||||
show := &cobra.Command{
|
||||
Use: "show <service>",
|
||||
Short: "Print current spec from agent registry",
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return fmt.Errorf("not implemented")
|
||||
},
|
||||
}
|
||||
|
||||
edit := &cobra.Command{
|
||||
Use: "edit <service>",
|
||||
Short: "Open service definition in $EDITOR",
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return fmt.Errorf("not implemented")
|
||||
},
|
||||
}
|
||||
|
||||
export := &cobra.Command{
|
||||
Use: "export <service>",
|
||||
Short: "Write agent registry spec to local service file",
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return fmt.Errorf("not implemented")
|
||||
},
|
||||
}
|
||||
export.Flags().StringP("file", "f", "", "output file path")
|
||||
|
||||
cmd.AddCommand(show, edit, export)
|
||||
return cmd
|
||||
}
|
||||
Reference in New Issue
Block a user