spec-ai-cli

Crates.iospec-ai-cli
lib.rsspec-ai-cli
version0.6.0-prerelease.12
created_at2025-11-25 00:14:08.298888+00
updated_at2026-01-04 05:07:26.140505+00
descriptionA framework for building AI agents with structured outputs, policy enforcement, and execution tracking
homepage
repositoryhttps://github.com/geoffsee/spec-ai
max_upload_size
id1948937
size240,918
Geoff Seemueller (geoffsee)

documentation

https://docs.rs/spec-ai

README

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 integration
  • lmstudio - LM Studio local models
  • web-scraping - Web scraping capabilities
  • vttrs - Video/subtitle processing
  • api - HTTP API server integration

Optional Features

  • anthropic - Anthropic Claude API
  • ollama - Ollama local models
  • mlx - Apple MLX framework
  • bundled - Bundled DuckDB (recommended)
  • duck-sys - System DuckDB library

Installation

# Install from source
cargo install spec-ai --features bundled

# Or use cargo-binstall
cargo binstall spec-ai --features bundled

Usage

# Start interactive session
spec-ai

# Use custom config
spec-ai --config /path/to/config.toml

# Run a spec file
spec-ai run my-task.spec

# Show help
spec-ai --help

REPL Commands

Within the interactive session:

  • /spec run <file> - Execute a spec file
  • /help - Show available commands
  • /exit or Ctrl+D - Exit the session

Structured Specs

Create reusable task specifications in .spec files:

name = "Example Task"
goal = "Demonstrate spec file usage"

tasks = [
  "Step 1: Do something",
  "Step 2: Do something else"
]

deliverables = [
  "Output artifact",
  "Documentation"
]

Run with:

spec-ai run example.spec

Dependencies

This crate depends on:

  • spec-ai-core - Core agent runtime
  • spec-ai-config - Configuration management
  • spec-ai-policy - Policy enforcement
  • spec-ai-api - API server (optional)

Development

Run from source:

cargo run -p spec-ai-cli

For detailed documentation, see:

Commit count: 0

cargo fmt