quickast 0.1.2__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.
quickast-0.1.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 virobit
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,249 @@
1
+ Metadata-Version: 2.4
2
+ Name: quickast
3
+ Version: 0.1.2
4
+ Summary: Instant codebase intelligence for AI coding agents. AST-powered symbol index with call graphs, route maps, and live file watching.
5
+ Author-email: Virobit <dev@virobit.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/virobit/quickast
8
+ Project-URL: Repository, https://github.com/virobit/quickast
9
+ Project-URL: Issues, https://github.com/virobit/quickast/issues
10
+ Keywords: ast,code-index,codebase,ai-agent,claude,cursor,copilot,developer-tools,static-analysis,call-graph,symbol-index
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Topic :: Software Development :: Quality Assurance
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: watchdog>=3.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=7.0; extra == "dev"
29
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
30
+ Dynamic: license-file
31
+
32
+ # QuickAST
33
+
34
+ **AST-powered codebase index for Python projects.**
35
+
36
+ QuickAST parses your Python codebase, builds a SQLite index of every symbol, call relationship, import, and API route, then keeps it current with automatic file watching.
37
+
38
+ ## Installation
39
+
40
+ QuickAST is not yet published on PyPI. Install directly from GitHub.
41
+
42
+ ### Option 1: Install from GitHub (recommended)
43
+
44
+ ```bash
45
+ pip install git+https://github.com/virobit/quickast.git
46
+ ```
47
+
48
+ Then navigate to any Python project and build the index:
49
+
50
+ ```bash
51
+ cd /path/to/your/project
52
+ quickast init
53
+ ```
54
+
55
+ ### Option 2: Clone and install locally
56
+
57
+ ```bash
58
+ git clone https://github.com/virobit/quickast.git
59
+ cd quickast
60
+ pip install -e .
61
+ ```
62
+
63
+ Editable mode (`-e`) means changes to the cloned source take effect immediately without reinstalling.
64
+
65
+ ### Upgrading
66
+
67
+ If you installed with Option 1:
68
+
69
+ ```bash
70
+ pip install --upgrade git+https://github.com/virobit/quickast.git
71
+ ```
72
+
73
+ If you installed with Option 2:
74
+
75
+ ```bash
76
+ cd quickast
77
+ git pull
78
+ ```
79
+
80
+ Editable installs pick up changes from `git pull` automatically — no reinstall needed.
81
+
82
+ ## What It Does
83
+
84
+ QuickAST gives you a persistent, queryable index of your codebase:
85
+
86
+ ```bash
87
+ $ quickast query create_user # Find where a symbol is defined
88
+ function app/users.py:45 def create_user(name: str, email: str) -> dict
89
+
90
+ $ quickast callers-of create_user # What calls this function?
91
+ app/api.py:112 in handle_signup
92
+ tests/test_users.py:23 in test_create
93
+
94
+ $ quickast callees create_user # What does this function call?
95
+ L46 validate_email (method)
96
+ L48 save_record (method)
97
+
98
+ $ quickast impact create_user # Transitive dependency chain
99
+ Upstream callers (3): handle_signup, register_endpoint, ...
100
+ Downstream callees (5): validate_email, save_record, ...
101
+ ```
102
+
103
+ Queries return in milliseconds from the SQLite index. No re-parsing, no scanning.
104
+
105
+ ## Quick Start
106
+
107
+ ### Start the file watcher (optional)
108
+
109
+ ```bash
110
+ quickast watch # Foreground (see output, Ctrl+C to stop)
111
+ quickast watch --daemon # Background (frees your terminal)
112
+ quickast stop # Stop the background watcher
113
+ ```
114
+
115
+ Check if the watcher is running:
116
+
117
+ ```bash
118
+ cat .quickast.pid # Show the watcher's process ID
119
+ ps -p $(cat .quickast.pid) -o pid,cmd # Verify the process is alive
120
+ ```
121
+
122
+ Re-indexes any file you save. The index stays current without manual rebuilds.
123
+
124
+ ## Commands
125
+
126
+ | Command | What It Does |
127
+ |---------|-------------|
128
+ | `quickast init` | Build the index for the current project |
129
+ | `quickast watch [--daemon]` | Start the file watcher (`--daemon` to run in background) |
130
+ | `quickast stop` | Stop the background watcher |
131
+ | `quickast query <name>` | Find where a symbol (function/class/method) is defined |
132
+ | `quickast search <pattern>` | Search symbols (use `%` wildcards: `%user%`, `%auth%`) |
133
+ | `quickast refs <name>` | Find all files that import a symbol |
134
+ | `quickast file <path>` | List all symbols defined in a file |
135
+ | `quickast callees <name>` | What does function X call? |
136
+ | `quickast callers-of <name>` | What calls function X? |
137
+ | `quickast impact <name> [depth]` | Transitive impact analysis (upstream + downstream) |
138
+ | `quickast routes [--type TYPE]` | List API routes (REST, CLI commands, pages) |
139
+ | `quickast route <path>` | Find a specific route handler |
140
+ | `quickast changes [hours]` | Files changed recently (default: 24 hours) |
141
+ | `quickast summary <path>` | Module overview (symbol counts, top definitions) |
142
+ | `quickast stats` | Index statistics |
143
+
144
+ ## What Gets Indexed
145
+
146
+ - **Symbols** — Every function, class, and method with full signatures, docstrings, and line numbers
147
+ - **Call graph** — Every function call with caller/callee context (who calls X, what does X call)
148
+ - **Imports** — Every import statement (which files use module X)
149
+ - **API routes** — FastAPI, Flask, and Click decorator patterns
150
+ - **File metadata** — Line counts, modification times, file sizes
151
+
152
+ ## Capabilities
153
+
154
+ | Feature | Description |
155
+ |---------|-------------|
156
+ | Persistent SQLite index | Index once, query instantly — no re-parsing on each lookup |
157
+ | Call graph | Trace callers and callees across the entire codebase |
158
+ | Transitive impact analysis | See the full upstream/downstream dependency chain at any depth |
159
+ | API route map | Automatically detects REST endpoints, CLI commands, and page routes |
160
+ | Live file watching | File watcher re-indexes on save — index stays current |
161
+ | Incremental indexing | Only re-indexes files that changed since the last build |
162
+ | Framework detection | Recognizes FastAPI, Flask, and Click patterns out of the box |
163
+
164
+ ## Using QuickAST with AI Agents
165
+
166
+ ### With Claude Code
167
+
168
+ Add this to your project's `CLAUDE.md`:
169
+
170
+ ```markdown
171
+ ## Code Index
172
+
173
+ This project has a QuickAST index. Query it before grepping:
174
+
175
+ \`\`\`bash
176
+ quickast query <name> # Find symbol definitions
177
+ quickast search %keyword% # Fuzzy search
178
+ quickast callers-of <name> # Who calls this?
179
+ quickast callees <name> # What does this call?
180
+ quickast file <path> # What's in this file?
181
+ quickast impact <name> # Full dependency chain
182
+ quickast routes # API surface map
183
+ \`\`\`
184
+
185
+ Always query the index first. Only fall back to grep for string literals,
186
+ comments, or config values that aren't in the AST.
187
+ ```
188
+
189
+ ### With Other AI Tools
190
+
191
+ QuickAST is a standard CLI tool. Any AI agent that can run shell commands can use it.
192
+
193
+ ## How It Works
194
+
195
+ 1. **Parse** — Uses Python's built-in `ast` module to parse every `.py` file
196
+ 2. **Extract** — Pulls symbols, imports, call relationships, and route decorators from the AST
197
+ 3. **Store** — Writes everything to a SQLite database (`.quickast.db`) in your project root
198
+ 4. **Watch** — The file watcher uses `watchdog` to detect changes and re-index modified files
199
+ 5. **Query** — The CLI reads from SQLite, returning results in under 1ms
200
+
201
+ The index is a single `.quickast.db` file. Add it to `.gitignore` — it can be rebuilt in seconds.
202
+
203
+ ## Configuration
204
+
205
+ QuickAST automatically excludes common non-source directories:
206
+
207
+ - `venv`, `.venv`, `env`, `.env`
208
+ - `__pycache__`, `.git`, `node_modules`
209
+ - `.mypy_cache`, `.pytest_cache`, `.tox`, `.nox`
210
+ - `dist`, `build`, `.eggs`
211
+
212
+ ## Requirements
213
+
214
+ - **Python**: 3.10+
215
+ - **OS**: Linux, macOS
216
+ - **Dependencies**: `watchdog` (for file watching)
217
+
218
+ No external parsing libraries — QuickAST uses Python's built-in `ast` module.
219
+
220
+ ## License
221
+
222
+ MIT
223
+
224
+ ## Running Tests
225
+
226
+ Tests are in the cloned repo, not in the pip install. You must run them from inside the `quickast` directory.
227
+
228
+ ```bash
229
+ git clone https://github.com/virobit/quickast.git
230
+ cd quickast
231
+ python3 -m venv venv
232
+ source venv/bin/activate
233
+ pip install -e ".[dev]" # Installs pytest and pytest-cov
234
+ pytest tests/ -v # Run from inside the quickast directory
235
+ ```
236
+
237
+ All 24 tests should pass. The tests cover parsing, indexing, incremental builds, and all query types using temporary project directories — no external dependencies or network access required.
238
+
239
+ ## Contributing
240
+
241
+ Contributions welcome. Please open an issue first to discuss what you'd like to change.
242
+
243
+ ## Disclaimer
244
+
245
+ QuickAST is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
246
+
247
+ QuickAST performs read-only analysis of your source code using Python's built-in `ast` module. It does not modify, execute, or transmit your code. The SQLite index is stored locally in your project directory.
248
+
249
+ This project is in early development. APIs and CLI behavior may change between versions.
@@ -0,0 +1,218 @@
1
+ # QuickAST
2
+
3
+ **AST-powered codebase index for Python projects.**
4
+
5
+ QuickAST parses your Python codebase, builds a SQLite index of every symbol, call relationship, import, and API route, then keeps it current with automatic file watching.
6
+
7
+ ## Installation
8
+
9
+ QuickAST is not yet published on PyPI. Install directly from GitHub.
10
+
11
+ ### Option 1: Install from GitHub (recommended)
12
+
13
+ ```bash
14
+ pip install git+https://github.com/virobit/quickast.git
15
+ ```
16
+
17
+ Then navigate to any Python project and build the index:
18
+
19
+ ```bash
20
+ cd /path/to/your/project
21
+ quickast init
22
+ ```
23
+
24
+ ### Option 2: Clone and install locally
25
+
26
+ ```bash
27
+ git clone https://github.com/virobit/quickast.git
28
+ cd quickast
29
+ pip install -e .
30
+ ```
31
+
32
+ Editable mode (`-e`) means changes to the cloned source take effect immediately without reinstalling.
33
+
34
+ ### Upgrading
35
+
36
+ If you installed with Option 1:
37
+
38
+ ```bash
39
+ pip install --upgrade git+https://github.com/virobit/quickast.git
40
+ ```
41
+
42
+ If you installed with Option 2:
43
+
44
+ ```bash
45
+ cd quickast
46
+ git pull
47
+ ```
48
+
49
+ Editable installs pick up changes from `git pull` automatically — no reinstall needed.
50
+
51
+ ## What It Does
52
+
53
+ QuickAST gives you a persistent, queryable index of your codebase:
54
+
55
+ ```bash
56
+ $ quickast query create_user # Find where a symbol is defined
57
+ function app/users.py:45 def create_user(name: str, email: str) -> dict
58
+
59
+ $ quickast callers-of create_user # What calls this function?
60
+ app/api.py:112 in handle_signup
61
+ tests/test_users.py:23 in test_create
62
+
63
+ $ quickast callees create_user # What does this function call?
64
+ L46 validate_email (method)
65
+ L48 save_record (method)
66
+
67
+ $ quickast impact create_user # Transitive dependency chain
68
+ Upstream callers (3): handle_signup, register_endpoint, ...
69
+ Downstream callees (5): validate_email, save_record, ...
70
+ ```
71
+
72
+ Queries return in milliseconds from the SQLite index. No re-parsing, no scanning.
73
+
74
+ ## Quick Start
75
+
76
+ ### Start the file watcher (optional)
77
+
78
+ ```bash
79
+ quickast watch # Foreground (see output, Ctrl+C to stop)
80
+ quickast watch --daemon # Background (frees your terminal)
81
+ quickast stop # Stop the background watcher
82
+ ```
83
+
84
+ Check if the watcher is running:
85
+
86
+ ```bash
87
+ cat .quickast.pid # Show the watcher's process ID
88
+ ps -p $(cat .quickast.pid) -o pid,cmd # Verify the process is alive
89
+ ```
90
+
91
+ Re-indexes any file you save. The index stays current without manual rebuilds.
92
+
93
+ ## Commands
94
+
95
+ | Command | What It Does |
96
+ |---------|-------------|
97
+ | `quickast init` | Build the index for the current project |
98
+ | `quickast watch [--daemon]` | Start the file watcher (`--daemon` to run in background) |
99
+ | `quickast stop` | Stop the background watcher |
100
+ | `quickast query <name>` | Find where a symbol (function/class/method) is defined |
101
+ | `quickast search <pattern>` | Search symbols (use `%` wildcards: `%user%`, `%auth%`) |
102
+ | `quickast refs <name>` | Find all files that import a symbol |
103
+ | `quickast file <path>` | List all symbols defined in a file |
104
+ | `quickast callees <name>` | What does function X call? |
105
+ | `quickast callers-of <name>` | What calls function X? |
106
+ | `quickast impact <name> [depth]` | Transitive impact analysis (upstream + downstream) |
107
+ | `quickast routes [--type TYPE]` | List API routes (REST, CLI commands, pages) |
108
+ | `quickast route <path>` | Find a specific route handler |
109
+ | `quickast changes [hours]` | Files changed recently (default: 24 hours) |
110
+ | `quickast summary <path>` | Module overview (symbol counts, top definitions) |
111
+ | `quickast stats` | Index statistics |
112
+
113
+ ## What Gets Indexed
114
+
115
+ - **Symbols** — Every function, class, and method with full signatures, docstrings, and line numbers
116
+ - **Call graph** — Every function call with caller/callee context (who calls X, what does X call)
117
+ - **Imports** — Every import statement (which files use module X)
118
+ - **API routes** — FastAPI, Flask, and Click decorator patterns
119
+ - **File metadata** — Line counts, modification times, file sizes
120
+
121
+ ## Capabilities
122
+
123
+ | Feature | Description |
124
+ |---------|-------------|
125
+ | Persistent SQLite index | Index once, query instantly — no re-parsing on each lookup |
126
+ | Call graph | Trace callers and callees across the entire codebase |
127
+ | Transitive impact analysis | See the full upstream/downstream dependency chain at any depth |
128
+ | API route map | Automatically detects REST endpoints, CLI commands, and page routes |
129
+ | Live file watching | File watcher re-indexes on save — index stays current |
130
+ | Incremental indexing | Only re-indexes files that changed since the last build |
131
+ | Framework detection | Recognizes FastAPI, Flask, and Click patterns out of the box |
132
+
133
+ ## Using QuickAST with AI Agents
134
+
135
+ ### With Claude Code
136
+
137
+ Add this to your project's `CLAUDE.md`:
138
+
139
+ ```markdown
140
+ ## Code Index
141
+
142
+ This project has a QuickAST index. Query it before grepping:
143
+
144
+ \`\`\`bash
145
+ quickast query <name> # Find symbol definitions
146
+ quickast search %keyword% # Fuzzy search
147
+ quickast callers-of <name> # Who calls this?
148
+ quickast callees <name> # What does this call?
149
+ quickast file <path> # What's in this file?
150
+ quickast impact <name> # Full dependency chain
151
+ quickast routes # API surface map
152
+ \`\`\`
153
+
154
+ Always query the index first. Only fall back to grep for string literals,
155
+ comments, or config values that aren't in the AST.
156
+ ```
157
+
158
+ ### With Other AI Tools
159
+
160
+ QuickAST is a standard CLI tool. Any AI agent that can run shell commands can use it.
161
+
162
+ ## How It Works
163
+
164
+ 1. **Parse** — Uses Python's built-in `ast` module to parse every `.py` file
165
+ 2. **Extract** — Pulls symbols, imports, call relationships, and route decorators from the AST
166
+ 3. **Store** — Writes everything to a SQLite database (`.quickast.db`) in your project root
167
+ 4. **Watch** — The file watcher uses `watchdog` to detect changes and re-index modified files
168
+ 5. **Query** — The CLI reads from SQLite, returning results in under 1ms
169
+
170
+ The index is a single `.quickast.db` file. Add it to `.gitignore` — it can be rebuilt in seconds.
171
+
172
+ ## Configuration
173
+
174
+ QuickAST automatically excludes common non-source directories:
175
+
176
+ - `venv`, `.venv`, `env`, `.env`
177
+ - `__pycache__`, `.git`, `node_modules`
178
+ - `.mypy_cache`, `.pytest_cache`, `.tox`, `.nox`
179
+ - `dist`, `build`, `.eggs`
180
+
181
+ ## Requirements
182
+
183
+ - **Python**: 3.10+
184
+ - **OS**: Linux, macOS
185
+ - **Dependencies**: `watchdog` (for file watching)
186
+
187
+ No external parsing libraries — QuickAST uses Python's built-in `ast` module.
188
+
189
+ ## License
190
+
191
+ MIT
192
+
193
+ ## Running Tests
194
+
195
+ Tests are in the cloned repo, not in the pip install. You must run them from inside the `quickast` directory.
196
+
197
+ ```bash
198
+ git clone https://github.com/virobit/quickast.git
199
+ cd quickast
200
+ python3 -m venv venv
201
+ source venv/bin/activate
202
+ pip install -e ".[dev]" # Installs pytest and pytest-cov
203
+ pytest tests/ -v # Run from inside the quickast directory
204
+ ```
205
+
206
+ All 24 tests should pass. The tests cover parsing, indexing, incremental builds, and all query types using temporary project directories — no external dependencies or network access required.
207
+
208
+ ## Contributing
209
+
210
+ Contributions welcome. Please open an issue first to discuss what you'd like to change.
211
+
212
+ ## Disclaimer
213
+
214
+ QuickAST is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
215
+
216
+ QuickAST performs read-only analysis of your source code using Python's built-in `ast` module. It does not modify, execute, or transmit your code. The SQLite index is stored locally in your project directory.
217
+
218
+ This project is in early development. APIs and CLI behavior may change between versions.
@@ -0,0 +1,57 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "quickast"
7
+ version = "0.1.2"
8
+ description = "Instant codebase intelligence for AI coding agents. AST-powered symbol index with call graphs, route maps, and live file watching."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ {name = "Virobit", email = "dev@virobit.com"},
14
+ ]
15
+ keywords = [
16
+ "ast", "code-index", "codebase", "ai-agent", "claude",
17
+ "cursor", "copilot", "developer-tools", "static-analysis",
18
+ "call-graph", "symbol-index",
19
+ ]
20
+ classifiers = [
21
+ "Development Status :: 4 - Beta",
22
+ "Environment :: Console",
23
+ "Intended Audience :: Developers",
24
+
25
+ "Operating System :: POSIX :: Linux",
26
+ "Operating System :: MacOS",
27
+ "Programming Language :: Python :: 3",
28
+ "Programming Language :: Python :: 3.10",
29
+ "Programming Language :: Python :: 3.11",
30
+ "Programming Language :: Python :: 3.12",
31
+ "Programming Language :: Python :: 3.13",
32
+ "Topic :: Software Development :: Libraries :: Python Modules",
33
+ "Topic :: Software Development :: Quality Assurance",
34
+ ]
35
+ dependencies = [
36
+ "watchdog>=3.0",
37
+ ]
38
+
39
+ [project.optional-dependencies]
40
+ dev = [
41
+ "pytest>=7.0",
42
+ "pytest-cov>=4.0",
43
+ ]
44
+
45
+ [project.urls]
46
+ Homepage = "https://github.com/virobit/quickast"
47
+ Repository = "https://github.com/virobit/quickast"
48
+ Issues = "https://github.com/virobit/quickast/issues"
49
+
50
+ [project.scripts]
51
+ quickast = "quickast.cli:main"
52
+
53
+ [tool.setuptools.packages.find]
54
+ include = ["quickast*"]
55
+
56
+ [tool.pytest.ini_options]
57
+ testpaths = ["tests"]
@@ -0,0 +1,3 @@
1
+ """QuickAST — Instant codebase intelligence for AI coding agents."""
2
+
3
+ __version__ = "0.1.2"