mirror of
https://github.com/nicolargo/glances.git
synced 2026-06-03 11:24:52 -04:00
Step 1 of the mode-dispatch refactor (plan ``docs/superpowers/plans/2026-05-15-glances-v5-phase2-g2.md``). This commit only introduces the flags + cross-flag validation; the dispatch wiring lands in Tasks 2 and 3. - ``-s`` / ``--server``: opt in to the REST API mode (headless). - ``--enable-mcp``: mount /mcp; requires ``--server`` — caught by ``validate_args`` with a clear stderr message + argparse exit 2. - ``--quiet`` / ``--no-tui``: kept (open point — see plan G2 §"Open points"). When passed together with ``-s`` an info log notes that the flag is redundant. - New ``validate_args`` helper called from ``main()`` after ``setup_logging``. 15 new tests in ``tests/test_cli_v5.py`` covering parser shape, defaults, alias spellings, and the validation rules.
3.9 KiB
3.9 KiB