Skip to content

CLI Options

Terminal window
msh [options] [query]
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
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)
Option Description
-h, --help Show help message
-v, --version Show version number
Terminal window
# Translate a query (prints the command)
msh "list all javascript files"
# Output: find . -name "*.js"
Terminal window
# Translate and run
msh -x "show current git branch"
# Executes: git branch --show-current
Terminal window
# See command with safety analysis
msh -n "delete all node_modules folders"
# Shows:
# Command: find . -name "node_modules" -type d -prune -exec rm -rf {} +
# Severity: medium
# Reason: Recursive deletion operation
Terminal window
# Launch the interactive TUI
mshell
Terminal window
# Switch to OpenRouter
msh --provider openrouter
# Switch back to OpenCode Zen
msh --provider opencode-zen
# Switch to Vercel AI Gateway
msh --provider vercel-ai-gateway
# Switch to Cloudflare AI Gateway
msh --provider cloudflare-ai-gateway
# Switch to Workers AI
msh --provider workers-ai
Terminal window
# List available models
msh --models
# Set default model
msh --model anthropic/claude-sonnet-latest
# Set a custom model
msh --model my-local-llama
Terminal window
# Add a custom model (interactive wizard)
msh --add-model
# List custom models
msh --list-custom
# Remove a custom model
msh --remove-model my-local-llama
Terminal window
# List themes
msh --themes
# Set theme
msh --theme dracula
Terminal window
# Configure API key and preferences
msh --setup
Code Description
0 Success
1 General error
2 Invalid arguments
3 API error
4 Command blocked by safety system
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
Command Purpose
msh CLI mode - quick one-off translations
mshell TUI mode - interactive interface with themes, history, shortcuts