CLI Reference
All CLI flags and options.
Usage
aspectcode [options]Run in your project root. By default, analyzes the current directory and generates AGENTS.md.
Flags
| Flag | Description |
|---|---|
--once | Run once and exit (no watch mode) |
--kb | Also generate the Knowledge Base (.aspect/ directory) |
--dry-run | Preview without writing files (use with --once) |
--provider | LLM provider for optimizer (openai or anthropic) |
--model | Model override |
--max-iterations | Optimizer iterations (default: 3) |
--verbose | Debug output |
--root | Explicit workspace root |
--no-color | Plain text output |
--help | Show help |
--version | Show version |
Environment variables
| Variable | Description |
|---|---|
OPENAI_API_KEY | Enables LLM optimization via OpenAI |
ANTHROPIC_API_KEY | Enables LLM optimization via Anthropic |
When an API key is set, the evaluator and optimizer run automatically after static analysis. Without a key, AGENTS.md is generated through static analysis alone.