Skip to main content

CLI AI Data Analyst — query CSV and Excel files in plain English

Project description

🧠 QueryMind

Ask questions about your data in plain English. No SQL. No code. Just a terminal.

QueryMind is a CLI data analyst that lets you load a CSV or Excel file and query it conversationally — right in your terminal.

>> top 5 regions by sales
>> which month had the highest profit?
>> average spend by payment method in ascending order
>> show sales in sheet Orders by customer segment

Install

pip install querymind-cli

Requirements:

  • Python 3.10+
  • Ollama (optional — enables LLM fallback for complex queries)

If you want LLM support, install Ollama and pull the model:

ollama pull phi

Quickstart

querymind

You'll be prompted to:

  1. Enter a CSV or Excel file path
  2. Select sheets (Excel only)
  3. Map your metric and dimension columns
  4. Start asking questions

What it can do

Query What happens
top 5 products by revenue Ranked bar chart in terminal
which region had lowest sales Ascending comparison with insight
average profit by category Mean aggregation per group
sales trend over time monthly Monthly groupby on datetime column
show sales in sheet Orders by region Sheet-scoped query
which manager had the most sales Cross-sheet join (Orders + Users)
sales by region in ascending order Explicit sort order

Supported file formats

Format Extension
CSV .csv, .tsv
Excel .xlsx, .xls, .xlsm

Auto-detects: encoding (UTF-8 BOM, latin-1), delimiter (comma, semicolon, tab, pipe), packed integer dates (DDMMYYYY, YYYYMMDD).


How it works

Your query
    ↓
InputGuard       — blocks gibberish and sensitive input
    ↓
InterpreterAgent — rule-based intent extraction (fast, no LLM needed)
    ↓
LLMInterpreter   — Ollama fallback for complex queries (optional)
    ↓
JoinResolver     — auto-detects and performs cross-sheet joins
    ↓
Analyzer         — pandas groupby / aggregation
    ↓
InsightGenerator — formats result + ASCII bar chart

What's New in v0.2.0

  • /profile — instant dataset profile: row count, column types, null %, unique counts, min/avg/max stats per column. For Excel files shows overall summary + per-sheet breakdown.
  • /history — shows your last 5 queries inline in the TUI with the path to the full log
  • Persistent session history — every query saved to ~/querymind_sessions/querymind_history.md across all sessions forever
  • Sort order fix"lowest sales in descending order" now correctly highlights the minimum while sorting high→low
  • Integer display fix — IDs like customer_id no longer show as 553.0

Session History

Every query and answer is automatically saved to:

~/querymind_sessions/querymind_history.md

This is a single persistent Markdown file — all sessions across all datasets append to it. Open it in any editor or view it on GitHub.

Inside the TUI, type /history to see your last 5 queries and the file path.


Beta

QueryMind is in active development. If something breaks or a query gives a wrong answer, please open an issue with:

  • Your query
  • The column names in your file (no need to share actual data)
  • The output you got

This feedback directly shapes what gets fixed next.


License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

querymind_cli-0.2.0.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

querymind_cli-0.2.0-py3-none-any.whl (46.8 kB view details)

Uploaded Python 3

File details

Details for the file querymind_cli-0.2.0.tar.gz.

File metadata

  • Download URL: querymind_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for querymind_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 12347257e4b001771d3c49753314b17621fbbf2fb42c8bf66d157db1014bcf1a
MD5 9101315a0947ddb4db50f3d5d8e7f1c9
BLAKE2b-256 2f0860eacabdd3c1e2cb6c1e495d880cf67c0ece5fb1e8878b6f897f597a9769

See more details on using hashes here.

File details

Details for the file querymind_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: querymind_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 46.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for querymind_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 065229446002b02602f5b2644b0afb0c0871f7c816203765e0c11c1937e1ffc0
MD5 9b9b8c1e730383f35e96b524040b488a
BLAKE2b-256 0ff0a9ccd5ff917823259301baefa5a1f46e9cc9d25fb75e0e4987199f0b019b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page