codegraph-cli 2.1.0__tar.gz → 2.1.1__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-2.1.0 → codegraph_cli-2.1.1}/PKG-INFO +51 -8
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/README.md +50 -7
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/cli_chat.py +7 -2
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/crew_agents.py +6 -1
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/crew_chat.py +5 -1
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/crew_tools.py +9 -1
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli.egg-info/PKG-INFO +51 -8
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/pyproject.toml +1 -1
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/LICENSE +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/__init__.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/agents.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/bug_detector.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/chat_agent.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/chat_session.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/cli.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/cli_diagnose.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/cli_refactor.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/cli_setup.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/cli_test.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/cli_v2.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/codegen_agent.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/config.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/config_manager.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/context_manager.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/diff_engine.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/embeddings.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/graph_export.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/llm.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/models.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/models_v2.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/orchestrator.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/parser.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/performance_analyzer.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/project_context.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/rag.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/refactor_agent.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/security_scanner.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/storage.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/templates/graph_interactive.html +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/testgen_agent.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/validation_engine.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli/vector_store.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli.egg-info/SOURCES.txt +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli.egg-info/dependency_links.txt +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli.egg-info/entry_points.txt +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli.egg-info/requires.txt +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/codegraph_cli.egg-info/top_level.txt +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/setup.cfg +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/tests/test_agents.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/tests/test_bug_detector.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/tests/test_cli.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/tests/test_parser.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/tests/test_security_scanner.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/tests/test_storage.py +0 -0
- {codegraph_cli-2.1.0 → codegraph_cli-2.1.1}/tests/test_vector_store.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codegraph-cli
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: AI-powered code intelligence CLI with multi-agent analysis, impact graphs, and conversational coding.
|
|
5
5
|
Author-email: Ali Nasir <muhammadalinasir00786@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -59,7 +59,7 @@ Dynamic: license-file
|
|
|
59
59
|
|
|
60
60
|
[](LICENSE)
|
|
61
61
|
[](https://www.python.org)
|
|
62
|
-
[](https://github.com/al1-nasir/codegraph-cli)
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
@@ -84,12 +84,24 @@ Core capabilities:
|
|
|
84
84
|
pip install codegraph-cli
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
+
With neural embedding models (semantic code search):
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pip install codegraph-cli[embeddings]
|
|
91
|
+
```
|
|
92
|
+
|
|
87
93
|
With CrewAI multi-agent support:
|
|
88
94
|
|
|
89
95
|
```bash
|
|
90
96
|
pip install codegraph-cli[crew]
|
|
91
97
|
```
|
|
92
98
|
|
|
99
|
+
Everything:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
pip install codegraph-cli[all]
|
|
103
|
+
```
|
|
104
|
+
|
|
93
105
|
For development:
|
|
94
106
|
|
|
95
107
|
```bash
|
|
@@ -156,6 +168,34 @@ cg unset-llm # reset to defaults
|
|
|
156
168
|
|
|
157
169
|
---
|
|
158
170
|
|
|
171
|
+
## Embedding Models
|
|
172
|
+
|
|
173
|
+
CodeGraph supports configurable embedding models for semantic code search. Choose based on your hardware and quality needs:
|
|
174
|
+
|
|
175
|
+
| Model | Download | Dim | Quality | Command |
|
|
176
|
+
|-------|----------|-----|---------|---------|
|
|
177
|
+
| hash | 0 bytes | 256 | Keyword-only | `cg set-embedding hash` |
|
|
178
|
+
| minilm | ~80 MB | 384 | Decent | `cg set-embedding minilm` |
|
|
179
|
+
| bge-base | ~440 MB | 768 | Good | `cg set-embedding bge-base` |
|
|
180
|
+
| jina-code | ~550 MB | 768 | Code-aware | `cg set-embedding jina-code` |
|
|
181
|
+
| qodo-1.5b | ~6.2 GB | 1536 | Best | `cg set-embedding qodo-1.5b` |
|
|
182
|
+
|
|
183
|
+
The default is `hash` (zero-dependency, no download). Neural models require the `[embeddings]` extra and are downloaded on first use from HuggingFace.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
cg set-embedding jina-code # switch to a neural model
|
|
187
|
+
cg show-embedding # view current model and all options
|
|
188
|
+
cg unset-embedding # reset to hash default
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
After changing the embedding model, re-index your project:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
cg index /path/to/project
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
159
199
|
## Commands
|
|
160
200
|
|
|
161
201
|
### Project Management
|
|
@@ -252,8 +292,9 @@ CLI Layer (Typer)
|
|
|
252
292
|
| | |
|
|
253
293
|
| +-- Parser (tree-sitter) +-- VectorStore (LanceDB)
|
|
254
294
|
| +-- RAGRetriever |
|
|
255
|
-
| +-- LLM Adapter +-- Embeddings
|
|
256
|
-
|
|
|
295
|
+
| +-- LLM Adapter +-- Embeddings (configurable)
|
|
296
|
+
| hash | minilm | bge-base
|
|
297
|
+
| jina-code | qodo-1.5b
|
|
257
298
|
+-- ChatAgent (standard mode)
|
|
258
299
|
|
|
|
259
300
|
+-- CrewChatAgent (--crew mode)
|
|
@@ -264,6 +305,8 @@ CLI Layer (Typer)
|
|
|
264
305
|
+-- Code Analysis Agent ---> 3 search/analysis tools
|
|
265
306
|
```
|
|
266
307
|
|
|
308
|
+
**Embeddings**: Five models available via `cg set-embedding`. Hash (default, zero-dependency) through Qodo-Embed-1-1.5B (best quality, 6 GB). Neural models use raw `transformers` + `torch` — no sentence-transformers overhead. Models are cached in `~/.codegraph/models/`.
|
|
309
|
+
|
|
267
310
|
**Parser**: tree-sitter grammars for Python, JavaScript, and TypeScript. Extracts modules, classes, functions, imports, and call relationships into a directed graph.
|
|
268
311
|
|
|
269
312
|
**Storage**: SQLite for the code graph (nodes + edges), LanceDB for vector embeddings. All data stored under `~/.codegraph/`.
|
|
@@ -278,14 +321,14 @@ CLI Layer (Typer)
|
|
|
278
321
|
codegraph_cli/
|
|
279
322
|
cli.py # main Typer application, all top-level commands
|
|
280
323
|
cli_chat.py # interactive chat REPL with styled output
|
|
281
|
-
cli_setup.py # setup wizard, set-llm, unset-llm,
|
|
324
|
+
cli_setup.py # setup wizard, set-llm, unset-llm, set-embedding
|
|
282
325
|
cli_v2.py # v2 code generation commands
|
|
283
326
|
config.py # loads config from TOML
|
|
284
|
-
config_manager.py # TOML read/write, provider
|
|
327
|
+
config_manager.py # TOML read/write, provider and embedding config
|
|
285
328
|
llm.py # multi-provider LLM adapter
|
|
286
329
|
parser.py # tree-sitter AST parsing
|
|
287
330
|
storage.py # SQLite graph store
|
|
288
|
-
embeddings.py #
|
|
331
|
+
embeddings.py # configurable embedding engine (5 models)
|
|
289
332
|
rag.py # RAG retriever
|
|
290
333
|
vector_store.py # LanceDB vector store
|
|
291
334
|
orchestrator.py # coordinates parsing, search, impact
|
|
@@ -310,7 +353,7 @@ codegraph_cli/
|
|
|
310
353
|
git clone https://github.com/al1-nasir/codegraph-cli.git
|
|
311
354
|
cd codegraph-cli
|
|
312
355
|
python -m venv .venv && source .venv/bin/activate
|
|
313
|
-
pip install -e ".[dev,crew]"
|
|
356
|
+
pip install -e ".[dev,crew,embeddings]"
|
|
314
357
|
pytest
|
|
315
358
|
```
|
|
316
359
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](https://www.python.org)
|
|
7
|
-
[](https://github.com/al1-nasir/codegraph-cli)
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -29,12 +29,24 @@ Core capabilities:
|
|
|
29
29
|
pip install codegraph-cli
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
With neural embedding models (semantic code search):
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install codegraph-cli[embeddings]
|
|
36
|
+
```
|
|
37
|
+
|
|
32
38
|
With CrewAI multi-agent support:
|
|
33
39
|
|
|
34
40
|
```bash
|
|
35
41
|
pip install codegraph-cli[crew]
|
|
36
42
|
```
|
|
37
43
|
|
|
44
|
+
Everything:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install codegraph-cli[all]
|
|
48
|
+
```
|
|
49
|
+
|
|
38
50
|
For development:
|
|
39
51
|
|
|
40
52
|
```bash
|
|
@@ -101,6 +113,34 @@ cg unset-llm # reset to defaults
|
|
|
101
113
|
|
|
102
114
|
---
|
|
103
115
|
|
|
116
|
+
## Embedding Models
|
|
117
|
+
|
|
118
|
+
CodeGraph supports configurable embedding models for semantic code search. Choose based on your hardware and quality needs:
|
|
119
|
+
|
|
120
|
+
| Model | Download | Dim | Quality | Command |
|
|
121
|
+
|-------|----------|-----|---------|---------|
|
|
122
|
+
| hash | 0 bytes | 256 | Keyword-only | `cg set-embedding hash` |
|
|
123
|
+
| minilm | ~80 MB | 384 | Decent | `cg set-embedding minilm` |
|
|
124
|
+
| bge-base | ~440 MB | 768 | Good | `cg set-embedding bge-base` |
|
|
125
|
+
| jina-code | ~550 MB | 768 | Code-aware | `cg set-embedding jina-code` |
|
|
126
|
+
| qodo-1.5b | ~6.2 GB | 1536 | Best | `cg set-embedding qodo-1.5b` |
|
|
127
|
+
|
|
128
|
+
The default is `hash` (zero-dependency, no download). Neural models require the `[embeddings]` extra and are downloaded on first use from HuggingFace.
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
cg set-embedding jina-code # switch to a neural model
|
|
132
|
+
cg show-embedding # view current model and all options
|
|
133
|
+
cg unset-embedding # reset to hash default
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
After changing the embedding model, re-index your project:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
cg index /path/to/project
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
104
144
|
## Commands
|
|
105
145
|
|
|
106
146
|
### Project Management
|
|
@@ -197,8 +237,9 @@ CLI Layer (Typer)
|
|
|
197
237
|
| | |
|
|
198
238
|
| +-- Parser (tree-sitter) +-- VectorStore (LanceDB)
|
|
199
239
|
| +-- RAGRetriever |
|
|
200
|
-
| +-- LLM Adapter +-- Embeddings
|
|
201
|
-
|
|
|
240
|
+
| +-- LLM Adapter +-- Embeddings (configurable)
|
|
241
|
+
| hash | minilm | bge-base
|
|
242
|
+
| jina-code | qodo-1.5b
|
|
202
243
|
+-- ChatAgent (standard mode)
|
|
203
244
|
|
|
|
204
245
|
+-- CrewChatAgent (--crew mode)
|
|
@@ -209,6 +250,8 @@ CLI Layer (Typer)
|
|
|
209
250
|
+-- Code Analysis Agent ---> 3 search/analysis tools
|
|
210
251
|
```
|
|
211
252
|
|
|
253
|
+
**Embeddings**: Five models available via `cg set-embedding`. Hash (default, zero-dependency) through Qodo-Embed-1-1.5B (best quality, 6 GB). Neural models use raw `transformers` + `torch` — no sentence-transformers overhead. Models are cached in `~/.codegraph/models/`.
|
|
254
|
+
|
|
212
255
|
**Parser**: tree-sitter grammars for Python, JavaScript, and TypeScript. Extracts modules, classes, functions, imports, and call relationships into a directed graph.
|
|
213
256
|
|
|
214
257
|
**Storage**: SQLite for the code graph (nodes + edges), LanceDB for vector embeddings. All data stored under `~/.codegraph/`.
|
|
@@ -223,14 +266,14 @@ CLI Layer (Typer)
|
|
|
223
266
|
codegraph_cli/
|
|
224
267
|
cli.py # main Typer application, all top-level commands
|
|
225
268
|
cli_chat.py # interactive chat REPL with styled output
|
|
226
|
-
cli_setup.py # setup wizard, set-llm, unset-llm,
|
|
269
|
+
cli_setup.py # setup wizard, set-llm, unset-llm, set-embedding
|
|
227
270
|
cli_v2.py # v2 code generation commands
|
|
228
271
|
config.py # loads config from TOML
|
|
229
|
-
config_manager.py # TOML read/write, provider
|
|
272
|
+
config_manager.py # TOML read/write, provider and embedding config
|
|
230
273
|
llm.py # multi-provider LLM adapter
|
|
231
274
|
parser.py # tree-sitter AST parsing
|
|
232
275
|
storage.py # SQLite graph store
|
|
233
|
-
embeddings.py #
|
|
276
|
+
embeddings.py # configurable embedding engine (5 models)
|
|
234
277
|
rag.py # RAG retriever
|
|
235
278
|
vector_store.py # LanceDB vector store
|
|
236
279
|
orchestrator.py # coordinates parsing, search, impact
|
|
@@ -255,7 +298,7 @@ codegraph_cli/
|
|
|
255
298
|
git clone https://github.com/al1-nasir/codegraph-cli.git
|
|
256
299
|
cd codegraph-cli
|
|
257
300
|
python -m venv .venv && source .venv/bin/activate
|
|
258
|
-
pip install -e ".[dev,crew]"
|
|
301
|
+
pip install -e ".[dev,crew,embeddings]"
|
|
259
302
|
pytest
|
|
260
303
|
```
|
|
261
304
|
|
|
@@ -13,7 +13,6 @@ import typer
|
|
|
13
13
|
from . import config
|
|
14
14
|
from .chat_agent import ChatAgent
|
|
15
15
|
from .chat_session import SessionManager
|
|
16
|
-
from .crew_chat import CrewChatAgent
|
|
17
16
|
from .llm import LocalLLM
|
|
18
17
|
from .orchestrator import MCPOrchestrator
|
|
19
18
|
from .rag import RAGRetriever
|
|
@@ -299,7 +298,13 @@ def start_chat(
|
|
|
299
298
|
rag_retriever = RAGRetriever(context.store, embedding_model)
|
|
300
299
|
|
|
301
300
|
if use_crew:
|
|
302
|
-
|
|
301
|
+
try:
|
|
302
|
+
from .crew_chat import CrewChatAgent
|
|
303
|
+
except ImportError:
|
|
304
|
+
print(f"\n {C_RED}CrewAI is not installed.{C_RESET}")
|
|
305
|
+
print(f" {C_DIM}Install with: pip install codegraph-cli[crew]{C_RESET}\n")
|
|
306
|
+
raise typer.Exit(1)
|
|
307
|
+
print(f"\n {C_MAGENTA}Initializing CrewAI multi-agent system...{C_RESET}")
|
|
303
308
|
agent = CrewChatAgent(context, llm, rag_retriever)
|
|
304
309
|
else:
|
|
305
310
|
orchestrator = MCPOrchestrator(
|
|
@@ -4,7 +4,12 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing import TYPE_CHECKING, List
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
try:
|
|
8
|
+
from crewai import Agent
|
|
9
|
+
CREWAI_AVAILABLE = True
|
|
10
|
+
except ImportError:
|
|
11
|
+
Agent = None # type: ignore
|
|
12
|
+
CREWAI_AVAILABLE = False
|
|
8
13
|
|
|
9
14
|
if TYPE_CHECKING:
|
|
10
15
|
from .crew_tools import create_tools
|
|
@@ -8,7 +8,11 @@ from typing import TYPE_CHECKING, Dict, List
|
|
|
8
8
|
|
|
9
9
|
from datetime import datetime
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
try:
|
|
12
|
+
from crewai import Agent, Crew, Task
|
|
13
|
+
CREWAI_AVAILABLE = True
|
|
14
|
+
except ImportError:
|
|
15
|
+
CREWAI_AVAILABLE = False
|
|
12
16
|
|
|
13
17
|
from .crew_agents import (
|
|
14
18
|
create_code_analysis_agent,
|
|
@@ -9,7 +9,15 @@ from datetime import datetime
|
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Type
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
try:
|
|
13
|
+
from crewai.tools import BaseTool
|
|
14
|
+
CREWAI_AVAILABLE = True
|
|
15
|
+
except ImportError:
|
|
16
|
+
# Provide a dummy base class so the module can still be imported
|
|
17
|
+
class BaseTool: # type: ignore
|
|
18
|
+
def __init_subclass__(cls, **kwargs): pass
|
|
19
|
+
def __init__(self, **kwargs): pass
|
|
20
|
+
CREWAI_AVAILABLE = False
|
|
13
21
|
from pydantic import BaseModel, Field, PrivateAttr
|
|
14
22
|
|
|
15
23
|
if TYPE_CHECKING:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codegraph-cli
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: AI-powered code intelligence CLI with multi-agent analysis, impact graphs, and conversational coding.
|
|
5
5
|
Author-email: Ali Nasir <muhammadalinasir00786@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -59,7 +59,7 @@ Dynamic: license-file
|
|
|
59
59
|
|
|
60
60
|
[](LICENSE)
|
|
61
61
|
[](https://www.python.org)
|
|
62
|
-
[](https://github.com/al1-nasir/codegraph-cli)
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
@@ -84,12 +84,24 @@ Core capabilities:
|
|
|
84
84
|
pip install codegraph-cli
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
+
With neural embedding models (semantic code search):
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pip install codegraph-cli[embeddings]
|
|
91
|
+
```
|
|
92
|
+
|
|
87
93
|
With CrewAI multi-agent support:
|
|
88
94
|
|
|
89
95
|
```bash
|
|
90
96
|
pip install codegraph-cli[crew]
|
|
91
97
|
```
|
|
92
98
|
|
|
99
|
+
Everything:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
pip install codegraph-cli[all]
|
|
103
|
+
```
|
|
104
|
+
|
|
93
105
|
For development:
|
|
94
106
|
|
|
95
107
|
```bash
|
|
@@ -156,6 +168,34 @@ cg unset-llm # reset to defaults
|
|
|
156
168
|
|
|
157
169
|
---
|
|
158
170
|
|
|
171
|
+
## Embedding Models
|
|
172
|
+
|
|
173
|
+
CodeGraph supports configurable embedding models for semantic code search. Choose based on your hardware and quality needs:
|
|
174
|
+
|
|
175
|
+
| Model | Download | Dim | Quality | Command |
|
|
176
|
+
|-------|----------|-----|---------|---------|
|
|
177
|
+
| hash | 0 bytes | 256 | Keyword-only | `cg set-embedding hash` |
|
|
178
|
+
| minilm | ~80 MB | 384 | Decent | `cg set-embedding minilm` |
|
|
179
|
+
| bge-base | ~440 MB | 768 | Good | `cg set-embedding bge-base` |
|
|
180
|
+
| jina-code | ~550 MB | 768 | Code-aware | `cg set-embedding jina-code` |
|
|
181
|
+
| qodo-1.5b | ~6.2 GB | 1536 | Best | `cg set-embedding qodo-1.5b` |
|
|
182
|
+
|
|
183
|
+
The default is `hash` (zero-dependency, no download). Neural models require the `[embeddings]` extra and are downloaded on first use from HuggingFace.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
cg set-embedding jina-code # switch to a neural model
|
|
187
|
+
cg show-embedding # view current model and all options
|
|
188
|
+
cg unset-embedding # reset to hash default
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
After changing the embedding model, re-index your project:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
cg index /path/to/project
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
159
199
|
## Commands
|
|
160
200
|
|
|
161
201
|
### Project Management
|
|
@@ -252,8 +292,9 @@ CLI Layer (Typer)
|
|
|
252
292
|
| | |
|
|
253
293
|
| +-- Parser (tree-sitter) +-- VectorStore (LanceDB)
|
|
254
294
|
| +-- RAGRetriever |
|
|
255
|
-
| +-- LLM Adapter +-- Embeddings
|
|
256
|
-
|
|
|
295
|
+
| +-- LLM Adapter +-- Embeddings (configurable)
|
|
296
|
+
| hash | minilm | bge-base
|
|
297
|
+
| jina-code | qodo-1.5b
|
|
257
298
|
+-- ChatAgent (standard mode)
|
|
258
299
|
|
|
|
259
300
|
+-- CrewChatAgent (--crew mode)
|
|
@@ -264,6 +305,8 @@ CLI Layer (Typer)
|
|
|
264
305
|
+-- Code Analysis Agent ---> 3 search/analysis tools
|
|
265
306
|
```
|
|
266
307
|
|
|
308
|
+
**Embeddings**: Five models available via `cg set-embedding`. Hash (default, zero-dependency) through Qodo-Embed-1-1.5B (best quality, 6 GB). Neural models use raw `transformers` + `torch` — no sentence-transformers overhead. Models are cached in `~/.codegraph/models/`.
|
|
309
|
+
|
|
267
310
|
**Parser**: tree-sitter grammars for Python, JavaScript, and TypeScript. Extracts modules, classes, functions, imports, and call relationships into a directed graph.
|
|
268
311
|
|
|
269
312
|
**Storage**: SQLite for the code graph (nodes + edges), LanceDB for vector embeddings. All data stored under `~/.codegraph/`.
|
|
@@ -278,14 +321,14 @@ CLI Layer (Typer)
|
|
|
278
321
|
codegraph_cli/
|
|
279
322
|
cli.py # main Typer application, all top-level commands
|
|
280
323
|
cli_chat.py # interactive chat REPL with styled output
|
|
281
|
-
cli_setup.py # setup wizard, set-llm, unset-llm,
|
|
324
|
+
cli_setup.py # setup wizard, set-llm, unset-llm, set-embedding
|
|
282
325
|
cli_v2.py # v2 code generation commands
|
|
283
326
|
config.py # loads config from TOML
|
|
284
|
-
config_manager.py # TOML read/write, provider
|
|
327
|
+
config_manager.py # TOML read/write, provider and embedding config
|
|
285
328
|
llm.py # multi-provider LLM adapter
|
|
286
329
|
parser.py # tree-sitter AST parsing
|
|
287
330
|
storage.py # SQLite graph store
|
|
288
|
-
embeddings.py #
|
|
331
|
+
embeddings.py # configurable embedding engine (5 models)
|
|
289
332
|
rag.py # RAG retriever
|
|
290
333
|
vector_store.py # LanceDB vector store
|
|
291
334
|
orchestrator.py # coordinates parsing, search, impact
|
|
@@ -310,7 +353,7 @@ codegraph_cli/
|
|
|
310
353
|
git clone https://github.com/al1-nasir/codegraph-cli.git
|
|
311
354
|
cd codegraph-cli
|
|
312
355
|
python -m venv .venv && source .venv/bin/activate
|
|
313
|
-
pip install -e ".[dev,crew]"
|
|
356
|
+
pip install -e ".[dev,crew,embeddings]"
|
|
314
357
|
pytest
|
|
315
358
|
```
|
|
316
359
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "codegraph-cli"
|
|
7
|
-
version = "2.1.
|
|
7
|
+
version = "2.1.1"
|
|
8
8
|
description = "AI-powered code intelligence CLI with multi-agent analysis, impact graphs, and conversational coding."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|