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
use std::path::PathBuf;
use clap::{Parser, Subcommand};
#[derive(Parser, Debug)]
#[command(
name = "coven",
about = "A minimal streaming display and workflow runner for Claude Code's -p mode",
version
)]
pub struct Cli {
#[command(subcommand)]
pub command: Option<Command>,
/// Prompt to send to claude.
#[arg(value_name = "PROMPT")]
pub prompt: Option<String>,
/// Stream thinking text inline in dim italic instead of collapsing.
#[arg(long)]
pub show_thinking: bool,
/// Enable model-driven context forking via <fork> tags.
#[arg(long)]
pub fork: bool,
/// Extra arguments to pass through to claude (after --).
#[arg(last = true)]
pub claude_args: Vec<String>,
}
#[derive(Subcommand, Debug)]
pub enum Command {
/// Run claude in a loop with filesystem state accumulation.
Ralph {
/// Prompt to send to claude on each iteration.
#[arg(value_name = "PROMPT")]
prompt: String,
/// Maximum number of iterations (0 = infinite).
#[arg(long, default_value = "0")]
iterations: u32,
/// Tag that signals loop completion.
#[arg(long, default_value = "break")]
break_tag: String,
/// Disable break tag detection (requires --iterations to prevent infinite loop).
#[arg(long)]
no_break: bool,
/// Stream thinking text inline in dim italic instead of collapsing.
#[arg(long)]
show_thinking: bool,
/// Enable model-driven context forking via <fork> tags.
#[arg(long)]
fork: bool,
/// Extra arguments to pass through to claude (after --).
#[arg(last = true)]
claude_args: Vec<String>,
},
/// Initialize project with default agent prompts and directory structure.
Init,
/// Show status of all active workers.
Status,
/// Remove orphaned worktrees left behind by dead workers.
Gc,
/// Start an orchestration worker (dispatch → agent → land loop).
Worker {
/// Branch name for the worktree (random if not specified).
#[arg(long)]
branch: Option<String>,
/// Base directory for worktrees. Default: ~/worktrees.
#[arg(long)]
worktree_base: Option<PathBuf>,
/// Stream thinking text inline in dim italic instead of collapsing.
#[arg(long)]
show_thinking: bool,
/// Enable model-driven context forking via <fork> tags.
#[arg(long)]
fork: bool,
/// Extra arguments to pass through to claude (after --).
#[arg(last = true)]
claude_args: Vec<String>,
},
}