Index
Functionality for interaction with the CLI.
The cli package contains all of the functionality required
for user interaction with the command line interface (CLI).
It sets up an argument parser for the main mada-tools command
and subparsers for the various subcommands found in the commands
subpackage.
Subpackages
commands:
Sets up subcommands for the mada-tools command.
Modules:
| Name | Description |
|---|---|
ascii_art |
A file to store ASCII art that can be used in the CLI output. |
__getattr__(name)
Lazily expose CLI objects that import command implementations.
Importing an individual command module first executes this package
initializer. Keep the command registry lazy so lightweight commands such as
export-docs can be imported without loading every MCP server-management
command and its runtime dependencies.
Source code in mada_tools/cli/__init__.py
setup_logging(level='INFO', log_to_stdout=True, log_file=None)
Configure root logger for the entire application.
Called once when argparse is loaded up. Other modules should just use logging.getLogger(name).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
str
|
Log level name, for example: "DEBUG", "INFO", "WARNING". |
'INFO'
|
log_to_stdout
|
bool
|
If True, log to stdout. |
True
|
log_file
|
str | None
|
If given, also log to this file. |
None
|