CLI Options
Synopsis
Section titled “Synopsis”msh [options] [query]Options
Section titled “Options”Query & Execution
Section titled “Query & Execution”| Option | Description |
|---|---|
<query> |
Natural language query to translate |
-x, --execute |
Translate and execute the command immediately |
-n, --dry-run |
Show command with safety analysis, don’t execute |
-r, --repo-context |
Use project context for this query |
Configuration
Section titled “Configuration”| Option | Description |
|---|---|
--setup |
Run the setup wizard for API key configuration |
--provider <name> |
Set AI provider (opencode-zen, openrouter, vercel-ai-gateway, cloudflare-ai-gateway, or workers-ai) |
--model <id> |
Set default model (including custom models) |
--models |
List available models for current provider |
--add-model |
Add custom model (LM Studio, Ollama, etc.) |
--list-custom |
List custom models |
--remove-model <id> |
Remove custom model |
--theme <name> |
Set color theme |
--themes |
List available themes |
--safety <level> |
Set safety level (strict, moderate, relaxed) |
--thinking <level> |
Set thinking level (off, low, medium, high) |
Information
Section titled “Information”| Option | Description |
|---|---|
-h, --help |
Show help message |
-v, --version |
Show version number |
Examples
Section titled “Examples”Basic Translation
Section titled “Basic Translation”# Translate a query (prints the command)msh "list all javascript files"
# Output: find . -name "*.js"Execute Immediately
Section titled “Execute Immediately”# Translate and runmsh -x "show current git branch"
# Executes: git branch --show-currentDry Run
Section titled “Dry Run”# See command with safety analysismsh -n "delete all node_modules folders"
# Shows:# Command: find . -name "node_modules" -type d -prune -exec rm -rf {} +# Severity: medium# Reason: Recursive deletion operationInteractive TUI Mode
Section titled “Interactive TUI Mode”# Launch the interactive TUImshellChange Provider
Section titled “Change Provider”# Switch to OpenRoutermsh --provider openrouter
# Switch back to OpenCode Zenmsh --provider opencode-zen
# Switch to Vercel AI Gatewaymsh --provider vercel-ai-gateway
# Switch to Cloudflare AI Gatewaymsh --provider cloudflare-ai-gateway
# Switch to Workers AImsh --provider workers-aiChange Model
Section titled “Change Model”# List available modelsmsh --models
# Set default modelmsh --model anthropic/claude-sonnet-latest
# Set a custom modelmsh --model my-local-llamaCustom Models
Section titled “Custom Models”# Add a custom model (interactive wizard)msh --add-model
# List custom modelsmsh --list-custom
# Remove a custom modelmsh --remove-model my-local-llamaChange Theme
Section titled “Change Theme”# List themesmsh --themes
# Set thememsh --theme draculaSetup Wizard
Section titled “Setup Wizard”# Configure API key and preferencesmsh --setupExit Codes
Section titled “Exit Codes”| Code | Description |
|---|---|
0 |
Success |
1 |
General error |
2 |
Invalid arguments |
3 |
API error |
4 |
Command blocked by safety system |
Environment Variables
Section titled “Environment Variables”| Variable | Description |
|---|---|
OPENCODE_ZEN_API_KEY |
API key for OpenCode Zen provider |
OPENROUTER_API_KEY |
API key for OpenRouter provider |
AI_GATEWAY_API_KEY |
API key for Vercel AI Gateway |
CLOUDFLARE_AI_GATEWAY_API_KEY |
API key/token for Cloudflare AI Gateway |
CLOUDFLARE_API_TOKEN |
API token for Workers AI |
CLOUDFLARE_ACCOUNT_ID |
Account ID for Cloudflare providers |
CLOUDFLARE_AI_GATEWAY_ID |
Gateway ID for Cloudflare AI Gateway |
DEBUG_API=1 |
Enable API debugging output |
Commands
Section titled “Commands”| Command | Purpose |
|---|---|
msh |
CLI mode - quick one-off translations |
mshell |
TUI mode - interactive interface with themes, history, shortcuts |