all2md.cli.commands.config
Configuration management commands for all2md CLI.
This module provides subcommands for generating, viewing, and validating configuration files for the all2md document conversion tool. It supports multiple configuration formats (TOML, JSON, YAML) and handles configuration priority resolution from multiple sources.
- all2md.cli.commands.config.save_config_to_file(args: Namespace, config_path: str) None
Save CLI arguments to a JSON configuration file.
- Parameters:
args (argparse.Namespace) – Parsed command line arguments
config_path (str) – Path to save the configuration file
- Raises:
Exception – If the configuration file cannot be written
- all2md.cli.commands.config.handle_config_generate_command(args: list[str] | None = None) int
Handle
config generateto create default configuration files.
- all2md.cli.commands.config.handle_config_show_command(args: list[str] | None = None) int
Handle
config showcommand to display effective configuration.
- all2md.cli.commands.config.handle_config_validate_command(args: list[str] | None = None) int
Handle config validate command to check configuration file syntax.
- Parameters:
args (list[str], optional) – Command line arguments (beyond ‘config validate’)
- Returns:
Exit code (0 for success, 1 for invalid config)
- Return type:
int
- all2md.cli.commands.config.handle_config_command(args: list[str] | None = None) int | None
Handle config subcommands.
- Parameters:
args (list[str], optional) – Command line arguments
- Returns:
Exit code if config command was handled, None otherwise
- Return type:
int or None