CLI Reference
Comprehensive reference for the Migraine CLI commands
Core Commands
migraine
The main entry point for the Migraine CLI. Shows version information and ASCII art when run without arguments.
migraine workflow
Manage workflows - create, list, run, validate, and get info about workflows.
migraine workflow init [name]
Create a new YAML workflow with comprehensive comments and documentation, or configure editor LSP integration.
--editor, -e
Configure editor LSP integration for .mg files. Options:
| Value | Behavior |
|---|---|
auto | Auto-detect installed editors and configure all of them |
vscode | Install Migraine VS Code extension |
neovim | Write lspconfig, ftdetect, and syntax files |
vim | Write ftdetect and syntax files |
helix | Append LSP config to languages.toml |
migraine workflow list
Show all workflows (both database and file-based).
migraine workflow validate [path]
Validate a workflow file.
migraine workflow run [name]
Execute a workflow.
migraine workflow pre-checks [name]
Run only the pre-checks section of a workflow.
migraine workflow info [name]
Show detailed information about a workflow.
migraine run [name]
Execute a workflow (v2 command - similar to workflow run but at top level).
migraine vars
Manage variables in the vault system.
migraine vars set [key] [value]
Store a variable in the vault.
migraine vars get [key]
Retrieve a variable value.
migraine vars list
List all variables.
migraine vars delete [key]
Remove a variable.
migraine version
Show version information in various formats.
migraine lsp
Start the Migraine Language Server Protocol server for editor integration.
This starts a JSON-RPC server on stdio. It is called automatically by configured editors — you do not need to run this manually. See Editor Setup for details.
migraine buildinfo
Show detailed build information.
Common Flags
Variable Flags
-v, --var- Set variables for workflow execution (format: KEY=VALUE)
Action Flags
-a, --action- Specify actions to run (instead of main steps)
Scope Flags
-s, --scope- Specify scope for variable operations (global, project, workflow)
Workflow Flags
-w, --workflow- Specify workflow for variable operations
Description Flags
-d, --description- Add description when creating workflows
Special Files
Configuration Files
Migraine looks for these project-level configuration files:
./migraine.yaml./migraine.yml./migraine.json./workflows/*.yaml./workflows/*.yml
Environment Files
.env- Default environment file./env/[workflow].env- Workflow-specific environment files
Exit Codes
0- Success1- General error2- Workflow or command not found3- Validation error4- Pre-check failure
Migraine