File tree Expand file tree Collapse file tree 2 files changed +481
-0
lines changed
Expand file tree Collapse file tree 2 files changed +481
-0
lines changed Original file line number Diff line number Diff line change @@ -494,6 +494,17 @@ def parse_args(args=None):
494494 # help="Run an evaluation using a Hydra configuration. All arguments after 'run' are passed to Hydra.",
495495 # )
496496
497+ # Hidden command: export-docs (for generating CLI reference documentation)
498+ export_docs_parser = subparsers .add_parser (
499+ "export-docs" ,
500+ help = argparse .SUPPRESS , # Hidden from help output
501+ )
502+ export_docs_parser .add_argument (
503+ "--output-dir" ,
504+ default = "./docs/cli-reference" ,
505+ help = "Directory to write markdown files to (default: ./docs/cli-reference)" ,
506+ )
507+
497508 # Use parse_known_args to allow Hydra to handle its own arguments
498509 return parser .parse_known_args (args )
499510
@@ -623,6 +634,10 @@ def _extract_flag_value(argv_list, flag_name):
623634 from .cli_commands .local_test import local_test_command
624635
625636 return local_test_command (args )
637+ elif args .command == "export-docs" :
638+ from .cli_commands .export_docs import export_docs_command
639+
640+ return export_docs_command (args )
626641 # elif args.command == "run":
627642 # # For the 'run' command, Hydra takes over argument parsing.
628643 #
You can’t perform that action at this time.
0 commit comments