openrouter-cli 0.2.0

CLI for OpenRouter account and SDK workflows
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
use std::path::PathBuf;

use clap::{Args, Parser, Subcommand, ValueEnum};

#[derive(Debug, Clone, Copy, Eq, PartialEq, ValueEnum)]
pub enum OutputFormat {
    #[value(name = "table", alias = "text")]
    Table,
    Json,
}

#[derive(Debug, Clone, Args)]
pub struct GlobalOptions {
    /// Path to CLI profile config TOML.
    #[arg(long, global = true)]
    pub config: Option<PathBuf>,

    /// Profile name to use.
    #[arg(long, global = true)]
    pub profile: Option<String>,

    /// Override API key (highest priority).
    #[arg(long, global = true)]
    pub api_key: Option<String>,

    /// Override management key (highest priority).
    #[arg(long, global = true)]
    pub management_key: Option<String>,

    /// Override OpenRouter API base URL.
    #[arg(long, global = true)]
    pub base_url: Option<String>,

    /// Output format.
    #[arg(long, global = true, value_enum, default_value_t = OutputFormat::Table)]
    pub output: OutputFormat,
}

#[derive(Debug, Clone, Subcommand)]
pub enum ProfileCommands {
    /// Show resolved profile and auth sources.
    Show,
}

#[derive(Debug, Clone, Subcommand)]
pub enum ConfigCommands {
    /// Show resolved configuration snapshot.
    Show,
    /// Print the resolved config file path.
    Path,
}

#[derive(Debug, Clone, Args)]
pub struct CreditsChargeArgs {
    /// Charge amount in USD.
    #[arg(long)]
    pub amount: f64,

    /// Sender wallet address.
    #[arg(long)]
    pub sender: String,

    /// Chain ID for the charge.
    #[arg(long)]
    pub chain_id: u32,
}

#[derive(Debug, Clone, Subcommand)]
pub enum CreditsCommands {
    /// Show credit totals for the authenticated account.
    Show,
    /// Create a Coinbase charge.
    Charge(CreditsChargeArgs),
}

#[derive(Debug, Clone, Args)]
pub struct UsageActivityArgs {
    /// Optional date in YYYY-MM-DD.
    #[arg(long)]
    pub date: Option<String>,
}

#[derive(Debug, Clone, Subcommand)]
pub enum UsageCommands {
    /// Show activity grouped by endpoint.
    Activity(UsageActivityArgs),
}

#[derive(Debug, Clone, Subcommand)]
pub enum OrganizationMemberCommands {
    /// List organization members.
    List(PaginationArgs),
}

#[derive(Debug, Clone, Subcommand)]
pub enum OrganizationCommands {
    /// Organization member commands.
    Members {
        #[command(subcommand)]
        command: OrganizationMemberCommands,
    },
}

#[derive(Debug, Clone, Copy, Eq, PartialEq, ValueEnum)]
pub enum ModelCategoryArg {
    Roleplay,
    Programming,
    Marketing,
    #[value(name = "marketing/seo", alias = "marketing-seo")]
    MarketingSeo,
    Technology,
    Science,
    Translation,
    Legal,
    Finance,
    Health,
    Trivia,
    Academia,
}

#[derive(Debug, Clone, Copy, Eq, PartialEq, ValueEnum)]
pub enum SupportedParameterArg {
    #[value(name = "tools")]
    Tools,
    #[value(name = "temperature")]
    Temperature,
    #[value(name = "top_p")]
    TopP,
    #[value(name = "top_k")]
    TopK,
    #[value(name = "min_p")]
    MinP,
    #[value(name = "top_a")]
    TopA,
    #[value(name = "frequency_penalty")]
    FrequencyPenalty,
    #[value(name = "presence_penalty")]
    PresencePenalty,
    #[value(name = "repetition_penalty")]
    RepetitionPenalty,
    #[value(name = "max_tokens")]
    MaxTokens,
    #[value(name = "logit_bias")]
    LogitBias,
    #[value(name = "logprobs")]
    Logprobs,
    #[value(name = "top_logprobs")]
    TopLogprobs,
    #[value(name = "seed")]
    Seed,
    #[value(name = "response_format")]
    ResponseFormat,
    #[value(name = "structured_outputs")]
    StructuredOutputs,
    #[value(name = "stop")]
    Stop,
    #[value(name = "include_reasoning")]
    IncludeReasoning,
    #[value(name = "reasoning")]
    Reasoning,
    #[value(name = "web_search_options")]
    WebSearchOptions,
}

