Skip to content

CLI Design

The Command Line Interface (CLI) is the primary entry point for the user. It must be intuitive, fast, and adhere to standard Unix conventions.

  • -v, --verbose: Enable debug logging (INFO/DEBUG levels).
  • -q, --quiet: Suppress all output except errors.
  • -c, --config <PATH>: Path to a custom themis.yaml (default: ~/.config/themis/themis.yaml).
  • --dry-run: Simulate actions (rendering templates, resolving vars) without writing to disk or executing commands.

Applies a specific profile.

Terminal window
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:

Terminal window
themis load nord
themis load dark
themis load work --dry-run

Lists available resources.

Terminal window
themis list [profiles|integrations]
  • profiles: Lists all valid YAML files in the profiles directory.
  • integrations: Lists all enrolled apps and their status.

Shows the current state.

Terminal window
themis status
  • Output:
    • Current Profile: nord
    • Last Updated: 2023-10-27 10:00:00
    • Enrolled Apps: foot, gtk

Scaffolds the configuration directory.

Terminal window
themis init
  • Creates ~/.config/themis/
  • Creates ~/.config/themis/profiles/
  • Writes a default themis.yaml
  • Writes a sample profiles/default.yaml

Validates the configuration and presets.

Terminal window
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.
  • 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'.