CLI Reference
Complete reference for Clew Code command-line flags and arguments.
Usage
clew [flags]
clew [command] [flags]
Global Flags
| Flag | Description |
-p, --prompt <text> | One-shot mode: run a prompt in non-interactive mode and exit |
--resume <id> | Resume a previous session by ID. Use last for the most recent session |
--version | Print version and exit |
--help | Show help message |
Exec Commands
| Command | Description |
clew . <prompt> | Run prompt in current directory |
Environment Variables
| Variable | Description |
ANTHROPIC_API_KEY | Anthropic Claude API key |
OPENAI_API_KEY | OpenAI API key |
GOOGLE_API_KEY | Google Gemini API key |
DEEPSEEK_API_KEY | DeepSeek API key |
GROQ_API_KEY | Groq API key |
MISTRAL_API_KEY | Mistral API key |
OPENROUTER_API_KEY | OpenRouter API key |
OLLAMA_HOST | Ollama server URL (default: http://localhost:11434) |
SEARXNG_URL | SearXNG instance URL |
SENTRY_DSN | Sentry DSN for error tracking |
GROWTHBOOK_API_KEY | GrowthBook API key for feature flags |
Exit Codes
| Code | Meaning |
0 | Success |
1 | General error |