CLI Usage GuideΒΆ
Ryoma AI provides a powerful command-line interface for interactive data analysis with intelligent agent routing.
π Starting the CLIΒΆ
# Basic usage
ryoma-ai
# With custom model and mode
ryoma-ai --model gpt-4o --mode enhanced
# Override store configurations
ryoma-ai --vector-store-type chroma --meta-store-type memory
# Run interactive setup
ryoma-ai --setup
π Available CommandsΒΆ
Core CommandsΒΆ
Command |
Description |
Example |
|---|---|---|
|
Show available commands |
|
|
Exit the CLI |
|
|
Display current configuration |
|
|
Run interactive setup |
|
Data Source ManagementΒΆ
Command |
Description |
Example |
|---|---|---|
|
List all configured data sources |
|
|
Switch to different data source |
|
|
Add new data source interactively |
|
|
Show current database schema |
|
Catalog ManagementΒΆ
Command |
Description |
Example |
|---|---|---|
|
Index current data source for search |
|
|
Search indexed catalogs |
|
Agent ManagementΒΆ
Command |
Description |
Example |
|---|---|---|
|
Show active agents and their stats |
|
|
Change SQL agent mode |
|
|
Change language model |
|
|
Show agent usage statistics |
|
ConfigurationΒΆ
Command |
Description |
Example |
|---|---|---|
|
Show/modify agent settings |
|
|
Update agent setting |
|
|
Toggle auto-approval |
|
π― Interactive UsageΒΆ
The CLI features intelligent agent routing - just ask questions naturally:
ryoma-ai> show me all customers from California
# Routes to SQL Agent automatically
ryoma-ai> create a function to calculate fibonacci numbers
# Routes to Python Agent automatically
ryoma-ai> analyze sales trends over the last 6 months
# Routes to Data Analysis Agent automatically
ryoma-ai> what's the difference between INNER and LEFT JOIN?
# Routes to Chat Agent automatically
π§ Configuration ManagementΒΆ
View Current ConfigurationΒΆ
ryoma-ai> /config
Update Agent SettingsΒΆ
ryoma-ai> /agent-config auto_approve_all true
ryoma-ai> /agent-config retry_count 3
ryoma-ai> /agent-config timeout_seconds 300
Switch Models and ModesΒΆ
ryoma-ai> /model gpt-4o-mini
ryoma-ai> /mode basic
π Catalog Indexing and SearchΒΆ
Index Your Data SourceΒΆ
# Index at table level (recommended)
ryoma-ai> /index-catalog table
# Index at column level for detailed search
ryoma-ai> /index-catalog column
# Index at schema level for high-level overview
ryoma-ai> /index-catalog schema
Search Indexed CatalogsΒΆ
ryoma-ai> /search-catalog customer information
ryoma-ai> /search-catalog sales revenue data
ryoma-ai> /search-catalog user authentication tables
π Advanced FeaturesΒΆ
Auto-completionΒΆ
The CLI provides intelligent auto-completion for:
Command names and parameters
Data source names
Agent types and modes
Configuration keys
Session ManagementΒΆ
Command history with search (
Ctrl+R)Persistent configuration across sessions
Agent state preservation
Context sharing between agents
Error HandlingΒΆ
Graceful error recovery
Helpful error messages
Automatic retry mechanisms
Fallback strategies
βοΈ Configuration FileΒΆ
The CLI uses ~/.ryoma/config.json for persistence:
{
"model": "gpt-4o",
"mode": "enhanced",
"embedding_model": "text-embedding-ada-002",
"meta_store": {
"type": "memory"
},
"vector_store": {
"type": "chroma",
"collection_name": "ryoma_vectors"
},
"datasources": [
{
"name": "default",
"type": "postgres",
"host": "localhost",
"database": "mydb"
}
],
"agent": {
"auto_approve_all": false,
"retry_count": 3,
"timeout_seconds": 300
}
}
π TroubleshootingΒΆ
Vector Store IssuesΒΆ
# Check if vector store is properly configured
ryoma-ai> /config
# Re-index if search fails
ryoma-ai> /index-catalog
Connection ProblemsΒΆ
# Run setup to reconfigure
ryoma-ai> /setup
# Check data source status
ryoma-ai> /datasources
Agent ErrorsΒΆ
# Check agent configuration
ryoma-ai> /agent-config
# View agent statistics
ryoma-ai> /stats