#[derive(Debug, Clone, Args)]
pub struct ModelsListArgs {
    /// Filter models by category.
    #[arg(long, value_enum, conflicts_with = "supported_parameter")]
    pub category: Option<ModelCategoryArg>,

    /// Filter models by supported parameter.
    #[arg(long, value_enum, conflicts_with = "category")]
    pub supported_parameter: Option<SupportedParameterArg>,
}

#[derive(Debug, Clone, Args)]
pub struct ModelsShowArgs {
    /// Model ID (for example: openai/gpt-4.1).
    pub model_id: String,
}

#[derive(Debug, Clone, Args)]
pub struct ModelsEndpointsArgs {
    /// Model ID (for example: openai/gpt-4.1).
    pub model_id: String,
}

#[derive(Debug, Clone, Subcommand)]
pub enum ModelsCommands {
    /// List models.
    List(ModelsListArgs),
    /// Show a single model by model ID.
    Show(ModelsShowArgs),
    /// List endpoints for a specific model.
    Endpoints(ModelsEndpointsArgs),
}

#[derive(Debug, Clone, Subcommand)]
pub enum ProvidersCommands {
    /// List providers.
    List,
}

#[derive(Debug, Clone, Args)]
pub struct KeysListArgs {
    /// Optional offset for key listing.
    #[arg(long)]
    pub offset: Option<u32>,

    /// Include disabled keys.
    #[arg(long)]
    pub include_disabled: bool,

    /// Filter keys by workspace ID.
    #[arg(long)]
    pub workspace_id: Option<String>,
}

#[derive(Debug, Clone, Args)]
pub struct KeysCreateArgs {
    /// Display name for the key.
    #[arg(long)]
    pub name: String,

    /// Optional spending limit in USD.
    #[arg(long)]
    pub limit: Option<f64>,

    /// Create the key inside a specific workspace.
    #[arg(long)]
    pub workspace_id: Option<String>,
}

#[derive(Debug, Clone, Args)]
pub struct KeysGetArgs {
    /// Key hash.
    pub hash: String,
}

#[derive(Debug, Clone, Args)]
pub struct KeysUpdateArgs {
    /// Key hash.
    pub hash: String,

    /// Optional new display name.
    #[arg(long)]
    pub name: Option<String>,

    /// Optional new spending limit in USD.
    #[arg(long)]
    pub limit: Option<f64>,

    /// Disable this key.
    #[arg(long, conflicts_with = "enable")]
    pub disable: bool,

    /// Enable this key.
    #[arg(long, conflicts_with = "disable")]
    pub enable: bool,
}

#[derive(Debug, Clone, Args)]
pub struct KeysDeleteArgs {
    /// Key hash.
    pub hash: String,

    /// Confirm destructive action.
    #[arg(long)]
    pub yes: bool,
}

#[derive(Debug, Clone, Subcommand)]
pub enum KeysCommands {
    /// List API keys.
    List(KeysListArgs),
    /// Create an API key.
    Create(KeysCreateArgs),
    /// Get a single API key.
    Get(KeysGetArgs),
    /// Update an API key.
    Update(KeysUpdateArgs),
    /// Delete an API key.
    Delete(KeysDeleteArgs),
}

#[derive(Debug, Clone, Args)]
pub struct PaginationArgs {
    /// Offset for pagination.
    #[arg(long)]
    pub offset: Option<u32>,

    /// Limit for pagination.
    #[arg(long)]
    pub limit: Option<u32>,
}

#[derive(Debug, Clone, Args)]
pub struct GuardrailsListArgs {
    #[command(flatten)]
    pub pagination: PaginationArgs,

    /// Filter guardrails by workspace ID.
    #[arg(long)]
    pub workspace_id: Option<String>,
}

#[derive(Debug, Clone, Args)]
pub struct GuardrailsGetArgs {
    /// Guardrail ID.
    pub id: String,
}

#[derive(Debug, Clone, Args)]
pub struct GuardrailsDeleteArgs {
    /// Guardrail ID.
    pub id: String,

    /// Confirm destructive action.
    #[arg(long)]
    pub yes: bool,
}

#[derive(Debug, Clone, Args)]
pub struct GuardrailsCreateArgs {
    /// Guardrail name.
    #[arg(long)]
    pub name: String,

    /// Optional guardrail description.
    #[arg(long)]
    pub description: Option<String>,

    /// Optional spending cap in USD.
    #[arg(long)]
    pub limit_usd: Option<f64>,

