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", 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(short, long, global = true)]
50 pub quiet: bool,
51
52 #[arg(long, global = true, default_value = "30")]
54 pub timeout: u64,
55
56 #[command(subcommand)]
57 pub command: Commands,
58}
59
60#[derive(Subcommand)]
61pub enum Commands {
62 Setup(commands::setup::SetupArgs),
64 Auth {
66 #[command(subcommand)]
67 command: commands::auth::AuthCommands,
68 },
69 Workspace {
71 #[command(subcommand)]
72 command: commands::workspace::WorkspaceCommands,
73 },
74 Space {
76 #[command(subcommand)]
77 command: commands::space::SpaceCommands,
78 },
79 Folder {
81 #[command(subcommand)]
82 command: commands::folder::FolderCommands,
83 },
84 List {
86 #[command(subcommand)]
87 command: commands::list::ListCommands,
88 },
89 Task {
91 #[command(subcommand)]
92 command: commands::task::TaskCommands,
93 },
94 Checklist {
96 #[command(subcommand)]
97 command: commands::checklist::ChecklistCommands,
98 },
99 Comment {
101 #[command(subcommand)]
102 command: commands::comment::CommentCommands,
103 },
104 Tag {
106 #[command(subcommand)]
107 command: commands::tag::TagCommands,
108 },
109 Field {
111 #[command(subcommand)]
112 command: commands::field::FieldCommands,
113 },
114 #[command(name = "task-type")]
116 TaskType {
117 #[command(subcommand)]
118 command: commands::task_type::TaskTypeCommands,
119 },
120 Attachment {
122 #[command(subcommand)]
123 command: commands::attachment::AttachmentCommands,
124 },
125 Time {
127 #[command(subcommand)]
128 command: commands::time::TimeCommands,
129 },
130 Goal {
132 #[command(subcommand)]
133 command: commands::goal::GoalCommands,
134 },
135 View {
137 #[command(subcommand)]
138 command: commands::view::ViewCommands,
139 },
140 Member {
142 #[command(subcommand)]
143 command: commands::member::MemberCommands,
144 },
145 User {
147 #[command(subcommand)]
148 command: commands::user::UserCommands,
149 },
150 Chat {
152 #[command(subcommand)]
153 command: commands::chat::ChatCommands,
154 },
155 Doc {
157 #[command(subcommand)]
158 command: commands::doc::DocCommands,
159 },
160 Webhook {
162 #[command(subcommand)]
163 command: commands::webhook::WebhookCommands,
164 },
165 Template {
167 #[command(subcommand)]
168 command: commands::template::TemplateCommands,
169 },
170 Guest {
172 #[command(subcommand)]
173 command: commands::guest::GuestCommands,
174 },
175 Group {
177 #[command(subcommand)]
178 command: commands::group::GroupCommands,
179 },
180 Role {
182 #[command(subcommand)]
183 command: commands::role::RoleCommands,
184 },
185 Shared {
187 #[command(subcommand)]
188 command: commands::shared::SharedCommands,
189 },
190 #[command(name = "audit-log")]
192 AuditLog {
193 #[command(subcommand)]
194 command: commands::audit_log::AuditLogCommands,
195 },
196 Acl {
198 #[command(subcommand)]
199 command: commands::acl::AclCommands,
200 },
201 #[command(name = "agent-config")]
203 AgentConfig {
204 #[command(subcommand)]
205 command: commands::agent_config::AgentConfigCommands,
206 },
207 Mcp {
209 #[command(subcommand)]
210 command: commands::mcp_cmd::McpCommands,
211 },
212 Status,
214 Completions {
216 shell: clap_complete::Shell,
218 },
219}