π» CLI Commands API
The SuperOptiX CLI provides a comprehensive command-line interface for managing agents, models, and orchestras. This API documents all available commands and their usage.
Main CLI Entry Point
super
The main CLI command that provides access to all SuperOptiX functionality.
Global Options:
- --version
: Show version and exit
- --help
: Show help message and exit
- --verbose
: Enable verbose output
- --config
: Path to configuration file
- --log-level
: Set logging level (DEBUG, INFO, WARNING, ERROR)
Agent Commands
super agent
Manage SuperOptiX agents and their lifecycle.
super agent init
Initialize a new SuperOptiX project.
Arguments:
- PROJECT_NAME
: Name of the project to create
Options:
- --template
: Template to use (basic, advanced, custom)
- --tier
: Agent tier (oracles, genies, sage)
- --model
: Default model to use
- --backend
: Model backend (ollama, mlx, huggingface, lmstudio)
- --tools
: Comma-separated list of tools to include
- --memory
: Enable memory system
- --rag
: Enable RAG integration
- --output-dir
: Output directory for project files
Example:
super agent create
Create a new agent from specification.
Arguments:
- AGENT_NAME
: Name of the agent to create
Options:
- --spec
: Path to agent specification file
- --template
: Template to use
- --tier
: Agent tier
- --model
: Model to use
- --tools
: Tools to include
- --output
: Output file path
Example:
super agent compile
Compile an agent specification to executable code.
Arguments:
- SPEC_FILE
: Path to agent specification file
Options:
- --output
: Output file path
- --format
: Output format (python, yaml, json)
- --validate
: Validate specification before compilation
- --optimize
: Enable optimization during compilation
Example:
super agent run
Run an agent with a query.
Arguments:
- AGENT_PATH
: Path to agent file or specification
- QUERY
: Query to run
Options:
- --config
: Agent configuration file
- --model
: Override model
- --tools
: Override tools
- --memory
: Enable memory
- --tracing
: Enable tracing
- --output
: Output file for results
Example:
super agent evaluate
Evaluate an agent with test data.
Arguments:
- AGENT_PATH
: Path to agent file or specification
Options:
- --test-data
: Path to test data file
- --metrics
: Comma-separated list of metrics
- --scenarios
: Path to BDD scenarios file
- --output
: Output file for evaluation results
- --format
: Output format (json, csv, html)
- --threshold
: Pass/fail threshold
- --ci
: CI/CD mode with exit codes
Example:
super agent evaluate my_agent.py --test-data test_data.json --metrics semantic_f1,exact_match --ci
super agent optimize
Optimize an agent with training data.
Arguments:
- AGENT_PATH
: Path to agent file or specification
Options:
- --training-data
: Path to training data file
- --strategy
: Optimization strategy (BootstrapFewShot, ReAct)
- --iterations
: Number of optimization iterations
- --output
: Output file for optimized agent
- --metrics
: Metrics to optimize for
- --validate
: Validate after optimization
Example:
super agent optimize my_agent.py --training-data train_data.json --strategy BootstrapFewShot --iterations 10
super agent list
List available agents.
Options:
- --format
: Output format (table, json, yaml)
- --filter
: Filter agents by criteria
- --sort
: Sort by field
- --limit
: Maximum number of agents to show
Example:
super agent info
Get information about an agent.
Arguments:
- AGENT_PATH
: Path to agent file or specification
Options:
- --format
: Output format (table, json, yaml)
- --detailed
: Show detailed information
Example:
Model Commands
super model
Manage language models and backends.
super model list
List available models.
Options:
- --backend
: Filter by backend
- --size
: Filter by model size
- --task
: Filter by model task
- --installed-only
: Show only installed models
- --format
: Output format (table, json, yaml)
- --verbose
: Show detailed information
Example:
super model install
Install a model.
Arguments:
- MODEL_NAME
: Name of the model to install
Options:
- --backend
: Target backend
- --force
: Force reinstall
- --progress
: Show progress bar
- --verify
: Verify installation
Example:
super model server
Start a model server.
Arguments:
- MODEL_NAME
: Name of the model to serve
Options:
- --backend
: Model backend
- --port
: Server port
- --host
: Server host
- --config
: Server configuration file
- --daemon
: Run as daemon
Example:
super model info
Get information about a model.
Arguments:
- MODEL_NAME
: Name of the model
Options:
- --backend
: Model backend
- --format
: Output format (table, json, yaml)
Example:
super model remove
Remove an installed model.
Arguments:
- MODEL_NAME
: Name of the model to remove
Options:
- --backend
: Model backend
- --force
: Force removal
Example:
Marketplace Commands
super market
Access the SuperOptiX marketplace for agents and tools.
super market browse
Browse marketplace items.
Arguments:
- CATEGORY
: Category to browse (agents, tools, templates)
Options:
- --format
: Output format (table, json, yaml)
- --limit
: Maximum items to show
- --sort
: Sort by field
- --filter
: Filter by criteria
Example:
super market search
Search marketplace items.
Arguments:
- QUERY
: Search query
Options:
- --category
: Search category
- --format
: Output format
- --limit
: Maximum results
- --sort
: Sort by relevance or date
Example:
super market install
Install marketplace item.
Arguments:
- ITEM_NAME
: Name of the item to install
Options:
- --version
: Item version
- --output-dir
: Output directory
- --verify
: Verify installation
- --dependencies
: Install dependencies
Example:
super market info
Get information about marketplace item.
Arguments:
- ITEM_NAME
: Name of the item
Options:
- --version
: Item version
- --format
: Output format
Example:
SuperSpec Commands
super spec
Manage SuperSpec specifications and DSL.
super spec validate
Validate a SuperSpec specification.
Arguments:
- SPEC_FILE
: Path to specification file
Options:
- --schema
: Custom schema file
- --strict
: Strict validation mode
- --output
: Output file for validation results
Example:
super spec generate
Generate code from SuperSpec specification.
Arguments:
- SPEC_FILE
: Path to specification file
Options:
- --output
: Output file path
- --template
: Template to use
- --format
: Output format (python, yaml, json)
- --validate
: Validate before generation
Example:
super spec lint
Lint a SuperSpec specification.
Arguments:
- SPEC_FILE
: Path to specification file
Options:
- --rules
: Custom linting rules file
- --output
: Output file for linting results
- --fix
: Auto-fix issues where possible
Example:
Orchestra Commands
super orchestra
Manage multi-agent orchestras.
super orchestra create
Create a new orchestra.
Arguments:
- ORCHESTRA_NAME
: Name of the orchestra
Options:
- --config
: Orchestra configuration file
- --agents
: Comma-separated list of agent paths
- --workflow
: Workflow type (pipeline, broadcast, conditional)
- --output
: Output file path
Example:
super orchestra run
Run an orchestra.
Arguments:
- ORCHESTRA_PATH
: Path to orchestra file
Options:
- --input
: Input data file
- --config
: Orchestra configuration
- --workflow
: Override workflow type
- --output
: Output file for results
- --monitor
: Enable monitoring
Example:
super orchestra list
List available orchestras.
Options:
- --format
: Output format
- --filter
: Filter orchestras
- --sort
: Sort by field
Example:
Observability Commands
super observability
Manage observability and monitoring.
super observability dashboard
Start observability dashboard.
Options:
- --port
: Dashboard port
- --host
: Dashboard host
- --traces-dir
: Traces directory
- --config
: Dashboard configuration
Example:
super observability traces
Manage trace data.
Commands:
- list
: List available traces
- show
: Show trace details
- export
: Export traces
- clear
: Clear traces
Example:
super observability metrics
Manage metrics.
Commands:
- list
: List available metrics
- show
: Show metric values
- export
: Export metrics
- reset
: Reset metrics
Example:
Configuration Commands
super config
Manage SuperOptiX configuration.
super config show
Show current configuration.
Options:
- --format
: Output format
- --section
: Show specific section
Example:
super config set
Set configuration value.
Arguments:
- KEY
: Configuration key
- VALUE
: Configuration value
Options:
- --global
: Set global configuration
- --project
: Set project configuration
Example:
super config get
Get configuration value.
Arguments:
- KEY
: Configuration key
Options:
- --global
: Get global configuration
- --project
: Get project configuration
Example:
super config reset
Reset configuration to defaults.
Options:
- --global
: Reset global configuration
- --project
: Reset project configuration
- --confirm
: Skip confirmation prompt
Example:
Utility Commands
super utils
Utility commands for common tasks.
super utils validate
Validate SuperOptiX installation.
Options:
- --check-models
: Check model availability
- --check-backends
: Check backend availability
- --check-tools
: Check tool availability
- --output
: Output file for validation results
Example:
super utils cleanup
Clean up temporary files and caches.
Options:
- --traces
: Clean up trace files
- --models
: Clean up model caches
- --logs
: Clean up log files
- --all
: Clean up everything
- --confirm
: Skip confirmation prompt
Example:
super utils export
Export SuperOptiX data.
Arguments:
- DATA_TYPE
: Type of data to export (agents, models, traces, config)
Options:
- --output
: Output file path
- --format
: Export format (json, yaml, csv)
- --filter
: Filter data
Example:
Environment Variables
The SuperOptiX CLI supports various environment variables for configuration:
# Model configuration
SUPEROPTIX_DEFAULT_BACKEND=ollama
SUPEROPTIX_DEFAULT_MODEL=llama3.2:8b
SUPEROPTIX_MODEL_CACHE_DIR=/path/to/cache
# API keys
SUPEROPTIX_OPENAI_API_KEY=your_openai_key
SUPEROPTIX_ANTHROPIC_API_KEY=your_anthropic_key
SUPEROPTIX_WEB_SEARCH_API_KEY=your_search_key
# Logging
SUPEROPTIX_LOG_LEVEL=INFO
SUPEROPTIX_LOG_FILE=/path/to/logs
# Tracing
SUPEROPTIX_TRACES_DIR=/path/to/traces
SUPEROPTIX_ENABLE_TRACING=true
# Memory
SUPEROPTIX_MEMORY_BACKEND=sqlite
SUPEROPTIX_MEMORY_PATH=/path/to/memory
# Development
SUPEROPTIX_DEV_MODE=true
SUPEROPTIX_DEBUG=true
Configuration Files
Global Configuration
Located at ~/.superoptix/config.yaml
:
models:
default_backend: ollama
default_model: llama3.2:8b
cache_dir: ~/.superoptix/models
tools:
default_tools:
- WebSearchTool
- CalculatorTool
api_keys:
web_search: ${WEB_SEARCH_API_KEY}
memory:
default_backend: sqlite
default_path: ~/.superoptix/memory
observability:
traces_dir: ~/.superoptix/traces
enable_tracing: true
log_level: INFO
development:
dev_mode: false
debug: false
Project Configuration
Located at ./superoptix.yaml
:
project:
name: my_project
version: 1.0.0
description: My SuperOptiX project
agents:
- name: my_agent
file: agents/my_agent.py
tier: genies
model: llama3.2:8b
orchestras:
- name: my_orchestra
file: orchestras/my_orchestra.yaml
workflow: pipeline
tools:
- name: custom_tool
file: tools/custom_tool.py
memory:
backend: sqlite
path: ./memory
evaluation:
test_data: ./test_data.json
scenarios: ./scenarios.yaml
metrics:
- semantic_f1
- exact_match
Exit Codes
The SuperOptiX CLI uses the following exit codes:
0
: Success1
: General error2
: Configuration error3
: Validation error4
: Model error5
: Agent error6
: Evaluation failure7
: Optimization error8
: Network error9
: Permission error10
: Resource error
Examples
Complete Workflow
# Initialize project
super agent init my_project --tier genies --model llama3.2:8b
# Create agent
super agent create my_agent --spec agent_spec.yaml
# Compile agent
super agent compile agent_spec.yaml --output my_agent.py
# Run agent
super agent run my_agent.py "Hello, world!"
# Evaluate agent
super agent evaluate my_agent.py --test-data test_data.json --ci
# Optimize agent
super agent optimize my_agent.py --training-data train_data.json
# Create orchestra
super orchestra create my_orchestra --agents agent1.py,agent2.py --workflow pipeline
# Run orchestra
super orchestra run my_orchestra.yaml --input data.json
# Monitor with dashboard
super observability dashboard --port 8080
CI/CD Integration
# Validate specification
super spec validate agent.yaml --strict
# Run evaluation with CI mode
super agent evaluate agent.py --test-data test_data.json --ci --threshold 0.8
# Check exit code
if [ $? -eq 6 ]; then
echo "Evaluation failed"
exit 1
fi