codegraph-cli-ai 0.1.5__tar.gz → 0.1.7__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.
- codegraph_cli_ai-0.1.7/MANIFEST.in +1 -0
- codegraph_cli_ai-0.1.7/PKG-INFO +225 -0
- codegraph_cli_ai-0.1.7/README.md +207 -0
- codegraph_cli_ai-0.1.7/codegraph_cli_ai.egg-info/PKG-INFO +225 -0
- {codegraph_cli_ai-0.1.5 → codegraph_cli_ai-0.1.7}/codegraph_cli_ai.egg-info/SOURCES.txt +1 -0
- {codegraph_cli_ai-0.1.5 → codegraph_cli_ai-0.1.7}/pyproject.toml +2 -4
- codegraph_cli_ai-0.1.5/MANIFEST.in +0 -1
- codegraph_cli_ai-0.1.5/PKG-INFO +0 -17
- codegraph_cli_ai-0.1.5/codegraph_cli_ai.egg-info/PKG-INFO +0 -17
- {codegraph_cli_ai-0.1.5 → codegraph_cli_ai-0.1.7}/codegraph/cli.py +0 -0
- {codegraph_cli_ai-0.1.5 → codegraph_cli_ai-0.1.7}/codegraph/graph/builder.py +0 -0
- {codegraph_cli_ai-0.1.5 → codegraph_cli_ai-0.1.7}/codegraph/parsers/python_parser.py +0 -0
- {codegraph_cli_ai-0.1.5 → codegraph_cli_ai-0.1.7}/codegraph_cli_ai.egg-info/dependency_links.txt +0 -0
- {codegraph_cli_ai-0.1.5 → codegraph_cli_ai-0.1.7}/codegraph_cli_ai.egg-info/entry_points.txt +0 -0
- {codegraph_cli_ai-0.1.5 → codegraph_cli_ai-0.1.7}/codegraph_cli_ai.egg-info/requires.txt +0 -0
- {codegraph_cli_ai-0.1.5 → codegraph_cli_ai-0.1.7}/codegraph_cli_ai.egg-info/top_level.txt +0 -0
- {codegraph_cli_ai-0.1.5 → codegraph_cli_ai-0.1.7}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include README.md
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codegraph-cli-ai
|
|
3
|
+
Version: 0.1.7
|
|
4
|
+
Summary: CLI tool to analyze codebases and visualize knowledge graphs using AST
|
|
5
|
+
Author: Aditya Jogdand
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/AdityaJogdand/codegraph-ai
|
|
8
|
+
Keywords: code-analysis,ast,graph,cli,developer-tools
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: typer>=0.9.0
|
|
16
|
+
Requires-Dist: networkx>=3.0
|
|
17
|
+
Requires-Dist: pyvis>=0.3.2
|
|
18
|
+
|
|
19
|
+
# CodeGraph AI
|
|
20
|
+
|
|
21
|
+
**CodeGraph AI** is a CLI tool that analyzes your Python codebase and visualizes it as an interactive knowledge graph.
|
|
22
|
+
|
|
23
|
+
It helps developers understand:
|
|
24
|
+
|
|
25
|
+
* Code structure
|
|
26
|
+
* Function call relationships
|
|
27
|
+
* File dependencies
|
|
28
|
+
* Overall architecture
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
* AST-based parsing of Python code
|
|
35
|
+
* Function call graph generation
|
|
36
|
+
* Dependency graph (imports)
|
|
37
|
+
* Interactive visualization in browser
|
|
38
|
+
* Focus on specific files
|
|
39
|
+
* Hide external libraries (stdlib & third-party)
|
|
40
|
+
* Fast CLI-based workflow
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install codegraph-ai
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Quick Start
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
codegraph index
|
|
56
|
+
codegraph plot
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Commands
|
|
62
|
+
|
|
63
|
+
### 1. Index your codebase
|
|
64
|
+
|
|
65
|
+
Scan and build the graph:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
codegraph index
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Index a specific folder:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
codegraph index path/to/your/project
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
### 2. Visualize the graph
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
codegraph plot
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
This opens an interactive graph in your browser.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Advanced Usage
|
|
90
|
+
|
|
91
|
+
### Hide external libraries
|
|
92
|
+
|
|
93
|
+
Removes standard library and third-party dependencies from the graph:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
codegraph plot --hide-external
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### Focus on a specific file
|
|
102
|
+
|
|
103
|
+
Shows only a file and its direct relationships:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
codegraph plot --focus cli.py
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### Filter by node type
|
|
112
|
+
|
|
113
|
+
Show only certain types of nodes:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
codegraph plot --level file
|
|
117
|
+
codegraph plot --level function
|
|
118
|
+
codegraph plot --level class
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### Filter by edge type
|
|
124
|
+
|
|
125
|
+
Show only specific relationships:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
codegraph plot --edge-type calls
|
|
129
|
+
codegraph plot --edge-type imports
|
|
130
|
+
codegraph plot --edge-type contains
|
|
131
|
+
codegraph plot --edge-type all
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### Combine filters
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
codegraph plot --focus cli.py --hide-external --edge-type calls
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## How It Works
|
|
145
|
+
|
|
146
|
+
1. Parses Python files using AST
|
|
147
|
+
2. Extracts:
|
|
148
|
+
|
|
149
|
+
* Functions
|
|
150
|
+
* Classes
|
|
151
|
+
* Imports
|
|
152
|
+
* Function calls
|
|
153
|
+
3. Builds a directed knowledge graph
|
|
154
|
+
4. Renders it as an interactive visualization
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Graph Semantics
|
|
159
|
+
|
|
160
|
+
### Node Types
|
|
161
|
+
|
|
162
|
+
| Type | Description |
|
|
163
|
+
| -------- | ------------------- |
|
|
164
|
+
| File | Python file |
|
|
165
|
+
| Function | Function or method |
|
|
166
|
+
| Class | Class definition |
|
|
167
|
+
| Module | External dependency |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### Edge Types
|
|
172
|
+
|
|
173
|
+
| Relation | Meaning |
|
|
174
|
+
| ---------- | ------------------------------- |
|
|
175
|
+
| contains | File/Class contains function |
|
|
176
|
+
| calls | Function calls another function |
|
|
177
|
+
| imports | File imports module |
|
|
178
|
+
| defined_in | Function belongs to file |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Output Files
|
|
183
|
+
|
|
184
|
+
After indexing:
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
.codegraph/graph.json
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
After visualization:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
graph.html
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Example Workflow
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
codegraph index
|
|
202
|
+
codegraph plot --hide-external
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Use Cases
|
|
208
|
+
|
|
209
|
+
* Understand large codebases quickly
|
|
210
|
+
* Visualize architecture
|
|
211
|
+
* Debug dependencies
|
|
212
|
+
* Explore function interactions
|
|
213
|
+
* Prepare for refactoring
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Author
|
|
218
|
+
|
|
219
|
+
Aditya Jogdand
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## License
|
|
224
|
+
|
|
225
|
+
MIT License
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# CodeGraph AI
|
|
2
|
+
|
|
3
|
+
**CodeGraph AI** is a CLI tool that analyzes your Python codebase and visualizes it as an interactive knowledge graph.
|
|
4
|
+
|
|
5
|
+
It helps developers understand:
|
|
6
|
+
|
|
7
|
+
* Code structure
|
|
8
|
+
* Function call relationships
|
|
9
|
+
* File dependencies
|
|
10
|
+
* Overall architecture
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
* AST-based parsing of Python code
|
|
17
|
+
* Function call graph generation
|
|
18
|
+
* Dependency graph (imports)
|
|
19
|
+
* Interactive visualization in browser
|
|
20
|
+
* Focus on specific files
|
|
21
|
+
* Hide external libraries (stdlib & third-party)
|
|
22
|
+
* Fast CLI-based workflow
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install codegraph-ai
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
codegraph index
|
|
38
|
+
codegraph plot
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Commands
|
|
44
|
+
|
|
45
|
+
### 1. Index your codebase
|
|
46
|
+
|
|
47
|
+
Scan and build the graph:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
codegraph index
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Index a specific folder:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
codegraph index path/to/your/project
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### 2. Visualize the graph
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
codegraph plot
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
This opens an interactive graph in your browser.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Advanced Usage
|
|
72
|
+
|
|
73
|
+
### Hide external libraries
|
|
74
|
+
|
|
75
|
+
Removes standard library and third-party dependencies from the graph:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
codegraph plot --hide-external
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### Focus on a specific file
|
|
84
|
+
|
|
85
|
+
Shows only a file and its direct relationships:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
codegraph plot --focus cli.py
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### Filter by node type
|
|
94
|
+
|
|
95
|
+
Show only certain types of nodes:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
codegraph plot --level file
|
|
99
|
+
codegraph plot --level function
|
|
100
|
+
codegraph plot --level class
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### Filter by edge type
|
|
106
|
+
|
|
107
|
+
Show only specific relationships:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
codegraph plot --edge-type calls
|
|
111
|
+
codegraph plot --edge-type imports
|
|
112
|
+
codegraph plot --edge-type contains
|
|
113
|
+
codegraph plot --edge-type all
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### Combine filters
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
codegraph plot --focus cli.py --hide-external --edge-type calls
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## How It Works
|
|
127
|
+
|
|
128
|
+
1. Parses Python files using AST
|
|
129
|
+
2. Extracts:
|
|
130
|
+
|
|
131
|
+
* Functions
|
|
132
|
+
* Classes
|
|
133
|
+
* Imports
|
|
134
|
+
* Function calls
|
|
135
|
+
3. Builds a directed knowledge graph
|
|
136
|
+
4. Renders it as an interactive visualization
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Graph Semantics
|
|
141
|
+
|
|
142
|
+
### Node Types
|
|
143
|
+
|
|
144
|
+
| Type | Description |
|
|
145
|
+
| -------- | ------------------- |
|
|
146
|
+
| File | Python file |
|
|
147
|
+
| Function | Function or method |
|
|
148
|
+
| Class | Class definition |
|
|
149
|
+
| Module | External dependency |
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### Edge Types
|
|
154
|
+
|
|
155
|
+
| Relation | Meaning |
|
|
156
|
+
| ---------- | ------------------------------- |
|
|
157
|
+
| contains | File/Class contains function |
|
|
158
|
+
| calls | Function calls another function |
|
|
159
|
+
| imports | File imports module |
|
|
160
|
+
| defined_in | Function belongs to file |
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Output Files
|
|
165
|
+
|
|
166
|
+
After indexing:
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
.codegraph/graph.json
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
After visualization:
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
graph.html
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Example Workflow
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
codegraph index
|
|
184
|
+
codegraph plot --hide-external
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Use Cases
|
|
190
|
+
|
|
191
|
+
* Understand large codebases quickly
|
|
192
|
+
* Visualize architecture
|
|
193
|
+
* Debug dependencies
|
|
194
|
+
* Explore function interactions
|
|
195
|
+
* Prepare for refactoring
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Author
|
|
200
|
+
|
|
201
|
+
Aditya Jogdand
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## License
|
|
206
|
+
|
|
207
|
+
MIT License
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codegraph-cli-ai
|
|
3
|
+
Version: 0.1.7
|
|
4
|
+
Summary: CLI tool to analyze codebases and visualize knowledge graphs using AST
|
|
5
|
+
Author: Aditya Jogdand
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/AdityaJogdand/codegraph-ai
|
|
8
|
+
Keywords: code-analysis,ast,graph,cli,developer-tools
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: typer>=0.9.0
|
|
16
|
+
Requires-Dist: networkx>=3.0
|
|
17
|
+
Requires-Dist: pyvis>=0.3.2
|
|
18
|
+
|
|
19
|
+
# CodeGraph AI
|
|
20
|
+
|
|
21
|
+
**CodeGraph AI** is a CLI tool that analyzes your Python codebase and visualizes it as an interactive knowledge graph.
|
|
22
|
+
|
|
23
|
+
It helps developers understand:
|
|
24
|
+
|
|
25
|
+
* Code structure
|
|
26
|
+
* Function call relationships
|
|
27
|
+
* File dependencies
|
|
28
|
+
* Overall architecture
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
* AST-based parsing of Python code
|
|
35
|
+
* Function call graph generation
|
|
36
|
+
* Dependency graph (imports)
|
|
37
|
+
* Interactive visualization in browser
|
|
38
|
+
* Focus on specific files
|
|
39
|
+
* Hide external libraries (stdlib & third-party)
|
|
40
|
+
* Fast CLI-based workflow
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install codegraph-ai
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Quick Start
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
codegraph index
|
|
56
|
+
codegraph plot
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Commands
|
|
62
|
+
|
|
63
|
+
### 1. Index your codebase
|
|
64
|
+
|
|
65
|
+
Scan and build the graph:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
codegraph index
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Index a specific folder:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
codegraph index path/to/your/project
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
### 2. Visualize the graph
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
codegraph plot
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
This opens an interactive graph in your browser.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Advanced Usage
|
|
90
|
+
|
|
91
|
+
### Hide external libraries
|
|
92
|
+
|
|
93
|
+
Removes standard library and third-party dependencies from the graph:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
codegraph plot --hide-external
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### Focus on a specific file
|
|
102
|
+
|
|
103
|
+
Shows only a file and its direct relationships:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
codegraph plot --focus cli.py
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### Filter by node type
|
|
112
|
+
|
|
113
|
+
Show only certain types of nodes:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
codegraph plot --level file
|
|
117
|
+
codegraph plot --level function
|
|
118
|
+
codegraph plot --level class
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### Filter by edge type
|
|
124
|
+
|
|
125
|
+
Show only specific relationships:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
codegraph plot --edge-type calls
|
|
129
|
+
codegraph plot --edge-type imports
|
|
130
|
+
codegraph plot --edge-type contains
|
|
131
|
+
codegraph plot --edge-type all
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### Combine filters
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
codegraph plot --focus cli.py --hide-external --edge-type calls
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## How It Works
|
|
145
|
+
|
|
146
|
+
1. Parses Python files using AST
|
|
147
|
+
2. Extracts:
|
|
148
|
+
|
|
149
|
+
* Functions
|
|
150
|
+
* Classes
|
|
151
|
+
* Imports
|
|
152
|
+
* Function calls
|
|
153
|
+
3. Builds a directed knowledge graph
|
|
154
|
+
4. Renders it as an interactive visualization
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Graph Semantics
|
|
159
|
+
|
|
160
|
+
### Node Types
|
|
161
|
+
|
|
162
|
+
| Type | Description |
|
|
163
|
+
| -------- | ------------------- |
|
|
164
|
+
| File | Python file |
|
|
165
|
+
| Function | Function or method |
|
|
166
|
+
| Class | Class definition |
|
|
167
|
+
| Module | External dependency |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### Edge Types
|
|
172
|
+
|
|
173
|
+
| Relation | Meaning |
|
|
174
|
+
| ---------- | ------------------------------- |
|
|
175
|
+
| contains | File/Class contains function |
|
|
176
|
+
| calls | Function calls another function |
|
|
177
|
+
| imports | File imports module |
|
|
178
|
+
| defined_in | Function belongs to file |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Output Files
|
|
183
|
+
|
|
184
|
+
After indexing:
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
.codegraph/graph.json
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
After visualization:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
graph.html
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Example Workflow
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
codegraph index
|
|
202
|
+
codegraph plot --hide-external
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Use Cases
|
|
208
|
+
|
|
209
|
+
* Understand large codebases quickly
|
|
210
|
+
* Visualize architecture
|
|
211
|
+
* Debug dependencies
|
|
212
|
+
* Explore function interactions
|
|
213
|
+
* Prepare for refactoring
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Author
|
|
218
|
+
|
|
219
|
+
Aditya Jogdand
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## License
|
|
224
|
+
|
|
225
|
+
MIT License
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "codegraph-cli-ai"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.7"
|
|
8
8
|
description = "CLI tool to analyze codebases and visualize knowledge graphs using AST"
|
|
9
9
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -20,7 +20,7 @@ classifiers = [
|
|
|
20
20
|
"Programming Language :: Python :: 3",
|
|
21
21
|
"Programming Language :: Python :: 3.9",
|
|
22
22
|
"License :: OSI Approved :: MIT License",
|
|
23
|
-
"Operating System :: OS Independent"
|
|
23
|
+
"Operating System :: OS Independent"
|
|
24
24
|
]
|
|
25
25
|
|
|
26
26
|
dependencies = [
|
|
@@ -35,10 +35,8 @@ codegraph = "codegraph.cli:app"
|
|
|
35
35
|
[project.urls]
|
|
36
36
|
Homepage = "https://github.com/AdityaJogdand/codegraph-ai"
|
|
37
37
|
|
|
38
|
-
# 🔥 IMPORTANT: ensures README and other files are included
|
|
39
38
|
[tool.setuptools]
|
|
40
39
|
include-package-data = true
|
|
41
40
|
|
|
42
|
-
# 🔥 Explicitly include package
|
|
43
41
|
[tool.setuptools.packages.find]
|
|
44
42
|
where = ["."]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
include ./README.md
|
codegraph_cli_ai-0.1.5/PKG-INFO
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: codegraph-cli-ai
|
|
3
|
-
Version: 0.1.5
|
|
4
|
-
Summary: CLI tool to analyze codebases and visualize knowledge graphs using AST
|
|
5
|
-
Author: Aditya Jogdand
|
|
6
|
-
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/AdityaJogdand/codegraph-ai
|
|
8
|
-
Keywords: code-analysis,ast,graph,cli,developer-tools
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
-
Classifier: Operating System :: OS Independent
|
|
13
|
-
Requires-Python: >=3.9
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: typer>=0.9.0
|
|
16
|
-
Requires-Dist: networkx>=3.0
|
|
17
|
-
Requires-Dist: pyvis>=0.3.2
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: codegraph-cli-ai
|
|
3
|
-
Version: 0.1.5
|
|
4
|
-
Summary: CLI tool to analyze codebases and visualize knowledge graphs using AST
|
|
5
|
-
Author: Aditya Jogdand
|
|
6
|
-
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/AdityaJogdand/codegraph-ai
|
|
8
|
-
Keywords: code-analysis,ast,graph,cli,developer-tools
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
-
Classifier: Operating System :: OS Independent
|
|
13
|
-
Requires-Python: >=3.9
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: typer>=0.9.0
|
|
16
|
-
Requires-Dist: networkx>=3.0
|
|
17
|
-
Requires-Dist: pyvis>=0.3.2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegraph_cli_ai-0.1.5 → codegraph_cli_ai-0.1.7}/codegraph_cli_ai.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{codegraph_cli_ai-0.1.5 → codegraph_cli_ai-0.1.7}/codegraph_cli_ai.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|