Manage UI themes for MCP CLI.
(
theme_name: str | None = typer.Argument(None, help="Theme name to switch to"),
list_themes: bool = typer.Option(
False, "--list", "-l", help="List all available themes"
),
select: bool = typer.Option(
False, "--select", "-s", help="Interactive theme selection"
),
quiet: bool = typer.Option(False, "-q", "--quiet", help="Suppress most log output"),
verbose: bool = typer.Option(
False, "-v", "--verbose", help="Enable verbose logging"
),
log_level: str = typer.Option("WARNING", "--log-level", help="Set log level"),
)
| 1374 | # Theme command - manage UI themes |
| 1375 | @app.command("theme", help="Manage UI themes for MCP CLI") |
| 1376 | def theme_command( |
| 1377 | theme_name: str | None = typer.Argument(None, help="Theme name to switch to"), |
| 1378 | list_themes: bool = typer.Option( |
| 1379 | False, "--list", "-l", help="List all available themes" |
| 1380 | ), |
| 1381 | select: bool = typer.Option( |
| 1382 | False, "--select", "-s", help="Interactive theme selection" |
| 1383 | ), |
| 1384 | quiet: bool = typer.Option(False, "-q", "--quiet", help="Suppress most log output"), |
| 1385 | verbose: bool = typer.Option( |
| 1386 | False, "-v", "--verbose", help="Enable verbose logging" |
| 1387 | ), |
| 1388 | log_level: str = typer.Option("WARNING", "--log-level", help="Set log level"), |
| 1389 | ) -> None: |
| 1390 | """Manage UI themes for MCP CLI.""" |
| 1391 | # Configure logging for this command |
| 1392 | _setup_command_logging( |
| 1393 | quiet, verbose, log_level, "default" |
| 1394 | ) # Start with default theme |
| 1395 | |
| 1396 | # Use unified command system via CLI adapter |
| 1397 | from mcp_cli.adapters.cli import cli_execute |
| 1398 | import asyncio |
| 1399 | |
| 1400 | async def _theme_wrapper(): |
| 1401 | return await cli_execute( |
| 1402 | "theme", |
| 1403 | theme_name=theme_name, |
| 1404 | list_themes=list_themes, |
| 1405 | select=select, |
| 1406 | ) |
| 1407 | |
| 1408 | # Execute theme command |
| 1409 | asyncio.run(_theme_wrapper()) |
| 1410 | |
| 1411 | |
| 1412 | direct_registered.append("theme") |
nothing calls this directly
no test coverage detected