@vohongtho.infotech/code-intel 0.1.5 → 0.3.0
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.
- package/README.md +53 -30
- package/dist/cli/main.js +11213 -4299
- package/dist/cli/main.js.map +1 -1
- package/dist/index.d.ts +49 -4
- package/dist/index.js +8352 -3544
- package/dist/index.js.map +1 -1
- package/dist/wasm/tree-sitter-dart.wasm +0 -0
- package/dist/web/assets/index-CkCM74It.js +338 -0
- package/dist/web/assets/index-eJGDkRsL.css +2 -0
- package/dist/web/index.html +13 -0
- package/package.json +46 -5
package/README.md
CHANGED
|
@@ -17,31 +17,35 @@ A static code analysis platform that builds a **Knowledge Graph** from your sour
|
|
|
17
17
|
- **HTTP API** — REST endpoints for graph, search, inspect, blast radius, flows
|
|
18
18
|
- **MCP Server** — Model Context Protocol integration for LLM tooling
|
|
19
19
|
- **CLI** — analyze, serve, search, inspect, impact commands with animated progress bars and spinners
|
|
20
|
-
- **Multi-language** — TypeScript, JavaScript, Python, Java, Go, C, C++, C#, Rust, PHP,
|
|
20
|
+
- **Multi-language** — TypeScript, JavaScript, Python, Java, Go, C, C++, C#, Rust, PHP, Ruby, Swift, Kotlin, Dart (14 languages via tree-sitter AST)
|
|
21
|
+
- **Incremental Analysis** — `--incremental` re-parses only changed files; 10k-file repo / 3 changes: 288ms
|
|
22
|
+
- **Parallel Analysis** — `--parallel` runs parse + resolve phases on worker threads for large repos
|
|
21
23
|
- **Structured Logging** — winston-based logger with daily-rotating log files, sensitive-data masking, and configurable log levels
|
|
22
24
|
|
|
23
25
|
---
|
|
24
26
|
|
|
25
27
|
## 🚀 Quick Start
|
|
26
28
|
|
|
27
|
-
### Install
|
|
29
|
+
### Install from npm _(recommended)_
|
|
28
30
|
|
|
29
31
|
```bash
|
|
30
|
-
npm install
|
|
31
|
-
npm run build
|
|
32
|
+
npm install -g @vohongtho.infotech/code-intel
|
|
32
33
|
```
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
The `code-intel` binary is placed in your `$PATH` automatically (via the `bin` field in `package.json`).
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
# Analyze current directory and start the server
|
|
38
|
-
node code-intel/core/dist/cli/main.js serve
|
|
37
|
+
Verify:
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
```bash
|
|
40
|
+
code-intel --version
|
|
42
41
|
```
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
### Build from source
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm install --legacy-peer-deps
|
|
47
|
+
npm run build
|
|
48
|
+
```
|
|
45
49
|
|
|
46
50
|
---
|
|
47
51
|
|
|
@@ -144,8 +148,12 @@ Sensitive data (passwords, tokens, API keys, emails, etc.) is automatically mask
|
|
|
144
148
|
|
|
145
149
|
```bash
|
|
146
150
|
code-intel analyze [path] # Analyze and persist graph
|
|
151
|
+
code-intel analyze --incremental # Re-parse only changed files (git diff / mtime)
|
|
152
|
+
code-intel analyze --parallel # Use worker threads (faster on multi-core)
|
|
153
|
+
code-intel analyze --skills # Emit per-cluster SKILL.md files
|
|
147
154
|
code-intel serve [path] -p 4747 # Analyze + start HTTP server
|
|
148
155
|
code-intel mcp [path] # Start MCP server (stdio)
|
|
156
|
+
code-intel setup # Register MCP server in editor config (one-time)
|
|
149
157
|
code-intel search <query> [path] # Text search
|
|
150
158
|
code-intel inspect <symbol> # Inspect a symbol
|
|
151
159
|
code-intel impact <symbol> # Blast radius analysis
|
|
@@ -160,18 +168,19 @@ code-intel clean [path] # Remove index data
|
|
|
160
168
|
|
|
161
169
|
| Method | Endpoint | Description |
|
|
162
170
|
|--------|----------|-------------|
|
|
163
|
-
| `GET` | `/api/health` | Server status + graph size |
|
|
164
|
-
| `GET` | `/api/repos` | List indexed repos |
|
|
165
|
-
| `GET` | `/api/graph/:repo` | Full graph (nodes + edges) |
|
|
166
|
-
| `POST` | `/api/search` | BM25 text search |
|
|
167
|
-
| `POST` | `/api/vector-search` | Semantic vector search |
|
|
168
|
-
| `GET` | `/api/vector-status` | Vector index ready/building status |
|
|
169
|
-
| `GET` | `/api/nodes/:id` | Node detail (callers, callees, imports, etc.) |
|
|
170
|
-
| `POST` | `/api/blast-radius` | Impact analysis |
|
|
171
|
-
| `POST` | `/api/cypher` | Cypher query (routed to LadybugDB) |
|
|
172
|
-
| `POST` | `/api/grep` | Regex search in file content |
|
|
173
|
-
| `GET` | `/api/flows` | List detected flows |
|
|
174
|
-
| `GET` | `/api/clusters` | List clusters |
|
|
171
|
+
| `GET` | `/api/v1/health` | Server status + graph size |
|
|
172
|
+
| `GET` | `/api/v1/repos` | List indexed repos |
|
|
173
|
+
| `GET` | `/api/v1/graph/:repo` | Full graph (nodes + edges) |
|
|
174
|
+
| `POST` | `/api/v1/search` | BM25 text search |
|
|
175
|
+
| `POST` | `/api/v1/vector-search` | Semantic vector search |
|
|
176
|
+
| `GET` | `/api/v1/vector-status` | Vector index ready/building status |
|
|
177
|
+
| `GET` | `/api/v1/nodes/:id` | Node detail (callers, callees, imports, etc.) |
|
|
178
|
+
| `POST` | `/api/v1/blast-radius` | Impact analysis |
|
|
179
|
+
| `POST` | `/api/v1/cypher` | Cypher query (routed to LadybugDB) |
|
|
180
|
+
| `POST` | `/api/v1/grep` | Regex search in file content |
|
|
181
|
+
| `GET` | `/api/v1/flows` | List detected flows |
|
|
182
|
+
| `GET` | `/api/v1/clusters` | List clusters |
|
|
183
|
+
| `GET` | `/api/v1/openapi.json` | OpenAPI 3.1 spec |
|
|
175
184
|
|
|
176
185
|
---
|
|
177
186
|
|
|
@@ -179,12 +188,24 @@ code-intel clean [path] # Remove index data
|
|
|
179
188
|
|
|
180
189
|
| Tool | Description |
|
|
181
190
|
|------|-------------|
|
|
182
|
-
| `
|
|
183
|
-
| `
|
|
184
|
-
| `
|
|
185
|
-
| `
|
|
186
|
-
| `
|
|
187
|
-
| `
|
|
191
|
+
| `repos` | List all indexed repositories |
|
|
192
|
+
| `overview` | Repository summary: total nodes/edges + full breakdown by kind |
|
|
193
|
+
| `search` | BM25 keyword search across all symbols |
|
|
194
|
+
| `inspect` | 360° view of a symbol: definition, callers, callees, imports, heritage, members, cluster |
|
|
195
|
+
| `blast_radius` | Impact analysis: traverse call/import graph to find all affected symbols |
|
|
196
|
+
| `file_symbols` | List all symbols defined in a file, ordered by line number |
|
|
197
|
+
| `find_path` | Shortest call/import path between two symbols via BFS |
|
|
198
|
+
| `list_exports` | List all exported symbols — the public API surface of the codebase |
|
|
199
|
+
| `routes` | List all HTTP route handler mappings detected in the codebase |
|
|
200
|
+
| `clusters` | List detected code clusters with member counts and top symbols |
|
|
201
|
+
| `flows` | List detected execution flows with entry points and steps |
|
|
202
|
+
| `detect_changes` | Git-diff impact analysis: maps changed lines to graph symbols |
|
|
203
|
+
| `raw_query` | Execute a simplified Cypher-like graph query |
|
|
204
|
+
| `group_list` | List all configured repository groups |
|
|
205
|
+
| `group_sync` | Extract contracts and detect cross-repo provider→consumer links |
|
|
206
|
+
| `group_contracts` | Inspect extracted contracts and confidence-ranked cross-repo links |
|
|
207
|
+
| `group_query` | BM25 search across all repos in a group merged via RRF |
|
|
208
|
+
| `group_status` | Check index freshness and sync staleness for all group members |
|
|
188
209
|
|
|
189
210
|
---
|
|
190
211
|
|
|
@@ -213,7 +234,7 @@ code-intel clean [path] # Remove index data
|
|
|
213
234
|
npm run test
|
|
214
235
|
```
|
|
215
236
|
|
|
216
|
-
46 tests across unit + integration suites covering:
|
|
237
|
+
46+ tests across unit + integration suites covering:
|
|
217
238
|
- Knowledge graph operations
|
|
218
239
|
- Language detection
|
|
219
240
|
- Call classifier
|
|
@@ -221,6 +242,8 @@ npm run test
|
|
|
221
242
|
- Scope analysis
|
|
222
243
|
- Text search
|
|
223
244
|
- Pipeline integration (parse → resolve)
|
|
245
|
+
- Parser corpus golden-file regression (10 languages, 100% recall)
|
|
246
|
+
- Tree-sitter query correctness (Swift, Kotlin, Dart)
|
|
224
247
|
|
|
225
248
|
---
|
|
226
249
|
|