diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-06-04 00:53:03 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-06-04 00:53:03 +0000 |
| commit | a6ad24d9d4524ebef6ed40edf90c6597be876fbd (patch) | |
| tree | 390028656c505ee1b92d7297a937749562666a41 /internal/cli/create.go | |
| parent | 0d537df08fea539022cbcffe3ea778a3c84e7fb7 (diff) | |
cli: add --repository-url flag and improve error reporting
Diffstat (limited to 'internal/cli/create.go')
| -rw-r--r-- | internal/cli/create.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/internal/cli/create.go b/internal/cli/create.go index 396cd77..88f94ba 100644 --- a/internal/cli/create.go +++ b/internal/cli/create.go @@ -14,6 +14,7 @@ func newCreateCmd() *cobra.Command { serverURL string instructions string workingDir string + repoURL string model string agentType string parentID string @@ -28,13 +29,14 @@ func newCreateCmd() *cobra.Command { Short: "Create a task via the running server", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - return createTask(serverURL, args[0], instructions, workingDir, model, agentType, parentID, budget, timeout, priority, autoStart) + return createTask(serverURL, args[0], instructions, workingDir, repoURL, model, agentType, parentID, budget, timeout, priority, autoStart) }, } cmd.Flags().StringVar(&serverURL, "server", defaultServerURL, "claudomator server URL") cmd.Flags().StringVarP(&instructions, "instructions", "i", "", "task instructions (required)") cmd.Flags().StringVarP(&workingDir, "working-dir", "d", "", "working directory for the task") + cmd.Flags().StringVar(&repoURL, "repository-url", "", "repository URL for cloning") cmd.Flags().StringVarP(&model, "model", "m", "", "model to use") cmd.Flags().StringVar(&agentType, "agent-type", "claude", "agent type: claude, gemini") cmd.Flags().StringVar(&parentID, "parent-id", "", "parent task ID (makes this a subtask)") @@ -47,11 +49,12 @@ func newCreateCmd() *cobra.Command { return cmd } -func createTask(serverURL, name, instructions, workingDir, model, agentType, parentID string, budget float64, timeout, priority string, autoStart bool) error { +func createTask(serverURL, name, instructions, workingDir, repoURL, model, agentType, parentID string, budget float64, timeout, priority string, autoStart bool) error { body := map[string]interface{}{ - "name": name, - "timeout": timeout, - "priority": priority, + "name": name, + "timeout": timeout, + "priority": priority, + "repository_url": repoURL, "agent": map[string]interface{}{ "type": agentType, "instructions": instructions, |
