The Agama CLI serves two primary use cases, each with distinct functional requirements.
Using the CLI within user scripts to create powerful automated workflows where an Agama profile is insufficient or requires specific integration into the user's environment.
Requirements:
- Non-interactive: Must run without requiring manual input.
- Clear error reporting: Transparent error messages and meaningful exit codes.
- Processable I/O: Easily machine-readable input and output (e.g., JSON).
- High observability: Scripts must be able to track state and progress to control the workflow effectively.
- Backward compatibility: Ensuring updates do not break existing automation.
Using the CLI as an alternative to the web interface when environment or security restrictions prevent using a browser.
Requirements:
- Strong UX: Intuitive and easy to navigate for human operators.
- Decision support: Provide enough information for the user to make informed deployment decisions.
- Safety mechanisms: Confirmations for all destructive operations.
- Terminal flexibility: Support for colors and special characters while respecting restricted terminals on legacy platforms.
- Powerful commands: High-level commands that prevent users from needing a fragmented chain of commands (e.g., separate commands for config, status, and questions).
- Invisible Blockers: No way to see a comprehensive list of issues preventing an installation.
- Rigid Question Handling: Questions can only be listed via dedicated commands and answered via JSON (they are not integrated into the standard command flow).
- Vague Status: No easy way to see the current state of the installer (e.g., if it is waiting for an answer, processing, or finished successfully).
- Lack of Proposals: No way to get a pre-installation summary, such as which disks will be modified.
- Confusing Messaging: The "config validated" note is ambiguous.
- Inconsistent Output: Only a portion of the commands offer easily processable output.
- Fragmented Experience: Overall command structure feels inconsistent.
- Missing Information: Inability to list available products, patterns, or packages.
The following improvements aim to address these pain points and align with the core requirements:
- Auto-mode for Questions: Use by default an "auto mode" for questions when running in non-interactive mode.
- Question Exit Codes: Alternatively, use a dedicated exit code when a question arises in non-interactive mode to signal the script.
- Agama Status Command: Implement a
statuscommand to print the installation stage, a list of issues, and pending questions. - Clearer Validation: Reword validation messages to be more specific, such as "Syntax is correct."
- Dynamic Issue Reporting: When loading or editing a configuration, print new issues that appear. (Should we also print issues that were fixed?)
- Installation Summaries: In interactive mode,
agama installshould print an installation summary and require user confirmation. - Proactive Error Checks:
agama installshould explicitly print any blocking issues before starting and exit with proper exit code. - Inline Prompts: If a question arises in interactive mode, it should be asked directly in the CLI to allow the user to answer immediately.
- Useful Version: Add
agama versioncommand that returns useful information about agama version including DUD/self-update usage. - Monitor Improvements:
agama monitordeserve a bit lowe to show more visually appealing progress.
I don't think so. Cognitive overhead for almost no benefit (I even would say none). Just output issues, if any, present after each operation. This implicitly means that previous displayed issues not rendered again were fixed.