printHelp function
void
printHelp()
Print help text.
Implementation
void printHelp() {
stdout.writeln('''
Neomage — Multi-provider AI agent engine
Usage: neomage [options] [prompt]
Options:
-p, --prompt <text> Initial prompt to send
-m, --model <name> Model to use (default: auto-detect)
-k, --api-key <key> API key (or set ANTHROPIC_API_KEY)
--api-endpoint <url> API endpoint URL
--headless Run without UI (CI/CD mode)
-v, --verbose Verbose output
--version Show version
-h, --help Show this help
--no-color Disable colored output
-s, --session <id> Session ID
-r, --resume <id> Resume a previous session
-C, --directory <path> Working directory
-f, --file <path> Include file (can be repeated)
-e, --env <KEY=VALUE> Set environment variable
-o, --output-format <fmt> Output format: text, json, stream
--max-tokens <n> Maximum response tokens
Environment Variables:
ANTHROPIC_API_KEY API key for Anthropic
OPENAI_API_KEY API key for OpenAI-compatible
MAGE_MODEL Default model name
MAGE_API_ENDPOINT Default API endpoint
MAGE_CLI_MODE Force CLI mode
MAGE_NO_COLOR Disable colors
Examples:
neomage "fix the bug in main.dart"
neomage -m sonnet -p "refactor this function"
echo "explain this code" | neomage
neomage --headless -p "run tests and fix failures"
''');
}