spec-ai-cli
Command-line interface and REPL for the spec-ai framework.
Overview
This crate provides the user-facing CLI and interactive REPL for interacting with AI agents. Features include:
- Interactive REPL: Terminal-based chat interface
- Spec Runner: Execute structured task specifications
- Multi-Agent Support: Switch between different agent profiles
- Rich Terminal UI: Markdown rendering, syntax highlighting, and color themes
- Command System: Built-in commands for session management
Features
The CLI supports all core features through feature flags:
Default Features
openai- OpenAI API integrationlmstudio- LM Studio local modelsweb-scraping- Web scraping capabilitiesvttrs- Video/subtitle processingapi- HTTP API server integration
Optional Features
anthropic- Anthropic Claude APIollama- Ollama local modelsmlx- Apple MLX frameworkbundled- Bundled DuckDB (recommended)duck-sys- System DuckDB library
Installation
# Install from source
# Or use cargo-binstall
Usage
# Start interactive session
# Use custom config
# Run a spec file
# Show help
REPL Commands
Within the interactive session:
/spec run <file>- Execute a spec file/help- Show available commands/exitorCtrl+D- Exit the session
Structured Specs
Create reusable task specifications in .spec files:
= "Example Task"
= "Demonstrate spec file usage"
= [
"Step 1: Do something",
"Step 2: Do something else"
]
= [
"Output artifact",
"Documentation"
]
Run with:
Dependencies
This crate depends on:
spec-ai-core- Core agent runtimespec-ai-config- Configuration managementspec-ai-policy- Policy enforcementspec-ai-api- API server (optional)
Development
Run from source:
For detailed documentation, see:
docs/SETUP.md- Setup instructionsdocs/CONFIGURATION.md- Configuration guide- Main spec-ai README