querymind-cli 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. querymind_cli-0.1.0/LICENSE +21 -0
  2. querymind_cli-0.1.0/PKG-INFO +139 -0
  3. querymind_cli-0.1.0/README.md +105 -0
  4. querymind_cli-0.1.0/app/agents/InterpreterAgent.py +473 -0
  5. querymind_cli-0.1.0/app/agents/__init__.py +0 -0
  6. querymind_cli-0.1.0/app/agents/insights_generator.py +151 -0
  7. querymind_cli-0.1.0/app/agents/intent_corrector.py +59 -0
  8. querymind_cli-0.1.0/app/agents/llm_intepreter.py +132 -0
  9. querymind_cli-0.1.0/app/agents/narrator.py +27 -0
  10. querymind_cli-0.1.0/app/agents/planner.py +77 -0
  11. querymind_cli-0.1.0/app/cli/__init__.py +0 -0
  12. querymind_cli-0.1.0/app/cli/main.py +346 -0
  13. querymind_cli-0.1.0/app/cli/tui_app.py +98 -0
  14. querymind_cli-0.1.0/app/cli/ui.py +21 -0
  15. querymind_cli-0.1.0/app/core/__init__.py +0 -0
  16. querymind_cli-0.1.0/app/core/context.py +10 -0
  17. querymind_cli-0.1.0/app/core/logger.py +2 -0
  18. querymind_cli-0.1.0/app/core/pipeline.py +379 -0
  19. querymind_cli-0.1.0/app/data/__init__.py +0 -0
  20. querymind_cli-0.1.0/app/data/connectors/csv_connector.py +99 -0
  21. querymind_cli-0.1.0/app/data/connectors/excel_connector.py +68 -0
  22. querymind_cli-0.1.0/app/data/connectors/no_sql_db_connector.py +0 -0
  23. querymind_cli-0.1.0/app/data/connectors/sql_db_connector.py +0 -0
  24. querymind_cli-0.1.0/app/data/schema_engine.py +18 -0
  25. querymind_cli-0.1.0/app/data/type_caster.py +128 -0
  26. querymind_cli-0.1.0/app/executor/__init__.py +0 -0
  27. querymind_cli-0.1.0/app/executor/db_executor.py +0 -0
  28. querymind_cli-0.1.0/app/executor/sheet_selector.py +120 -0
  29. querymind_cli-0.1.0/app/llm/ollama_client.py +47 -0
  30. querymind_cli-0.1.0/app/prompts/interpreter_prompt.txt +28 -0
  31. querymind_cli-0.1.0/app/security/__init__.py +0 -0
  32. querymind_cli-0.1.0/app/security/input_guard.py +133 -0
  33. querymind_cli-0.1.0/app/security/schema_filter.py +20 -0
  34. querymind_cli-0.1.0/app/tests/__init__.py +0 -0
  35. querymind_cli-0.1.0/app/tests/llm_test.py +18 -0
  36. querymind_cli-0.1.0/app/tools/__init__.py +0 -0
  37. querymind_cli-0.1.0/app/tools/analyzer.py +157 -0
  38. querymind_cli-0.1.0/app/tools/join_resolver.py +159 -0
  39. querymind_cli-0.1.0/app/tools/sql_writer.py +37 -0
  40. querymind_cli-0.1.0/app/tools/validator.py +0 -0
  41. querymind_cli-0.1.0/pyproject.toml +56 -0
  42. querymind_cli-0.1.0/querymind_cli.egg-info/PKG-INFO +139 -0
  43. querymind_cli-0.1.0/querymind_cli.egg-info/SOURCES.txt +46 -0
  44. querymind_cli-0.1.0/querymind_cli.egg-info/dependency_links.txt +1 -0
  45. querymind_cli-0.1.0/querymind_cli.egg-info/entry_points.txt +2 -0
  46. querymind_cli-0.1.0/querymind_cli.egg-info/requires.txt +7 -0
  47. querymind_cli-0.1.0/querymind_cli.egg-info/top_level.txt +1 -0
  48. querymind_cli-0.1.0/setup.cfg +4 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Siddhesh Shankar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,139 @@
