summaryrefslogtreecommitdiff
path: root/internal/cli/create.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli/create.go')
-rw-r--r--internal/cli/create.go13
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,