qabot
A command-line AI data query tool that uses DuckDB locally and supports Ollama or OpenAI-compatible cloud APIs. Open source under Apache 2.0.
qabot lets you ask questions about files and databases in plain language from your terminal. It pairs a local DuckDB database with an AI model that writes and executes SQL, making it useful for analysts and developers who want to explore data without writing every query themselves.
It supports CSV, Parquet, SQLite and Excel files, including data on disk, remote CSV files and public S3 datasets. Questions can cover totals, averages or grouped comparisons. Within a session, you can also ask it to load a file and create a filtered view before calculating an answer. It can show the SQL and intermediate steps behind its results, so you can inspect how it reached an answer.
The model backend is your choice. qabot supports Ollama for local LLM use, including examples with Qwen2.5-Coder and DeepSeek-R1, as well as OpenAI and DeepSeek cloud services through an OpenAI-compatible API. DuckDB runs locally; choosing a cloud model sends model requests to that provider and requires internet access. The model can access local and network files and execute arbitrary SQL, which matters when deciding what data to expose to it.
qabot is a Python tool available under the Apache 2.0 license, and it can run in Docker. Its Python API lets applications ask questions about files, PostgreSQL databases and Wikidata. Terminal answers can also include ASCII graphs.