Architecture
Nelson CLI is built with a modular architecture:Core Components
NelsonAI Class
The main interface to Claude’s API.TerminalUI Class
Handles all terminal output and input.NelsonLoop Class
Manages iterative development loops.API Communication
Nelson uses the Anthropic SDK to communicate with Claude:Message Format
Messages are stored in the conversation history:Tool Use Flow
When Nelson uses a tool:Environment Variables
| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY | Yes | Your Anthropic API key |
Dependencies
| Package | Purpose |
|---|---|
@anthropic-ai/sdk | Claude API client |
chalk | Terminal colors |
boxen | Box drawing |
ora | Spinners |
gradient-string | Gradient text |
terminal-kit | Advanced terminal features |
