()
| 55 | } |
| 56 | |
| 57 | func newAliasAddCmd() *cobra.Command { |
| 58 | var flags aliasAddFlags |
| 59 | |
| 60 | cmd := &cobra.Command{ |
| 61 | Use: "add <alias-name> <agent-path>", |
| 62 | Short: "Add a new alias", |
| 63 | Long: `Add a new alias for an agent configuration or catalog reference. |
| 64 | |
| 65 | You can optionally specify runtime options that will be applied whenever |
| 66 | the alias is used: |
| 67 | |
| 68 | --yolo Automatically approve all tool calls without prompting |
| 69 | --model Override the agent's model (format: [agent=]provider/model) |
| 70 | --hide-tool-results Hide tool call results in the TUI |
| 71 | --sandbox Always run the agent inside a Docker sandbox`, |
| 72 | Example: ` # Create a simple alias |
| 73 | docker-agent alias add code agentcatalog/notion-expert |
| 74 | |
| 75 | # Create an alias that always runs in yolo mode |
| 76 | docker-agent alias add yolo-coder agentcatalog/coder --yolo |
| 77 | |
| 78 | # Create an alias with a specific model |
| 79 | docker-agent alias add fast-coder agentcatalog/coder --model openai/gpt-4o-mini |
| 80 | |
| 81 | # Create an alias with hidden tool results |
| 82 | docker-agent alias add quiet agentcatalog/coder --hide-tool-results |
| 83 | |
| 84 | # Create an alias that always runs in a sandbox |
| 85 | docker-agent alias add safe-coder agentcatalog/coder --sandbox |
| 86 | |
| 87 | # Create an alias with multiple options |
| 88 | docker-agent alias add turbo agentcatalog/coder --yolo --model anthropic/claude-sonnet-4-0`, |
| 89 | Args: cobra.ExactArgs(2), |
| 90 | RunE: func(cmd *cobra.Command, args []string) error { |
| 91 | return runAliasAddCommand(cmd, args, &flags) |
| 92 | }, |
| 93 | } |
| 94 | |
| 95 | cmd.Flags().BoolVar(&flags.yolo, "yolo", false, "Automatically approve all tool calls without prompting") |
| 96 | cmd.Flags().StringVar(&flags.model, "model", "", "Override agent model (format: [agent=]provider/model)") |
| 97 | cmd.Flags().BoolVar(&flags.hideToolResults, "hide-tool-results", false, "Hide tool call results in the TUI") |
| 98 | cmd.Flags().BoolVar(&flags.sandbox, "sandbox", false, "Always run the agent inside a Docker sandbox") |
| 99 | |
| 100 | return cmd |
| 101 | } |
| 102 | |
| 103 | func newAliasListCmd() *cobra.Command { |
| 104 | var asJSON bool |
no test coverage detected