    /// Optional reset interval (for example: daily, monthly).
    #[arg(long)]
    pub reset_interval: Option<String>,

    /// Allowed provider IDs.
    #[arg(long = "allowed-provider")]
    pub allowed_providers: Vec<String>,

    /// Allowed model IDs.
    #[arg(long = "allowed-model")]
    pub allowed_models: Vec<String>,

    /// Enforce ZDR.
    #[arg(long)]
    pub enforce_zdr: bool,

    /// Create the guardrail inside a specific workspace.
    #[arg(long)]
    pub workspace_id: Option<String>,
}

#[derive(Debug, Clone, Args)]
pub struct GuardrailsUpdateArgs {
    /// Guardrail ID.
    pub id: String,

    /// Optional new name.
    #[arg(long)]
    pub name: Option<String>,

    /// Optional new description.
    #[arg(long)]
    pub description: Option<String>,

    /// Optional new spending cap in USD.
    #[arg(long)]
    pub limit_usd: Option<f64>,

    /// Optional new reset interval.
    #[arg(long)]
    pub reset_interval: Option<String>,

    /// Replace allowed provider IDs.
    #[arg(long = "allowed-provider", conflicts_with = "clear_allowed_providers")]
    pub allowed_providers: Vec<String>,

    /// Replace allowed model IDs.
    #[arg(long = "allowed-model", conflicts_with = "clear_allowed_models")]
    pub allowed_models: Vec<String>,

    /// Clear all allowed providers (send empty list).
    #[arg(long)]
    pub clear_allowed_providers: bool,

    /// Clear all allowed models (send empty list).
    #[arg(long)]
    pub clear_allowed_models: bool,

    /// Set `enforce_zdr=true`.
    #[arg(long, conflicts_with = "no_enforce_zdr")]
    pub enforce_zdr: bool,

    /// Set `enforce_zdr=false`.
    #[arg(long = "no-enforce-zdr", conflicts_with = "enforce_zdr")]
    pub no_enforce_zdr: bool,
}

#[derive(Debug, Clone, Args)]
pub struct AssignmentListArgs {
    /// Optional guardrail ID. If omitted, lists global assignments.
    #[arg(long)]
    pub guardrail_id: Option<String>,

    #[command(flatten)]
    pub pagination: PaginationArgs,
}

#[derive(Debug, Clone, Args)]
pub struct KeyAssignmentApplyArgs {
    /// Guardrail ID.
    pub guardrail_id: String,

    /// One or more key hashes.
    #[arg(value_name = "KEY_HASH", required = true, num_args = 1..)]
    pub key_hashes: Vec<String>,
}

#[derive(Debug, Clone, Args)]
pub struct KeyAssignmentUnassignArgs {
    #[command(flatten)]
    pub request: KeyAssignmentApplyArgs,

    /// Confirm destructive action.
    #[arg(long)]
    pub yes: bool,
}

#[derive(Debug, Clone, Subcommand)]
pub enum GuardrailKeyAssignmentCommands {
    /// List key assignments.
    List(AssignmentListArgs),
    /// Assign keys to a guardrail.
    Assign(KeyAssignmentApplyArgs),
    /// Unassign keys from a guardrail.
    Unassign(KeyAssignmentUnassignArgs),
}

#[derive(Debug, Clone, Args)]
pub struct MemberAssignmentApplyArgs {
    /// Guardrail ID.
    pub guardrail_id: String,

    /// One or more member user IDs.
    #[arg(value_name = "MEMBER_USER_ID", required = true, num_args = 1..)]
    pub member_user_ids: Vec<String>,
}

#[derive(Debug, Clone, Args)]
pub struct MemberAssignmentUnassignArgs {
    #[command(flatten)]
    pub request: MemberAssignmentApplyArgs,

    /// Confirm destructive action.
    #[arg(long)]
    pub yes: bool,
}

#[derive(Debug, Clone, Subcommand)]
pub enum GuardrailMemberAssignmentCommands {
    /// List member assignments.
    List(AssignmentListArgs),
    /// Assign members to a guardrail.
    Assign(MemberAssignmentApplyArgs),
    /// Unassign members from a guardrail.
    Unassign(MemberAssignmentUnassignArgs),
}

#[derive(Debug, Clone, Subcommand)]
pub enum GuardrailAssignmentCommands {
    /// Key assignment operations.
    Keys {
        #[command(subcommand)]
        command: GuardrailKeyAssignmentCommands,
    },
    /// Member assignment operations.
    Members {
        #[command(subcommand)]
        command: GuardrailMemberAssignmentCommands,
    },
}

