1#![recursion_limit = "512"]
2pub mod client;
3pub mod commands;
4pub mod config;
5pub mod error;
6pub mod git;
7pub mod mcp;
8pub mod models;
9pub mod output;
10
11use clap::{Parser, Subcommand};
12
13#[derive(Parser)]
14#[command(name = "clickup-cli", version, about = "CLI for the ClickUp API")]
15pub struct Cli {
16 #[arg(long, global = true)]
18 pub token: Option<String>,
19
20 #[arg(long, global = true)]
22 pub workspace: Option<String>,
23
24 #[arg(long, global = true, default_value = "table")]
26 pub output: String,
27
28 #[arg(long, global = true)]
30 pub fields: Option<String>,
31
32 #[arg(long, global = true)]
34 pub no_header: bool,
35
36 #[arg(long, global = true)]
38 pub all: bool,
39
40 #[arg(long, global = true)]
42 pub limit: Option<usize>,
43
44 #[arg(long, global = true)]
46 pub page: Option<u32>,
47
48 #[arg(long, global = true)]
51 pub cursor: Option<String>,
52
53 #[arg(long, global = true)]
56 pub start: Option<i64>,
57
58 #[arg(long = "start-id", global = true)]
61 pub start_id: Option<String>,
62
63 #[arg(short, long, global = true)]
65 pub quiet: bool,
66
67 #[arg(long, global = true, default_value = "30")]
69 pub timeout: u64,
70
71 #[command(subcommand)]
72 pub command: Commands,
73}
74
75#[derive(Subcommand)]
76pub enum Commands {
77 Setup(commands::setup::SetupArgs),
79 Auth {
81 #[command(subcommand)]
82 command: commands::auth::AuthCommands,
83 },
84 Workspace {
86 #[command(subcommand)]
87 command: commands::workspace::WorkspaceCommands,
88 },
89 Space {
91 #[command(subcommand)]
92 command: commands::space::SpaceCommands,
93 },
94 Folder {
96 #[command(subcommand)]
97 command: commands::folder::FolderCommands,
98 },
99 List {
101 #[command(subcommand)]
102 command: commands::list::ListCommands,
103 },
104 Task {
106 #[command(subcommand)]
107 command: commands::task::TaskCommands,
108 },
109 Checklist {
111 #[command(subcommand)]
112 command: commands::checklist::ChecklistCommands,
113 },
114 Comment {
116 #[command(subcommand)]
117 command: commands::comment::CommentCommands,
118 },
119 Tag {
121 #[command(subcommand)]
122 command: commands::tag::TagCommands,
123 },
124 Field {
126 #[command(subcommand)]
127 command: commands::field::FieldCommands,
128 },
129 #[command(name = "task-type")]
131 TaskType {
132 #[command(subcommand)]
133 command: commands::task_type::TaskTypeCommands,
134 },
135 Attachment {
137 #[command(subcommand)]
138 command: commands::attachment::AttachmentCommands,
139 },
140 Time {
142 #[command(subcommand)]
143 command: commands::time::TimeCommands,
144 },
145 Goal {
147 #[command(subcommand)]
148 command: commands::goal::GoalCommands,
149 },
150 View {
152 #[command(subcommand)]
153 command: commands::view::ViewCommands,
154 },
155 Member {
157 #[command(subcommand)]
158 command: commands::member::MemberCommands,
159 },
160 User {
162 #[command(subcommand)]
163 command: commands::user::UserCommands,
164 },
165 Chat {
167 #[command(subcommand)]
168 command: commands::chat::ChatCommands,
169 },
170 Doc {
172 #[command(subcommand)]
173 command: commands::doc::DocCommands,
174 },
175 Webhook {
177 #[command(subcommand)]
178 command: commands::webhook::WebhookCommands,
179 },
180 Template {
182 #[command(subcommand)]
183 command: commands::template::TemplateCommands,
184 },
185 Guest {
187 #[command(subcommand)]
188 command: commands::guest::GuestCommands,
189 },
190 Group {
192 #[command(subcommand)]
193 command: commands::group::GroupCommands,
194 },
195 Role {
197 #[command(subcommand)]
198 command: commands::role::RoleCommands,
199 },
200 Shared {
202 #[command(subcommand)]
203 command: commands::shared::SharedCommands,
204 },
205 #[command(name = "audit-log")]
207 AuditLog {
208 #[command(subcommand)]
209 command: commands::audit_log::AuditLogCommands,
210 },
211 Acl {
213 #[command(subcommand)]
214 command: commands::acl::AclCommands,
215 },
216 #[command(name = "agent-config")]
218 AgentConfig {
219 #[command(subcommand)]
220 command: commands::agent_config::AgentConfigCommands,
221 },
222 Mcp {
224 #[command(subcommand)]
225 command: commands::mcp_cmd::McpCommands,
226 },
227 Status,
229 Completions {
231 shell: clap_complete::Shell,
233 },
234}