bunny-sql-assistant-0.0.1 is not a library.
🐰 Bunny SQL Assistant
Bunny SQL Assistant is an open-source CLI tool built with Rust that enables non-technical users to write and execute SQL queries using natural language. It leverages local LLMs like DeepSeek-Coder via Ollama to generate SQL queries from prompts in Indonesian or English.
✨ Features
- 🔌 Database configuration (currently supports SQLite)
- 💬 Natural language input (Indonesian or English)
- 📜 Generate and execute SQL directly in the terminal
- 🧠 Uses local LLM via Ollama (offline & private)
- 📊 Neatly formatted table output
📦 Installation
Prerequisites
- Rust >= 1.73
- SQLite (as example database)
- Ollama with a local model such as
deepseek-coder
installed
Clone & Build
Global Install (Optional)
🚀 Usage
1. Configure the database connection (e.g. SQLite)
2. Run a query using natural language
Sample Output:
📜 Generated SQL:
SELECT * FROM produk ORDER BY penjualan DESC LIMIT 3;
+----+------------+-----------+
| id | name | sales |
+----+------------+-----------+
| 2 | Smartphone | 300 |
| 8 | Flashdisk | 250 |
| 3 | Mouse | 200 |
+----+------------+-----------+
🐳 Run with Docker
1. Build the Docker image
2. Run a query
⚙️ .env
Configuration
Create a .env
file to store default settings:
OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=deepseek-coder
🛠 Technology Stack
- Language: Rust
- Async Runtime:
tokio
- CLI Parser:
clap
- Database Layer:
sqlx
- Table Renderer:
tabled
- HTTP Client:
reqwest
- Local LLM API:
Ollama
🌱 Roadmap
- Support for PostgreSQL & MySQL
- SQL validation before execution
- Query logging
- Editable query results
- Plugin system
🤝 Contributing
Pull requests are welcome! Feel free to fork the repo, add features or improvements, and open a PR.
📄 License
MIT License © 2025 - Albany Siswanto