CLI Command Reference
Comprehensive guide to all available CLI commands and their usage.
Migraine is a robust CLI tool used to organize and automate complex workflows with templated commands. This reference documents all available commands and their usage.
Global Options
--version
,-v
: Print the version number--help
,-h
: Display help information for any command
Basic Commands
migraine
or mgr
The base command displays the ASCII art logo and current version information.
Workflow Management
Template Commands
Add New Template
Creates a new workflow template from a JSON file. The template name will be derived from the filename.
List Templates
Displays all available workflow templates.
Delete Template
Removes a template from the system.
Load Remote Template
Loads a workflow template from a remote URL.
Workflow Commands
Create New Workflow
Creates a new workflow from an existing template. The command will:
- Display available templates
- Prompt for template selection
- Request workflow name
- Handle any required variables
List Workflows
Shows all available workflows with their details including:
- Workflow name and ID
- Description
- Pre-checks
- Steps
- Actions
- Required variables
- Available actions
Delete Workflow
Removes a workflow from the system.
Workflow Information
Displays detailed information about a specific workflow including:
- Pre-checks
- Steps
- Actions
- Required variables
- Usage examples
Displays detailed information about a workflow including:
- Name and ID
- Description
- Pre-checks with their commands
- Steps with their commands
- Available actions and their commands
- Required variables with usage instructions
- Command examples for running each action
Output example:
Running Workflows
Run Workflow
Options:
-v, --var KEY=VALUE
: Set variables for the workflow-a, --action ACTION_NAME
: Run specific action(s) instead of all steps
Examples:
Key-Value Store Management
View Store Logs
Displays recent logs from the key-value store (last 20 entries).
Workflow Template Format
Templates should be in JSON format with the following structure:
Variable Substitution
Variables in commands use the {{VARIABLE_NAME}}
syntax. Example:
When running the workflow, provide values using the -v
flag:
Understanding Workflows
In Migraine, workflows and templates serve different but complementary purposes. While templates are the blueprints, workflows are the concrete instances created from these templates with specific configurations and variable values.
Migraine vs. other tools
Comparison between Migraine and other tools for automating workflows.