We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2b0115 commit 4cf3195Copy full SHA for 4cf3195
1 file changed
src/mefai_cli/config.py
@@ -58,3 +58,12 @@ def get_api_key() -> str:
58
def get_ws_url() -> str:
59
"""Return the configured WebSocket URL."""
60
return str(load_config().get("ws_url", DEFAULT_CONFIG["ws_url"]))
61
+
62
63
+DEFAULT_OUTPUT_FORMAT = "table"
64
+SUPPORTED_FORMATS = {"table", "json", "csv", "yaml"}
65
66
67
+def validate_output_format(fmt: str) -> str:
68
+ """Ensure output format is supported, fallback to table."""
69
+ return fmt if fmt in SUPPORTED_FORMATS else DEFAULT_OUTPUT_FORMAT
0 commit comments