CLI Design
Overview
Section titled “Overview”The Command Line Interface (CLI) is the primary entry point for the user. It must be intuitive, fast, and adhere to standard Unix conventions.
1. Global Flags
Section titled “1. Global Flags”-v, --verbose: Enable debug logging (INFO/DEBUG levels).-q, --quiet: Suppress all output except errors.-c, --config <PATH>: Path to a customthemis.yaml(default:~/.config/themis/themis.yaml).--dry-run: Simulate actions (rendering templates, resolving vars) without writing to disk or executing commands.
2. Commands
Section titled “2. Commands”2.1. load (Primary Command)
Section titled “2.1. load (Primary Command)”Applies a specific profile.
themis load <PROFILE_NAME>- Arguments:
<PROFILE_NAME>: The name of the profile file (without extension) in~/.config/themis/profiles/.
- Options:
--dry-run: Simulate actions.--only <APP>: Apply only to a specific enrolled app.--exclude <APP>: Skip a specific enrolled app.
Example:
themis load nordthemis load darkthemis load work --dry-run2.2. list
Section titled “2.2. list”Lists available resources.
themis list [profiles|integrations]- profiles: Lists all valid YAML files in the profiles directory.
- integrations: Lists all enrolled apps and their status.
2.3. status
Section titled “2.3. status”Shows the current state.
themis status- Output:
- Current Profile:
nord - Last Updated:
2023-10-27 10:00:00 - Enrolled Apps:
foot,gtk
- Current Profile:
2.4. init
Section titled “2.4. init”Scaffolds the configuration directory.
themis init- Creates
~/.config/themis/ - Creates
~/.config/themis/profiles/ - Writes a default
themis.yaml - Writes a sample
profiles/default.yaml
2.5. verify
Section titled “2.5. verify”Validates the configuration and presets.
themis verify- Checks for syntax errors in YAML files.
- Checks for broken symlinks or missing templates.
- Verifies that all enrolled apps have a valid integration definition.
3. Output Format
Section titled “3. Output Format”- Success: Minimal output.
✓ Loaded preset 'nord' - Error: Clear, actionable error messages.
Error: Preset 'foobar' not found in ~/.config/themis/presets/Error: Integration 'foot' requires variable 'bg' which is missing in preset 'nord'.