AI-Powered Database Command-Line Interface
RDSAI CLI is an AI-powered command-line interface for database management.
It supports natural language queries and SQL execution, with built-in diagnostic tools,
execution plan analysis, and multi-source data connections.
# One-click installation (recommended)
curl -LsSf https://raw.githubusercontent.com/aliyun/rdsai-cli/main/install.sh | sh
# Or using uv
uv tool install --python 3.13 rdsai-cli
# Or using pip (recommend virtual environment)
pip install rdsai-cli
# Start without connection (interactive mode)
rdsai
# Connect via command line
rdsai --host localhost -u root -p secret -D mydb
# Connect to files
rdsai
> /connect flights.csv
> /connect https://example.com/data.csv
mysql> /setup
Interactive wizard will guide you through LLM provider setup. Configuration is saved to ~/.rdsai-cli/config.json.
SQL Execution:
mysql> SELECT COUNT(*) FROM users;
mysql> EXPLAIN SELECT * FROM users WHERE email = 'test@example.com';
mysql> SELECT * FROM users LIMIT 10\G -- Press Ctrl+E for AI explanation
Natural Language:
mysql> analyze index usage on users table
mysql> show me slow queries from the last hour
mysql> design an orders table for e-commerce
mysql> why this query is slow: SELECT * FROM users WHERE name LIKE '%john%'
| Command | Description |
|---|---|
/connect, /disconnect | Connect/disconnect from database or files |
/setup | Configure LLM provider |
/help | Show help and status |
/explain | Analyze SQL execution plan |
/research | Generate database schema analysis report |
/benchmark | Run performance benchmark test |
/yolo | Toggle auto-approve mode (use with caution) |
/history | Show query history |
/model | Manage LLM models |
~/.rdsai-cli/config.json (protect with proper permissions)We welcome contributions. See CONTRIBUTING.md for details.
MIT License - see LICENSE for details.
Python
98.2%
Shell
1.8%
AI-Powered Database Command-Line Interface
RDSAI CLI is an AI-powered command-line interface for database management.
It supports natural language queries and SQL execution, with built-in diagnostic tools,
execution plan analysis, and multi-source data connections.
# One-click installation (recommended)
curl -LsSf https://raw.githubusercontent.com/aliyun/rdsai-cli/main/install.sh | sh
# Or using uv
uv tool install --python 3.13 rdsai-cli
# Or using pip (recommend virtual environment)
pip install rdsai-cli
# Start without connection (interactive mode)
rdsai
# Connect via command line
rdsai --host localhost -u root -p secret -D mydb
# Connect to files
rdsai
> /connect flights.csv
> /connect https://example.com/data.csv
mysql> /setup
Interactive wizard will guide you through LLM provider setup. Configuration is saved to ~/.rdsai-cli/config.json.
SQL Execution:
mysql> SELECT COUNT(*) FROM users;
mysql> EXPLAIN SELECT * FROM users WHERE email = 'test@example.com';
mysql> SELECT * FROM users LIMIT 10\G -- Press Ctrl+E for AI explanation
Natural Language:
mysql> analyze index usage on users table
mysql> show me slow queries from the last hour
mysql> design an orders table for e-commerce
mysql> why this query is slow: SELECT * FROM users WHERE name LIKE '%john%'
| Command | Description |
|---|---|
/connect, /disconnect | Connect/disconnect from database or files |
/setup | Configure LLM provider |
/help | Show help and status |
/explain | Analyze SQL execution plan |
/research | Generate database schema analysis report |
/benchmark | Run performance benchmark test |
/yolo | Toggle auto-approve mode (use with caution) |
/history | Show query history |
/model | Manage LLM models |
~/.rdsai-cli/config.json (protect with proper permissions)We welcome contributions. See CONTRIBUTING.md for details.
MIT License - see LICENSE for details.
Python
98.2%
Shell
1.8%