#[derive(Debug, Clone, Subcommand)]
pub enum GuardrailsCommands {
    /// List guardrails.
    List(GuardrailsListArgs),
    /// Create a guardrail.
    Create(GuardrailsCreateArgs),
    /// Get a guardrail.
    Get(GuardrailsGetArgs),
    /// Update a guardrail.
    Update(GuardrailsUpdateArgs),
    /// Delete a guardrail.
    Delete(GuardrailsDeleteArgs),
    /// Manage guardrail assignments.
    Assignments {
        #[command(subcommand)]
        command: GuardrailAssignmentCommands,
    },
}

#[derive(Debug, Clone, Args)]
pub struct WorkspaceGetArgs {
    /// Workspace ID or slug.
    pub id: String,
}

#[derive(Debug, Clone, Args)]
pub struct WorkspaceDeleteArgs {
    /// Workspace ID or slug.
    pub id: String,

    /// Confirm destructive action.
    #[arg(long)]
    pub yes: bool,
}

#[derive(Debug, Clone, Args)]
pub struct WorkspacesCreateArgs {
    /// Workspace name.
    #[arg(long)]
    pub name: String,

    /// Optional URL-friendly slug.
    #[arg(long)]
    pub slug: Option<String>,

    /// Optional description.
    #[arg(long)]
    pub description: Option<String>,

    /// Optional default text model.
    #[arg(long)]
    pub default_text_model: Option<String>,

    /// Optional default image model.
    #[arg(long)]
    pub default_image_model: Option<String>,

    /// Optional default provider sort.
    #[arg(long)]
    pub default_provider_sort: Option<String>,

    /// Restrict observability IO logging to a key ID. Repeat to allow multiple keys.
    #[arg(long = "io-logging-api-key-id", value_name = "KEY_ID")]
    pub io_logging_api_key_ids: Vec<u64>,

    /// Set observability IO logging sampling rate.
    #[arg(long)]
    pub io_logging_sampling_rate: Option<f64>,

    /// Set data discount logging enabled.
    #[arg(
        long = "enable-data-discount-logging",
        conflicts_with = "disable_data_discount_logging"
    )]
    pub enable_data_discount_logging: bool,

    /// Set data discount logging disabled.
    #[arg(
        long = "disable-data-discount-logging",
        conflicts_with = "enable_data_discount_logging"
    )]
    pub disable_data_discount_logging: bool,

    /// Set observability broadcast enabled.
    #[arg(
        long = "enable-observability-broadcast",
        conflicts_with = "disable_observability_broadcast"
    )]
    pub enable_observability_broadcast: bool,

    /// Set observability broadcast disabled.
    #[arg(
        long = "disable-observability-broadcast",
        conflicts_with = "enable_observability_broadcast"
    )]
    pub disable_observability_broadcast: bool,

    /// Set observability IO logging enabled.
    #[arg(
        long = "enable-observability-io-logging",
        conflicts_with = "disable_observability_io_logging"
    )]
    pub enable_observability_io_logging: bool,

    /// Set observability IO logging disabled.
    #[arg(
        long = "disable-observability-io-logging",
        conflicts_with = "enable_observability_io_logging"
    )]
    pub disable_observability_io_logging: bool,
}

#[derive(Debug, Clone, Args)]
pub struct WorkspacesUpdateArgs {
    /// Workspace ID or slug.
    pub id: String,

    /// Optional new name.
    #[arg(long)]
    pub name: Option<String>,

    /// Optional new slug.
    #[arg(long)]
    pub slug: Option<String>,

    /// Optional new description.
    #[arg(long)]
    pub description: Option<String>,

    /// Optional new default text model.
    #[arg(long)]
    pub default_text_model: Option<String>,

    /// Optional new default image model.
    #[arg(long)]
    pub default_image_model: Option<String>,

    /// Optional new default provider sort.
    #[arg(long)]
    pub default_provider_sort: Option<String>,

