{"id":39741123,"url":"https://github.com/aliyun/rdsai-cli","last_synced_at":"2026-02-06T08:11:12.060Z","repository":{"id":329919718,"uuid":"1118088801","full_name":"aliyun/rdsai-cli","owner":"aliyun","description":"RDSAI CLI is a next-generation, AI-powered RDS CLI that transforms how you interact with the databasea","archived":false,"fork":false,"pushed_at":"2026-02-02T06:44:27.000Z","size":36645,"stargazers_count":37,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-02T18:33:33.462Z","etag":null,"topics":["agent","agentic","ai","cli","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aliyun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-17T08:46:34.000Z","updated_at":"2026-02-02T06:44:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aliyun/rdsai-cli","commit_stats":null,"previous_names":["aliyun/rdsai-cli"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/aliyun/rdsai-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliyun%2Frdsai-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliyun%2Frdsai-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliyun%2Frdsai-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliyun%2Frdsai-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliyun","download_url":"https://codeload.github.com/aliyun/rdsai-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliyun%2Frdsai-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29155107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T07:18:23.844Z","status":"ssl_error","status_checked_at":"2026-02-06T07:13:32.659Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","agentic","ai","cli","python"],"created_at":"2026-01-18T11:14:54.254Z","updated_at":"2026-02-06T08:11:12.055Z","avatar_url":"https://github.com/aliyun.png","language":"Python","funding_links":[],"categories":["Development"],"sub_categories":["Database"],"readme":"\u003cdiv align=\"center\"\u003e\n\n# RDSAI CLI\n\n**AI-Powered Database Command-Line Interface**\n\n[![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/)\n[![License](https://img.shields.io/github/license/aliyun/rdsai-cli)](https://github.com/aliyun/rdsai-cli/blob/main/LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/aliyun/rdsai-cli)](https://github.com/aliyun/rdsai-cli/issues)\n\n[English](README.md) | [中文](README_zh.md)\n\n\u003cimg src=\"docs/assets/img.png\" alt=\"RDSAI CLI Screenshot\" width=\"800\"\u003e\n\n\u003cp\u003e\nRDSAI CLI is an AI-powered command-line interface for database management.\u003cbr\u003e\nIt supports natural language queries and SQL execution, with built-in diagnostic tools,\u003cbr\u003e\nexecution plan analysis, and multi-source data connections.\n\u003c/p\u003e\n\n\u003c/div\u003e\n\n---\n\n## Features\n\n- **Multi-Source Connection** - Connect to MySQL databases or files (CSV, Excel) locally or remotely via HTTP/HTTPS\n- **AI Assistant** - Natural language queries (English/Chinese), SQL optimization, diagnostics, and explanations\n- **Smart SQL** - Auto-detects SQL vs natural language, query history, Ctrl+E for instant result explanations\n- **Multi-Model LLM** - Support for Qwen, OpenAI, DeepSeek, Anthropic, Gemini, and OpenAI-compatible APIs\n- **Schema Analysis** - AI-powered database analysis with compliance checking and optimization suggestions\n- **Performance Benchmarking** - Automated sysbench testing with comprehensive analysis reports\n- **MCP Integration** - Extend capabilities via Model Context Protocol servers\n- **Safety First** - Read-only by default, DDL/DML requires confirmation (YOLO mode available)\n\n## Requirements\n\n- Python 3.13+\n- Network access to MySQL\n- API access to LLM provider\n\n## Installation\n\n```bash\n# One-click installation (recommended)\ncurl -LsSf https://raw.githubusercontent.com/aliyun/rdsai-cli/main/install.sh | sh\n\n# Or using uv\nuv tool install --python 3.13 rdsai-cli\n\n# Or using pip (recommend virtual environment)\npip install rdsai-cli\n```\n\n## Quick Start\n\n### Launch and Connect\n\n```bash\n# Start without connection (interactive mode)\nrdsai\n\n# Connect via command line\nrdsai --host localhost -u root -p secret -D mydb\n\n# Connect to files\nrdsai\n\u003e /connect flights.csv\n\u003e /connect https://example.com/data.csv\n```\n\n### Configure LLM\n\n```text\nmysql\u003e /setup\n```\n\nInteractive wizard will guide you through LLM provider setup. Configuration is saved to `~/.rdsai-cli/config.json`.\n\n### Basic Usage\n\n**SQL Execution:**\n\n```text\nmysql\u003e SELECT COUNT(*) FROM users;\nmysql\u003e EXPLAIN SELECT * FROM users WHERE email = 'test@example.com';\nmysql\u003e SELECT * FROM users LIMIT 10\\G   -- Press Ctrl+E for AI explanation\n```\n\n**Natural Language:**\n\n```text\nmysql\u003e analyze index usage on users table\nmysql\u003e show me slow queries from the last hour\nmysql\u003e design an orders table for e-commerce\nmysql\u003e why this query is slow: SELECT * FROM users WHERE name LIKE '%john%'\n```\n\n### Meta Commands\n\n| Command | Description |\n|---------|-------------|\n| `/connect`, `/disconnect` | Connect/disconnect from database or files |\n| `/setup` | Configure LLM provider |\n| `/help` | Show help and status |\n| `/explain` | Analyze SQL execution plan |\n| `/research` | Generate database schema analysis report |\n| `/benchmark` | Run performance benchmark test |\n| `/yolo` | Toggle auto-approve mode (use with caution) |\n| `/history` | Show query history |\n| `/model` | Manage LLM models |\n\n## Documentation\n\n- [Complete Tutorial](docs/tutorial.md) - Comprehensive guide from beginner to advanced\n- [Core Features](docs/features/) - Execution plan analysis, schema analysis, benchmarking, MCP integration\n- [Usage Scenarios](docs/scenarios/) - SQL explanation, file analysis, slow query optimization, and more\n\n## Security\n\n- **Read-Only by Default** - DDL/DML require explicit confirmation unless YOLO mode is enabled\n- **Confirmation Required** - Every write operation shows exact SQL for review before execution\n- **Credential Storage** - API keys stored in `~/.rdsai-cli/config.json` (protect with proper permissions)\n\n## Contributing\n\nWe welcome contributions. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.\n\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliyun%2Frdsai-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliyun%2Frdsai-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliyun%2Frdsai-cli/lists"}