1#![recursion_limit = "512"]
2pub mod client;
3pub mod commands;
4pub mod config;
5pub mod error;
6pub mod mcp;
7pub mod models;
8pub mod output;
9
10use clap::{Parser, Subcommand};
11
12#[derive(Parser)]
13#[command(name = "clickup", version, about = "CLI for the ClickUp API")]
14pub struct Cli {
15 #[arg(long, global = true)]
17 pub token: Option<String>,
18
19 #[arg(long, global = true)]
21 pub workspace: Option<String>,
22
23 #[arg(long, global = true, default_value = "table")]
25 pub output: String,
26
27 #[arg(long, global = true)]
29 pub fields: Option<String>,
30
31 #[arg(long, global = true)]
33 pub no_header: bool,
34
35 #[arg(long, global = true)]
37 pub all: bool,
38
39 #[arg(long, global = true)]
41 pub limit: Option<usize>,
42
43 #[arg(long, global = true)]
45 pub page: Option<u32>,
46
47 #[arg(short, long, global = true)]
49 pub quiet: bool,
50
51 #[arg(long, global = true, default_value = "30")]
53 pub timeout: u64,
54
55 #[command(subcommand)]
56 pub command: Commands,
57}
58
59#[derive(Subcommand)]
60pub enum Commands {
61 Setup(commands::setup::SetupArgs),
63 Auth {
65 #[command(subcommand)]
66 command: commands::auth::AuthCommands,
67 },
68 Workspace {
70 #[command(subcommand)]
71 command: commands::workspace::WorkspaceCommands,
72 },
73 Space {
75 #[command(subcommand)]
76 command: commands::space::SpaceCommands,
77 },
78 Folder {
80 #[command(subcommand)]
81 command: commands::folder::FolderCommands,
82 },
83 List {
85 #[command(subcommand)]
86 command: commands::list::ListCommands,
87 },
88 Task {
90 #[command(subcommand)]
91 command: commands::task::TaskCommands,
92 },
93 Checklist {
95 #[command(subcommand)]
96 command: commands::checklist::ChecklistCommands,
97 },
98 Comment {
100 #[command(subcommand)]
101 command: commands::comment::CommentCommands,
102 },
103 Tag {
105 #[command(subcommand)]
106 command: commands::tag::TagCommands,
107 },
108 Field {
110 #[command(subcommand)]
111 command: commands::field::FieldCommands,
112 },
113 #[command(name = "task-type")]
115 TaskType {
116 #[command(subcommand)]
117 command: commands::task_type::TaskTypeCommands,
118 },
119 Attachment {
121 #[command(subcommand)]
122 command: commands::attachment::AttachmentCommands,
123 },
124 Time {
126 #[command(subcommand)]
127 command: commands::time::TimeCommands,
128 },
129 Goal {
131 #[command(subcommand)]
132 command: commands::goal::GoalCommands,
133 },
134 View {
136 #[command(subcommand)]
137 command: commands::view::ViewCommands,
138 },
139 Member {
141 #[command(subcommand)]
142 command: commands::member::MemberCommands,
143 },
144 User {
146 #[command(subcommand)]
147 command: commands::user::UserCommands,
148 },
149 Chat {
151 #[command(subcommand)]
152 command: commands::chat::ChatCommands,
153 },
154 Doc {
156 #[command(subcommand)]
157 command: commands::doc::DocCommands,
158 },
159 Webhook {
161 #[command(subcommand)]
162 command: commands::webhook::WebhookCommands,
163 },
164 Template {
166 #[command(subcommand)]
167 command: commands::template::TemplateCommands,
168 },
169 Guest {
171 #[command(subcommand)]
172 command: commands::guest::GuestCommands,
173 },
174 Group {
176 #[command(subcommand)]
177 command: commands::group::GroupCommands,
178 },
179 Role {
181 #[command(subcommand)]
182 command: commands::role::RoleCommands,
183 },
184 Shared {
186 #[command(subcommand)]
187 command: commands::shared::SharedCommands,
188 },
189 #[command(name = "audit-log")]
191 AuditLog {
192 #[command(subcommand)]
193 command: commands::audit_log::AuditLogCommands,
194 },
195 Acl {
197 #[command(subcommand)]
198 command: commands::acl::AclCommands,
199 },
200 #[command(name = "agent-config")]
202 AgentConfig {
203 #[command(subcommand)]
204 command: commands::agent_config::AgentConfigCommands,
205 },
206 Mcp {
208 #[command(subcommand)]
209 command: commands::mcp_cmd::McpCommands,
210 },
211 Status,
213 Completions {
215 shell: clap_complete::Shell,
217 },
218}