1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
use clap::{Parser, Subcommand};
/// Vibe Kanban CLI - Terminal-based real-time task list
#[derive(Parser, Debug)]
#[command(name = "vibe-kanban-cli")]
#[command(author, version, about, long_about = None)]
pub struct Args {
/// Vibe Kanban server URL
#[arg(short, long, default_value = "http://localhost:5173")]
pub server: String,
/// Enable debug logging
#[arg(short, long)]
pub debug: bool,
#[command(subcommand)]
pub command: Command,
}
#[derive(Subcommand, Debug)]
pub enum Command {
/// Create a task and start an attempt immediately
Create {
/// Project ID or name
#[arg(long)]
project: String,
/// Prompt for the task (stored as description)
#[arg(long)]
prompt: String,
/// Optional title (defaults to a shortened prompt)
#[arg(long)]
title: Option<String>,
/// Task status: todo, inprogress, inreview, done, cancelled
#[arg(long, default_value = "todo")]
status: String,
/// Tool/executor to use (e.g. codex, claude-code, cursor, gemini)
#[arg(long, alias = "executor", default_value = "codex")]
tool: String,
/// Model/variant for the executor
#[arg(long)]
model: Option<String>,
/// Repo/worktree to use (name, display name, or UUID). Can be repeated.
/// Use "repo@branch" to override per-repo branch.
#[arg(long = "repo", alias = "worktree")]
repos: Vec<String>,
/// Branch name (default branch by default)
#[arg(long)]
branch: Option<String>,
/// Watch the created task in real time
#[arg(long)]
watch: bool,
},
/// Watch tasks in real time (board view or single task)
Watch {
/// Project ID or name (required for board or slug watch)
#[arg(long)]
project: Option<String>,
/// Task ID to watch
#[arg(long)]
task: Option<String>,
/// Task slug (derived from title) to watch
#[arg(long)]
slug: Option<String>,
},
/// List projects available on the server
Projects {
/// Output as JSON
#[arg(long)]
json: bool,
},
/// Manage projects
Project {
#[command(subcommand)]
command: ProjectCommand,
},
/// Manage a local Vibe Kanban server process
Server {
#[command(subcommand)]
command: ServerCommand,
},
}
#[derive(Subcommand, Debug)]
pub enum ProjectCommand {
/// Add a project from a local repository path
Add {
/// Path to the repository (use '.' for current directory)
#[arg(default_value = ".")]
path: String,
/// Override project name (defaults to folder name)
#[arg(long)]
name: Option<String>,
/// Override repository display name (defaults to project name)
#[arg(long)]
display_name: Option<String>,
},
}
#[derive(Subcommand, Debug)]
pub enum ServerCommand {
/// Start the server (optionally in the background)
Start {
/// Command to launch the server
#[arg(long, default_value = "pnpm run dev")]
command: String,
/// Run in the background
#[arg(long)]
background: bool,
/// Backend server port (sets SERVER_PORT and BACKEND_PORT)
#[arg(long)]
port: Option<u16>,
/// Log file path (used only when --background is set)
#[arg(long, default_value = "vibe-kanban-server.log")]
log: String,
},
}