1pub mod client;
2pub mod commands;
3pub mod config;
4pub mod error;
5pub mod mcp;
6pub mod models;
7pub mod output;
8
9use clap::{Parser, Subcommand};
10
11#[derive(Parser)]
12#[command(name = "clickup", version, about = "CLI for the ClickUp API")]
13pub struct Cli {
14 #[arg(long, global = true)]
16 pub token: Option<String>,
17
18 #[arg(long, global = true)]
20 pub workspace: Option<String>,
21
22 #[arg(long, global = true, default_value = "table")]
24 pub output: String,
25
26 #[arg(long, global = true)]
28 pub fields: Option<String>,
29
30 #[arg(long, global = true)]
32 pub no_header: bool,
33
34 #[arg(long, global = true)]
36 pub all: bool,
37
38 #[arg(long, global = true)]
40 pub limit: Option<usize>,
41
42 #[arg(long, global = true)]
44 pub page: Option<u32>,
45
46 #[arg(short, long, global = true)]
48 pub quiet: bool,
49
50 #[arg(long, global = true, default_value = "30")]
52 pub timeout: u64,
53
54 #[command(subcommand)]
55 pub command: Commands,
56}
57
58#[derive(Subcommand)]
59pub enum Commands {
60 Setup(commands::setup::SetupArgs),
62 Auth {
64 #[command(subcommand)]
65 command: commands::auth::AuthCommands,
66 },
67 Workspace {
69 #[command(subcommand)]
70 command: commands::workspace::WorkspaceCommands,
71 },
72 Space {
74 #[command(subcommand)]
75 command: commands::space::SpaceCommands,
76 },
77 Folder {
79 #[command(subcommand)]
80 command: commands::folder::FolderCommands,
81 },
82 List {
84 #[command(subcommand)]
85 command: commands::list::ListCommands,
86 },
87 Task {
89 #[command(subcommand)]
90 command: commands::task::TaskCommands,
91 },
92 Checklist {
94 #[command(subcommand)]
95 command: commands::checklist::ChecklistCommands,
96 },
97 Comment {
99 #[command(subcommand)]
100 command: commands::comment::CommentCommands,
101 },
102 Tag {
104 #[command(subcommand)]
105 command: commands::tag::TagCommands,
106 },
107 Field {
109 #[command(subcommand)]
110 command: commands::field::FieldCommands,
111 },
112 #[command(name = "task-type")]
114 TaskType {
115 #[command(subcommand)]
116 command: commands::task_type::TaskTypeCommands,
117 },
118 Attachment {
120 #[command(subcommand)]
121 command: commands::attachment::AttachmentCommands,
122 },
123 Time {
125 #[command(subcommand)]
126 command: commands::time::TimeCommands,
127 },
128 Goal {
130 #[command(subcommand)]
131 command: commands::goal::GoalCommands,
132 },
133 View {
135 #[command(subcommand)]
136 command: commands::view::ViewCommands,
137 },
138 Member {
140 #[command(subcommand)]
141 command: commands::member::MemberCommands,
142 },
143 User {
145 #[command(subcommand)]
146 command: commands::user::UserCommands,
147 },
148 Chat {
150 #[command(subcommand)]
151 command: commands::chat::ChatCommands,
152 },
153 Doc {
155 #[command(subcommand)]
156 command: commands::doc::DocCommands,
157 },
158 Webhook {
160 #[command(subcommand)]
161 command: commands::webhook::WebhookCommands,
162 },
163 Template {
165 #[command(subcommand)]
166 command: commands::template::TemplateCommands,
167 },
168 Guest {
170 #[command(subcommand)]
171 command: commands::guest::GuestCommands,
172 },
173 Group {
175 #[command(subcommand)]
176 command: commands::group::GroupCommands,
177 },
178 Role {
180 #[command(subcommand)]
181 command: commands::role::RoleCommands,
182 },
183 Shared {
185 #[command(subcommand)]
186 command: commands::shared::SharedCommands,
187 },
188 #[command(name = "audit-log")]
190 AuditLog {
191 #[command(subcommand)]
192 command: commands::audit_log::AuditLogCommands,
193 },
194 Acl {
196 #[command(subcommand)]
197 command: commands::acl::AclCommands,
198 },
199 #[command(name = "agent-config")]
201 AgentConfig {
202 #[command(subcommand)]
203 command: commands::agent_config::AgentConfigCommands,
204 },
205 Mcp {
207 #[command(subcommand)]
208 command: commands::mcp_cmd::McpCommands,
209 },
210 Status,
212 Completions {
214 shell: clap_complete::Shell,
216 },
217}