CLI Reference

Complete reference for Clew Code command-line flags and arguments.

Usage

clew [flags]
clew [command] [flags]

Global Flags

FlagDescription
-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
--versionPrint version and exit
--helpShow help message

Exec Commands

CommandDescription
clew . <prompt>Run prompt in current directory

Environment Variables

VariableDescription
ANTHROPIC_API_KEYAnthropic Claude API key
OPENAI_API_KEYOpenAI API key
GOOGLE_API_KEYGoogle Gemini API key
DEEPSEEK_API_KEYDeepSeek API key
GROQ_API_KEYGroq API key
MISTRAL_API_KEYMistral API key
OPENROUTER_API_KEYOpenRouter API key
OLLAMA_HOSTOllama server URL (default: http://localhost:11434)
SEARXNG_URLSearXNG instance URL
SENTRY_DSNSentry DSN for error tracking
GROWTHBOOK_API_KEYGrowthBook API key for feature flags

Exit Codes

CodeMeaning
0Success
1General error