Debian Codegraph @

tests/__snapshots__/test_docs_snapshots/TestRstSnapshots.test_full_app_rst.rst

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