From a6ad24d9d4524ebef6ed40edf90c6597be876fbd Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Thu, 4 Jun 2026 00:53:03 +0000 Subject: cli: add --repository-url flag and improve error reporting --- internal/cli/create.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'internal/cli/create.go') 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, -- cgit v1.2.3