MCPcopy Index your code
hub / github.com/docker/docker-agent / newAliasCmd

Function newAliasCmd

cmd/root/alias.go:21–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19)
20
21func newAliasCmd() *cobra.Command {
22 cmd := &cobra.Command{
23 Use: "alias",
24 Short: "Manage aliases",
25 Long: "Create and manage aliases for agent configurations or catalog references.",
26 Example: ` # Create an alias for a catalog agent
27 docker-agent alias add code agentcatalog/notion-expert
28
29 # Create an alias for a local agent file
30 docker-agent alias add myagent ~/myagent.yaml
31
32 # List all registered aliases
33 docker-agent alias list
34
35 # List all registered aliases as JSON
36 docker-agent alias list --json
37
38 # Remove an alias
39 docker-agent alias remove code`,
40 GroupID: "advanced",
41 }
42
43 cmd.AddCommand(newAliasAddCmd())
44 cmd.AddCommand(newAliasListCmd())
45 cmd.AddCommand(newAliasRemoveCmd())
46
47 return cmd
48}
49
50type aliasAddFlags struct {
51 yolo bool

Callers 1

NewRootCmdFunction · 0.85

Calls 3

newAliasAddCmdFunction · 0.85
newAliasListCmdFunction · 0.85
newAliasRemoveCmdFunction · 0.85

Tested by

no test coverage detected