Debian Codegraph @

tests/__snapshots__/test_docs_snapshots/TestSphinxDirectiveSnapshots.test_simple_directive_rst.rst

raw
1 .. _cyclopts-complex-cli:
2
3 Complex CLI application for comprehensive documentation testing.
4
5 .. _cyclopts-complex-cli-version:
6
7
8 ::
9
10 complex-cli version
11
12 Show version information.
13
14 Displays the application version and system information.
15
16 .. _cyclopts-complex-cli-info:
17
18
19 ::
20
21 complex-cli info [ARGS]
22
23 Show application information.
24
25 **Parameters:**
26
27 ``DETAILED, --detailed, --no-detailed``
28 Show detailed information including dependencies. [Default: ``False``]
29
30 ``FORMAT, --format``
31 Output format for the information. [Choices: ``json``, ``yaml``, ``table``, ``csv``, Default: ``table``]
32
33 .. _cyclopts-complex-cli-admin:
34
35
36 Administrative commands for system management.
37
38 **Commands:**
39
40 ``config-cmd``
41 Configure database settings.
42
43 ``status``
44 Show system status.
45
46 ``users``
47 User management commands.
48
49 .. _cyclopts-complex-cli-admin-status:
50
51 status
52 ^^^^^^
53
54 ::
55
56 complex-cli admin status [OPTIONS] [ARGS]
57
58 Show system status.
59
60 **Parameters:**
61
62 ``SERVICES, --services``
63 Specific services to check (all if not specified).
64
65 ``--watch, -w``
66 Continuously watch status. [Default: ``False``]
67
68 ``--interval``
69 Refresh interval in seconds when watching. [Default: ``5``]
70
71 .. _cyclopts-complex-cli-admin-config-cmd:
72
73 config-cmd
74 ^^^^^^^^^^
75
76 ::
77
78 complex-cli admin config-cmd [OPTIONS]
79
80 Configure database settings.
81
82 **Parameters:**
83
84 ``--host``
85 Database server hostname. [Default: ``localhost``]
86
87 ``--port``
88 Database server port number. [Default: ``5432``]
89
90 ``--username``
91 Authentication username. [Default: ``admin``]
92
93 ``--password``
94 Authentication password (optional).
95
96 ``--ssl-mode``
97 SSL connection mode. [Choices: ``disable``, ``prefer``, ``require``, ``verify-full``, Default: ``prefer``]
98
99 ``--pool-size``
100 Connection pool size. [Default: ``10``]
101
102 .. _cyclopts-complex-cli-admin-users:
103
104 users
105 ^^^^^
106
107 User management commands.
108
109 **Commands:**
110
111 ``create``
112 Create a new user.
113
114 ``delete``
115 Delete a user.
116
117 ``list-users``
118 List all users.
119
120 ``permissions``
121 Permission management for users.
122
123 .. _cyclopts-complex-cli-admin-users-list-users:
124
125 list-users
126 """"""""""
127
128 ::
129
130 complex-cli admin users list-users [ARGS]
131
132 List all users.
133
134 **Parameters:**
135
136 ``ACTIVE-ONLY, --active-only, --no-active-only``
137 Show only active users. [Default: ``False``]
138
139 ``ROLE, --role``
140 Filter by user role. [Choices: ``admin``, ``user``, ``guest``]
141
142 ``LIMIT, --limit``
143 Maximum number of users to display. [Default: ``100``]
144
145 ``FORMAT, --format``
146 Output format. [Choices: ``json``, ``yaml``, ``table``, ``csv``, Default: ``table``]
147
148 .. _cyclopts-complex-cli-admin-users-create:
149
150 create
151 """"""
152
153 ::
154
155 complex-cli admin users create [OPTIONS] USERNAME EMAIL
156
157 Create a new user.
158
159 **Arguments:**
160
161 ``USERNAME``
162 Unique username for the new user. [**Required**]
163
164 ``EMAIL``
165 Email address for the new user. [**Required**]
166
167 **Parameters:**
168
169 ``--role``
170 User role assignment. [Choices: ``admin``, ``user``, ``guest``, Default: ``user``]
171
172 ``--permissions.none, --permissions.no-none``
173 Initial permission flags. [Default: ``False``]
174
175 ``--permissions.read, --permissions.no-read``
176 Initial permission flags. [Default: ``False``]
177
178 ``--permissions.write, --permissions.no-write``
179 Initial permission flags. [Default: ``False``]
180
181 ``--permissions.execute, --permissions.no-execute``
182 Initial permission flags. [Default: ``False``]
183
184 ``--permissions.admin, --permissions.no-admin``
185 Initial permission flags. [Default: ``False``]
186
187 ``--send-welcome, --no-send-welcome``
188 Send welcome email after creation. [Default: ``True``]
189
190 .. _cyclopts-complex-cli-admin-users-delete:
191
192 delete
193 """"""
194
195 ::
196
197 complex-cli admin users delete [OPTIONS] USERNAME
198
199 Delete a user.
200
201 **Arguments:**
202
203 ``USERNAME``
204 Username to delete. [**Required**]
205
206 **Parameters:**
207
208 ``--force, -f, --no-force``
209 Skip confirmation prompt. [Default: ``False``]
210
211 ``--backup, --no-backup``
212 Create backup before deletion. [Default: ``True``]
213
214 .. _cyclopts-complex-cli-admin-users-permissions:
215
216 permissions
217 """""""""""
218
219 Permission management for users.
220
221 **Commands:**
222
223 ``audit``
224 Audit permission changes.
225
226 ``grant``
227 Grant permissions to a user.
228
229 ``revoke``
230 Revoke permissions from a user.
231
232 ``roles``
233 Role template management.
234
235 .. _cyclopts-complex-cli-admin-users-permissions-grant:
236
237 grant
238 '''''
239
240 ::
241
242 complex-cli admin users permissions grant [OPTIONS] USERNAME PERMISSION
243
244 Grant permissions to a user.
245
246 **Arguments:**
247
248 ``USERNAME``
249 Target username. [**Required**]
250
251 ``PERMISSION``
252 Permission flags to grant. [**Required**, Choices: ``none``, ``read``, ``write``, ``execute``, ``admin``]
253
254 **Parameters:**
255
256 ``--resource``
257 Specific resource to grant access to.
258
259 ``--expires``
260 Expiration date (ISO format).
261
262 .. _cyclopts-complex-cli-admin-users-permissions-revoke:
263
264 revoke
265 ''''''
266
267 ::
268
269 complex-cli admin users permissions revoke USERNAME PERMISSION
270
271 Revoke permissions from a user.
272
273 **Arguments:**
274
275 ``USERNAME``
276 Target username. [**Required**]
277
278 ``PERMISSION``
279 Permission flags to revoke. [**Required**, Choices: ``none``, ``read``, ``write``, ``execute``, ``admin``]
280
281 .. _cyclopts-complex-cli-admin-users-permissions-audit:
282
283 audit
284 '''''
285
286 ::
287
288 complex-cli admin users permissions audit [ARGS]
289
290 Audit permission changes.
291
292 **Parameters:**
293
294 ``USERNAME, --username``
295 Filter by username (all users if not specified).
296
297 ``DAYS, --days``
298 Number of days to look back. [Default: ``30``]
299
300 ``FORMAT, --format``
301 Output format for audit report. [Choices: ``json``, ``yaml``, ``table``, ``csv``, Default: ``table``]
302
303 .. _cyclopts-complex-cli-admin-users-permissions-roles:
304
305 roles
306 '''''
307
308 Role template management.
309
310 **Commands:**
311
312 ``create-role``
313 Create a new role template.
314
315 ``list-roles``
316 List all role templates.
317
318 .. _cyclopts-complex-cli-admin-users-permissions-roles-list-roles:
319
320 list-roles
321 ~~~~~~~~~~
322
323 ::
324
325 complex-cli admin users permissions roles list-roles [ARGS]
326
327 List all role templates.
328
329 **Parameters:**
330
331 ``INCLUDE-SYSTEM, --include-system, --no-include-system``
332 Include built-in system roles. [Default: ``False``]
333
334 .. _cyclopts-complex-cli-admin-users-permissions-roles-create-role:
335
336 create-role
337 ~~~~~~~~~~~
338
339 ::
340
341 complex-cli admin users permissions roles create-role [OPTIONS] NAME
342
343 Create a new role template.
344
345 **Arguments:**
346
347 ``NAME``
348 Role name. [**Required**]
349
350 **Parameters:**
351
352 ``--permissions.none, --permissions.no-none``
353 Default permissions for this role. [Default: ``False``]
354
355 ``--permissions.read, --permissions.no-read``
356 Default permissions for this role. [Default: ``False``]
357
358 ``--permissions.write, --permissions.no-write``
359 Default permissions for this role. [Default: ``False``]
360
361 ``--permissions.execute, --permissions.no-execute``
362 Default permissions for this role. [Default: ``False``]
363
364 ``--permissions.admin, --permissions.no-admin``
365 Default permissions for this role. [Default: ``False``]
366
367 ``--description``
368 Role description. [Default: ``""``]
369
370 .. _cyclopts-complex-cli-data:
371
372
373 Data processing commands.
374
375 **Commands:**
376
377 ``pipeline``
378 Run a complete data pipeline.
379
380 ``process``
381 Process data files with configurable options.
382
383 ``validate``
384 Validate data files against schema.
385
386 .. _cyclopts-complex-cli-data-process:
387
388 process
389 ^^^^^^^
390
391 ::
392
393 complex-cli data process [OPTIONS] INPUT_FILES
394
395 Process data files with configurable options.
396
397 This command demonstrates dataclass parameter flattening where
398 all fields from ProcessingConfig and PathConfig become CLI options.
399
400 **Arguments:**
401
402 ``INPUT_FILES``
403 Input files to process [**Required**]
404
405 **Parameters:**
406
407 ``--batch-size``
408 Number of items to process per batch. [Default: ``32``]
409
410 ``--num-workers``
411 Number of parallel workers. Use "auto" for automatic detection. [Choices: ``auto``, Default: ``auto``]
412
413 ``--quality-level``
414 Processing quality level. Higher values mean better quality but slower. [Choices: ``high``, ``medium``, ``low``, Default: ``high``]
415
416 ``--device``
417 Computing device to use. Can be "cuda", "cpu", "auto", or a GPU index. [Choices: ``cuda``, ``cpu``, ``auto``, Default: ``auto``]
418
419 ``--output-formats, --empty-output-formats``
420 List of output formats to generate. [Choices: ``json``, ``yaml``, ``table``, ``csv``, Default: ``[json]``]
421
422 ``--input-dir``
423 Input data directory. [Default: ``data/input``]
424
425 ``--output-dir``
426 Output results directory. [Default: ``data/output``]
427
428 ``--cache-dir``
429 Cache directory for intermediate files.
430
431 ``--log-dir``
432 Directory for log files. [Default: ``logs``]
433
434 .. _cyclopts-complex-cli-data-pipeline:
435
436 pipeline
437 ^^^^^^^^
438
439 ::
440
441 complex-cli data pipeline [OPTIONS]
442
443 Run a complete data pipeline.
444
445 Demonstrates nested dataclass flattening (PipelineConfig contains
446 PathConfig and ProcessingConfig).
447
448 **Parameters:**
449
450 ``--name``
451 Pipeline name for identification. [Default: ``default-pipeline``]
452
453 ``--input-dir``
454 Input data directory. [Default: ``data/input``]
455
456 ``--output-dir``
457 Output results directory. [Default: ``data/output``]
458
459 ``--cache-dir``
460 Cache directory for intermediate files.
461
462 ``--log-dir``
463 Directory for log files. [Default: ``logs``]
464
465 ``--batch-size``
466 Number of items to process per batch. [Default: ``32``]
467
468 ``--num-workers``
469 Number of parallel workers. Use "auto" for automatic detection. [Choices: ``auto``, Default: ``auto``]
470
471 ``--quality-level``
472 Processing quality level. Higher values mean better quality but slower. [Choices: ``high``, ``medium``, ``low``, Default: ``high``]
473
474 ``--device``
475 Computing device to use. Can be "cuda", "cpu", "auto", or a GPU index. [Choices: ``cuda``, ``cpu``, ``auto``, Default: ``auto``]
476
477 ``--output-formats, --empty-output-formats``
478 List of output formats to generate. [Choices: ``json``, ``yaml``, ``table``, ``csv``, Default: ``[json]``]
479
480 ``--dry-run, --no-dry-run``
481 If True, simulate execution without making changes. [Default: ``False``]
482
483 .. _cyclopts-complex-cli-data-validate:
484
485 validate
486 ^^^^^^^^
487
488 ::
489
490 complex-cli data validate [OPTIONS] INPUT_PATH
491
492 Validate data files against schema.
493
494 **Arguments:**
495
496 ``INPUT_PATH``
497 Path to validate. [**Required**]
498
499 **Parameters:**
500
501 ``--strict, --no-strict``
502 Enable strict validation mode. [Default: ``False``]
503
504 ``--schema-file``
505 Custom schema file (must exist).
506
507 ``--ignore-patterns, --empty-ignore-patterns``
508 Patterns to ignore during validation.
509
510 .. _cyclopts-complex-cli-server:
511
512
513 Server management commands.
514
515 **Commands:**
516
517 ``restart``
518 Restart the server.
519
520 ``start``
521 Start the server with configuration.
522
523 ``stop``
524 Stop the server.
525
526 .. _cyclopts-complex-cli-server-start:
527
528 start
529 ^^^^^
530
531 ::
532
533 complex-cli server start [OPTIONS]
534
535 Start the server with configuration.
536
537 Demonstrates Pydantic model support for CLI parameters.
538
539 **Parameters:**
540
541 ``--server.host``
542 Server bind address. [Default: ``0.0.0.0``]
543
544 ``--server.port``
545 Server port number. [Default: ``8000``]
546
547 ``--server.workers``
548 Number of worker processes. [Default: ``4``]
549
550 ``--server.timeout``
551 Request timeout in seconds. [Default: ``30.0``]
552
553 ``--server.debug, --server.no-debug``
554 Enable debug mode. [Default: ``False``]
555
556 ``--auth.provider``
557 Authentication provider type. [Choices: ``oauth2``, ``jwt``, ``basic``, ``none``, Default: ``jwt``]
558
559 ``--auth.token-expiry``
560 Token expiration time in seconds. [Default: ``3600``]
561
562 ``--auth.refresh-enabled, --auth.no-refresh-enabled``
563 Enable token refresh. [Default: ``True``]
564
565 ``--auth.allowed-origins, --auth.empty-allowed-origins``
566 List of allowed CORS origins.
567
568 .. _cyclopts-complex-cli-server-stop:
569
570 stop
571 ^^^^
572
573 ::
574
575 complex-cli server stop [OPTIONS]
576
577 Stop the server.
578
579 **Parameters:**
580
581 ``--graceful, --no-graceful``
582 Perform graceful shutdown. [Default: ``True``]
583
584 ``--timeout``
585 Shutdown timeout in seconds. [Default: ``30``]
586
587 ``--force, -f, --no-force``
588 Force immediate shutdown. [Default: ``False``]
589
590 .. _cyclopts-complex-cli-server-restart:
591
592 restart
593 ^^^^^^^
594
595 ::
596
597 complex-cli server restart [ARGS]
598
599 Restart the server.
600
601 **Parameters:**
602
603 ``ROLLING, --rolling, --no-rolling``
604 Perform rolling restart (zero downtime). [Default: ``False``]
605
606 ``DELAY, --delay``
607 Delay between worker restarts in seconds. [Default: ``5``]
608
609 .. _cyclopts-complex-cli-cache:
610
611
612 Cache management commands.
613
614 **Commands:**
615
616 ``clear``
617 Clear cache entries.
618
619 ``configure``
620 Configure cache settings.
621
622 ``stats``
623 Show cache statistics.
624
625 .. _cyclopts-complex-cli-cache-configure:
626
627 configure
628 ^^^^^^^^^
629
630 ::
631
632 complex-cli cache configure [OPTIONS]
633
634 Configure cache settings.
635
636 Demonstrates attrs class support for CLI parameters.
637
638 **Parameters:**
639
640 ``--config.backend``
641 Cache backend type. [Choices: ``memory``, ``redis``, ``memcached``, ``disk``, Default: ``memory``]
642
643 ``--config.ttl``
644 Time-to-live in seconds. [Default: ``300``]
645
646 ``--config.max-size``
647 Maximum cache size in MB. [Default: ``1024``]
648
649 ``--config.compression, --config.no-compression``
650 Enable compression. [Default: ``False``]
651
652 .. _cyclopts-complex-cli-cache-clear:
653
654 clear
655 ^^^^^
656
657 ::
658
659 complex-cli cache clear [ARGS]
660
661 Clear cache entries.
662
663 **Parameters:**
664
665 ``PATTERN, --pattern``
666 Pattern to match cache keys. [Default: ``*``]
667
668 ``DRY-RUN, --dry-run, --no-dry-run``
669 Show what would be cleared without actually clearing. [Default: ``False``]
670
671 .. _cyclopts-complex-cli-cache-stats:
672
673 stats
674 ^^^^^
675
676 ::
677
678 complex-cli cache stats [ARGS]
679
680 Show cache statistics.
681
682 **Parameters:**
683
684 ``DETAILED, --detailed, --no-detailed``
685 Show detailed statistics. [Default: ``False``]
686
687 ``FORMAT, --format``
688 Output format. [Choices: ``json``, ``yaml``, ``table``, ``csv``, Default: ``table``]
689
690 .. _cyclopts-complex-cli-complex-types:
691
692
693 ::
694
695 complex-cli complex-types [ARGS]
696
697 Demonstrate complex type annotations.
698
699 This command showcases various complex type patterns that the
700 documentation system needs to handle correctly.
701
702 **Parameters:**
703
704 ``WORKER-COUNT, --worker-count``
705 Number of workers or "auto" for automatic detection. [Choices: ``auto``, Default: ``auto``]
706
707 ``QUALITY, --quality``
708 Quality preset or "custom" for manual configuration. [Choices: ``low``, ``medium``, ``high``, ``custom``, Default: ``medium``]
709
710 ``TAGS, --tags, --empty-tags``
711 Optional list of tags.
712
713 ``FORMATS, --formats, --empty-formats``
714 List of output formats. [Choices: ``json``, ``yaml``, ``table``, ``csv``, Default: ``[json]``]
715
716 ``THRESHOLDS, --thresholds, --empty-thresholds``
717 Threshold values or "default" for defaults. [Choices: ``default``, Default: ``default``]
718
719 ``CONFIG-PATH, --config-path``
720 Optional config file path (must exist if provided).
721
722 .. _cyclopts-complex-cli-numpy-style:
723
724
725 ::
726
727 complex-cli numpy-style NAME [ARGS]
728
729 Command with NumPy-style docstring.
730
731 This command demonstrates NumPy docstring format which is the
732 default for cyclopts.
733
734 **Parameters:**
735
736 ``NAME, --name``
737 The name parameter. [**Required**]
738
739 ``COUNT, --count``
740 The count parameter, by default 1. [Default: ``1``]
741
742 .. _cyclopts-complex-cli-google-style:
743
744
745 ::
746
747 complex-cli google-style NAME [ARGS]
748
749 Command with Google-style docstring.
750
751 This command demonstrates Google docstring format.
752
753 **Parameters:**
754
755 ``NAME, --name``
756 The name parameter. [**Required**]
757
758 ``COUNT, --count``
759 The count parameter. Defaults to 1. [Default: ``1``]
760
761 .. _cyclopts-complex-cli-sphinx-style:
762
763
764 ::
765
766 complex-cli sphinx-style NAME [ARGS]
767
768 Command with Sphinx-style docstring.
769
770 This command demonstrates Sphinx/reST docstring format.
771
772 **Parameters:**
773
774 ``NAME, --name``
775 The name parameter. [**Required**]
776
777 ``COUNT, --count``
778 The count parameter. [Default: ``1``]
779
780 .. _cyclopts-complex-cli-secret-feature:
781
782
783 ::
784
785 complex-cli secret-feature [ARGS]
786
787 Secret feature command.
788
789 This command has a hidden parameter.
790
791 **Parameters:**
792
793 ``ENABLE, --enable, --no-enable``
794 Enable the secret feature. [Default: ``False``]