1
+ Metadata-Version: 2.4
2
+ Name: querymind-cli
3
+ Version: 0.1.0
4
+ Summary: CLI AI Data Analyst — query CSV and Excel files in plain English
5
+ Author-email: Siddhesh <siddhesh.codemaster.github@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/SiddheshCodeMaster/QueryMind
8
+ Project-URL: Repository, https://github.com/SiddheshCodeMaster/QueryMind
9
+ Project-URL: Bug Tracker, https://github.com/SiddheshCodeMaster/QueryMind/issues
10
+ Keywords: data analysis,cli,natural language,csv,excel,pandas,llm,ollama,terminal,data analytics
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
22
+ Classifier: Topic :: Utilities
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: pandas>=2.0
27
+ Requires-Dist: rich>=13.0
28
+ Requires-Dist: textual>=0.47
29
+ Requires-Dist: requests>=2.31
30
+ Requires-Dist: chardet>=5.0
31
+ Requires-Dist: openpyxl>=3.1
32
+ Requires-Dist: xlrd>=2.0
33
+ Dynamic: license-file
34
+
35
+ # 🧠 QueryMind
36
+
37
+ **Ask questions about your data in plain English. No SQL. No code. Just a terminal.**
38
+
39
+ QueryMind is a CLI data analyst that lets you load a CSV or Excel file and query it conversationally — right in your terminal.
40
+
41
+ ```
42
+ >> top 5 regions by sales
43
+ >> which month had the highest profit?
44
+ >> average spend by payment method in ascending order
45
+ >> show sales in sheet Orders by customer segment
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Install
51
+
52
+ ```bash
53
+ pip install querymind-cli
54
+ ```
55
+
56
+ **Requirements:**
57
+ - Python 3.10+
58
+ - [Ollama](https://ollama.ai) (optional — enables LLM fallback for complex queries)
59
+
60
+ If you want LLM support, install Ollama and pull the model:
61
+ ```bash
62
+ ollama pull phi
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Quickstart
68
+
69
+ ```bash
70
+ querymind
71
+ ```
72
+
73
+ You'll be prompted to:
74
+ 1. Enter a CSV or Excel file path
75
+ 2. Select sheets (Excel only)
76
+ 3. Map your metric and dimension columns
77
+ 4. Start asking questions
78
+
79
+ ---
80
+
81
+ ## What it can do
82
+
83
+ | Query | What happens |
84
+ |---|---|
85
+ | `top 5 products by revenue` | Ranked bar chart in terminal |
86
+ | `which region had lowest sales` | Ascending comparison with insight |
87
+ | `average profit by category` | Mean aggregation per group |
88
+ | `sales trend over time monthly` | Monthly groupby on datetime column |
89
+ | `show sales in sheet Orders by region` | Sheet-scoped query |
90
+ | `which manager had the most sales` | Cross-sheet join (Orders + Users) |
91
+ | `sales by region in ascending order` | Explicit sort order |
92
+
93
+ ---
94
+
95
+ ## Supported file formats
96
+
97
+ | Format | Extension |
98
+ |---|---|
99
+ | CSV | `.csv`, `.tsv` |
100
+ | Excel | `.xlsx`, `.xls`, `.xlsm` |
101
+
102
+ Auto-detects: encoding (UTF-8 BOM, latin-1), delimiter (comma, semicolon, tab, pipe), packed integer dates (DDMMYYYY, YYYYMMDD).
103
+
104
+ ---
105
+
106
+ ## How it works
107
+
108
+ ```
109
+ Your query
110
+
111
+ InputGuard — blocks gibberish and sensitive input
112
+
113
+ InterpreterAgent — rule-based intent extraction (fast, no LLM needed)
114
+
115
+ LLMInterpreter — Ollama fallback for complex queries (optional)
116
+
117
+ JoinResolver — auto-detects and performs cross-sheet joins
118
+
119
+ Analyzer — pandas groupby / aggregation
120
+
121
+ InsightGenerator — formats result + ASCII bar chart
122
+ ```
123
+
124
+ ---
125
+
126
+ ## Beta
127
+
128
+ QueryMind is in active development. If something breaks or a query gives a wrong answer, please [open an issue](https://github.com/SiddheshCodeMaster/QueryMind/issues) with:
129
+ - Your query
130
+ - The column names in your file (no need to share actual data)
131
+ - The output you got
132
+
133
+ This feedback directly shapes what gets fixed next.
134
+
135
+ ---
136
+
137
+ ## License
138
+
139
+ MIT
@@ -0,0 +1,105 @@
1
+ # 🧠 QueryMind
2
+
3
+ **Ask questions about your data in plain English. No SQL. No code. Just a terminal.**
4
+
5
+ QueryMind is a CLI data analyst that lets you load a CSV or Excel file and query it conversationally — right in your terminal.
6
+
7
+ ```
8
+ >> top 5 regions by sales
9
+ >> which month had the highest profit?
10
+ >> average spend by payment method in ascending order
11
+ >> show sales in sheet Orders by customer segment
12
+ ```
13
+
14
+ ---
15
+
16
+ ## Install
17
+
18
+ ```bash
19
+ pip install querymind-cli
20
+ ```
21
+
22
+ **Requirements:**
23
+ - Python 3.10+
24
+ - [Ollama](https://ollama.ai) (optional — enables LLM fallback for complex queries)
25
+
26
+ If you want LLM support, install Ollama and pull the model:
27
+ ```bash
28
+ ollama pull phi
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Quickstart
34
+
35
+ ```bash
36
+ querymind
37
+ ```
38
+
39
+ You'll be prompted to:
40
+ 1. Enter a CSV or Excel file path
41
+ 2. Select sheets (Excel only)
42
+ 3. Map your metric and dimension columns
43
+ 4. Start asking questions
44
+
45
+ ---
46
+
47
+ ## What it can do
48
+
49
+ | Query | What happens |
50
+ |---|---|
51
+ | `top 5 products by revenue` | Ranked bar chart in terminal |
52
+ | `which region had lowest sales` | Ascending comparison with insight |
53
+ | `average profit by category` | Mean aggregation per group |
54
+ | `sales trend over time monthly` | Monthly groupby on datetime column |
55
+ | `show sales in sheet Orders by region` | Sheet-scoped query |
56
+ | `which manager had the most sales` | Cross-sheet join (Orders + Users) |
57
+ | `sales by region in ascending order` | Explicit sort order |
58
+
59
+ ---
60
+
61
+ ## Supported file formats
62
+
63
+ | Format | Extension |
64
+ |---|---|
65
+ | CSV | `.csv`, `.tsv` |
66
+ | Excel | `.xlsx`, `.xls`, `.xlsm` |
67
+
68
+ Auto-detects: encoding (UTF-8 BOM, latin-1), delimiter (comma, semicolon, tab, pipe), packed integer dates (DDMMYYYY, YYYYMMDD).
69
+
70
+ ---
71
+
72
+ ## How it works
73
+
74
+ ```
75
+ Your query
76
+
77
+ InputGuard — blocks gibberish and sensitive input
78
+
79
+ InterpreterAgent — rule-based intent extraction (fast, no LLM needed)
80
+
81
+ LLMInterpreter — Ollama fallback for complex queries (optional)
82
+
83
+ JoinResolver — auto-detects and performs cross-sheet joins
84
+
85
+ Analyzer — pandas groupby / aggregation
86
+
87
+ InsightGenerator — formats result + ASCII bar chart
88
+ ```
89
+
90
+ ---
91
+
92
+ ## Beta
93
+
94
+ QueryMind is in active development. If something breaks or a query gives a wrong answer, please [open an issue](https://github.com/SiddheshCodeMaster/QueryMind/issues) with:
95
+ - Your query
96
+ - The column names in your file (no need to share actual data)
97
+ - The output you got
98
+
99
+ This feedback directly shapes what gets fixed next.
100
+
101
+ ---
102
+
103
+ ## License
104
+
105
+ MIT