    /// Restrict observability IO logging to a key ID. Repeat to allow multiple keys.
    #[arg(
        long = "io-logging-api-key-id",
        value_name = "KEY_ID",
        conflicts_with = "clear_io_logging_api_key_ids"
    )]
    pub io_logging_api_key_ids: Vec<u64>,

    /// Clear observability IO logging key restrictions.
    #[arg(
        long = "clear-io-logging-api-key-ids",
        conflicts_with = "io_logging_api_key_ids"
    )]
    pub clear_io_logging_api_key_ids: bool,

    /// Set observability IO logging sampling rate.
    #[arg(long)]
    pub io_logging_sampling_rate: Option<f64>,

    /// Set data discount logging enabled.
    #[arg(
        long = "enable-data-discount-logging",
        conflicts_with = "disable_data_discount_logging"
    )]
    pub enable_data_discount_logging: bool,

    /// Set data discount logging disabled.
    #[arg(
        long = "disable-data-discount-logging",
        conflicts_with = "enable_data_discount_logging"
    )]
    pub disable_data_discount_logging: bool,

    /// Set observability broadcast enabled.
    #[arg(
        long = "enable-observability-broadcast",
        conflicts_with = "disable_observability_broadcast"
    )]
    pub enable_observability_broadcast: bool,

    /// Set observability broadcast disabled.
    #[arg(
        long = "disable-observability-broadcast",
        conflicts_with = "enable_observability_broadcast"
    )]
    pub disable_observability_broadcast: bool,

    /// Set observability IO logging enabled.
    #[arg(
        long = "enable-observability-io-logging",
        conflicts_with = "disable_observability_io_logging"
    )]
    pub enable_observability_io_logging: bool,

    /// Set observability IO logging disabled.
    #[arg(
        long = "disable-observability-io-logging",
        conflicts_with = "enable_observability_io_logging"
    )]
    pub disable_observability_io_logging: bool,
}

#[derive(Debug, Clone, Args)]
pub struct WorkspaceMembersApplyArgs {
    /// Workspace ID or slug.
    pub workspace_id: String,

    /// One or more member user IDs.
    #[arg(value_name = "MEMBER_USER_ID", required = true, num_args = 1..)]
    pub user_ids: Vec<String>,
}

#[derive(Debug, Clone, Args)]
pub struct WorkspaceMembersRemoveArgs {
    #[command(flatten)]
    pub request: WorkspaceMembersApplyArgs,

    /// Confirm destructive action.
    #[arg(long)]
    pub yes: bool,
}

#[derive(Debug, Clone, Subcommand)]
pub enum WorkspaceMemberCommands {
    /// Add organization members to a workspace.
    Add(WorkspaceMembersApplyArgs),
    /// Remove organization members from a workspace.
    Remove(WorkspaceMembersRemoveArgs),
}

#[derive(Debug, Clone, Subcommand)]
pub enum WorkspacesCommands {
    /// List workspaces.
    List(PaginationArgs),
    /// Create a workspace.
    Create(WorkspacesCreateArgs),
    /// Get a workspace.
    Get(WorkspaceGetArgs),
    /// Update a workspace.
    Update(WorkspacesUpdateArgs),
    /// Delete a workspace.
    Delete(WorkspaceDeleteArgs),
    /// Manage workspace members.
    Members {
        #[command(subcommand)]
        command: WorkspaceMemberCommands,
    },
}

#[derive(Debug, Clone, Subcommand)]
pub enum Commands {
    /// Profile-related commands.
    Profile {
        #[command(subcommand)]
        command: ProfileCommands,
    },
    /// Configuration commands.
    Config {
        #[command(subcommand)]
        command: ConfigCommands,
    },
    /// Credits and billing commands.
    Credits {
        #[command(subcommand)]
        command: CreditsCommands,
    },
    /// Model discovery commands.
    Models {
        #[command(subcommand)]
        command: ModelsCommands,
    },
    /// Provider discovery commands.
    Providers {
        #[command(subcommand)]
        command: ProvidersCommands,
    },
    /// API key management commands.
    Keys {
        #[command(subcommand)]
        command: KeysCommands,
    },
    /// Guardrail management commands.
    Guardrails {
        #[command(subcommand)]
        command: GuardrailsCommands,
    },
    /// Organization management commands.
    Organization {
        #[command(subcommand)]
        command: OrganizationCommands,
    },
    /// Workspace management commands.
    Workspaces {
        #[command(subcommand)]
        command: WorkspacesCommands,
    },
    /// Usage commands.
    Usage {
        #[command(subcommand)]
        command: UsageCommands,
    },
}

#[derive(Debug, Clone, Parser)]
#[command(name = "openrouter-cli", version, about = "OpenRouter CLI", long_about = None)]
pub struct Cli {
    #[command(flatten)]
    pub global: GlobalOptions,

    #[command(subcommand)]
    pub command: Commands,
}