Arc CLI is built with a modular architecture for maintainability and extensibility.
arc-cli/
├── src/
│ ├── main.rs # Entry point
│ ├── config.rs # Configuration management
│ ├── commands.rs # Slash command handling
│ ├── agent/
│ │ └── mod.rs # Main agent loop
│ ├── llm/
│ │ ├── mod.rs # LLM trait definition
│ │ └── groq.rs # Groq API client
│ └── ui/
│ └── mod.rs # Terminal UI
├── Cargo.toml
├── README.md
└── LICENSE
- Loads/saves configuration from
~/.arc/config.toml - Defines available models list
- Trait-based design for multiple providers
- Streaming response support
- SSE parsing for real-time output
- Main REPL loop
- Slash command integration
- Message history management
- Terminal styling and formatting
- Progress spinners
- Input/output handling
Edit AVAILABLE_MODELS in src/config.rs:
pub const AVAILABLE_MODELS: &[(&str, &str)] = &[
("model-id", "Display Name"),
// Add more here
];- Create
src/llm/provider_name.rs - Implement the
LLMClienttrait - Add provider selection logic in
agent/mod.rs