milens 0.2.1 → 0.2.3
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/LICENSE +76 -21
- package/README.md +28 -24
- package/dist/cli.js +1 -1
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
Required Notice: Copyright (c) 2026 milens contributors
|
|
6
|
+
Required Notice: Architectural inspiration from GitNexus by Abhigyan Patwari (https://github.com/abhigyanpatwari/GitNexus)
|
|
7
|
+
|
|
8
|
+
## Acceptance
|
|
9
|
+
|
|
10
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
11
|
+
|
|
12
|
+
## Copyright License
|
|
13
|
+
|
|
14
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
15
|
+
|
|
16
|
+
## Distribution License
|
|
17
|
+
|
|
18
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
19
|
+
|
|
20
|
+
## Notices
|
|
21
|
+
|
|
22
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
23
|
+
|
|
24
|
+
> Required Notice: Copyright (c) 2026 milens contributors
|
|
25
|
+
|
|
26
|
+
## Changes and New Works License
|
|
27
|
+
|
|
28
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
29
|
+
|
|
30
|
+
## Patent License
|
|
31
|
+
|
|
32
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
33
|
+
|
|
34
|
+
## Noncommercial Purposes
|
|
35
|
+
|
|
36
|
+
Any noncommercial purpose is a permitted purpose.
|
|
37
|
+
|
|
38
|
+
## Personal Uses
|
|
39
|
+
|
|
40
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
41
|
+
|
|
42
|
+
## Noncommercial Organizations
|
|
43
|
+
|
|
44
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
45
|
+
|
|
46
|
+
## Fair Use
|
|
47
|
+
|
|
48
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
49
|
+
|
|
50
|
+
## No Other Rights
|
|
51
|
+
|
|
52
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
53
|
+
|
|
54
|
+
## Patent Defense
|
|
55
|
+
|
|
56
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
57
|
+
|
|
58
|
+
## Violations
|
|
59
|
+
|
|
60
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
61
|
+
|
|
62
|
+
## No Liability
|
|
63
|
+
|
|
64
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
65
|
+
|
|
66
|
+
## Definitions
|
|
67
|
+
|
|
68
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
69
|
+
|
|
70
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
71
|
+
|
|
72
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
73
|
+
|
|
74
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
75
|
+
|
|
76
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
<p align="center">
|
|
7
7
|
<a href="https://www.npmjs.com/package/milens"><img src="https://img.shields.io/npm/v/milens" alt="npm version"></a>
|
|
8
|
-
<a href="https://github.com/fuze210699/milens/blob/develop/LICENSE"><img src="https://img.shields.io/badge/license-
|
|
8
|
+
<a href="https://github.com/fuze210699/milens/blob/develop/LICENSE"><img src="https://img.shields.io/badge/license-PolyForm--Noncommercial-blue" alt="License: PolyForm Noncommercial"></a>
|
|
9
9
|
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="Node.js >= 20"></a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
@@ -49,28 +49,29 @@ npx milens analyze -p .
|
|
|
49
49
|
|
|
50
50
|
# Or install globally
|
|
51
51
|
npm install -g milens
|
|
52
|
+
milens analyze -p . # after global install, npx prefix is optional
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
## Quick Start
|
|
55
56
|
|
|
56
57
|
```bash
|
|
57
58
|
# Index a codebase
|
|
58
|
-
milens analyze -p /path/to/repo --verbose
|
|
59
|
+
npx milens analyze -p /path/to/repo --verbose
|
|
59
60
|
|
|
60
61
|
# Search for symbols
|
|
61
|
-
milens search "UserService"
|
|
62
|
+
npx milens search "UserService"
|
|
62
63
|
|
|
63
64
|
# 360° symbol context
|
|
64
|
-
milens inspect "AuthService"
|
|
65
|
+
npx milens inspect "AuthService"
|
|
65
66
|
|
|
66
67
|
# Blast radius — what breaks if this changes?
|
|
67
|
-
milens impact "createUser" --depth 3
|
|
68
|
+
npx milens impact "createUser" --depth 3
|
|
68
69
|
|
|
69
70
|
# Start MCP server (stdio for editors)
|
|
70
|
-
milens serve -p /path/to/repo
|
|
71
|
+
npx milens serve -p /path/to/repo
|
|
71
72
|
|
|
72
73
|
# Start MCP server (HTTP for remote agents)
|
|
73
|
-
milens serve --http --port 3100
|
|
74
|
+
npx milens serve --http --port 3100
|
|
74
75
|
```
|
|
75
76
|
|
|
76
77
|
## CLI Commands
|
|
@@ -89,7 +90,7 @@ milens serve --http --port 3100
|
|
|
89
90
|
### `analyze`
|
|
90
91
|
|
|
91
92
|
```bash
|
|
92
|
-
milens analyze -p /path/to/repo --verbose --force --skills
|
|
93
|
+
npx milens analyze -p /path/to/repo --verbose --force --skills
|
|
93
94
|
```
|
|
94
95
|
|
|
95
96
|
Scans source files, parses symbols with tree-sitter, resolves imports/calls/inheritance, and stores everything in `.milens/milens.db`.
|
|
@@ -105,13 +106,13 @@ Scans source files, parses symbols with tree-sitter, resolves imports/calls/inhe
|
|
|
105
106
|
### `search`
|
|
106
107
|
|
|
107
108
|
```bash
|
|
108
|
-
milens search "createUser" --limit 10
|
|
109
|
+
npx milens search "createUser" --limit 10
|
|
109
110
|
```
|
|
110
111
|
|
|
111
112
|
### `inspect`
|
|
112
113
|
|
|
113
114
|
```bash
|
|
114
|
-
milens inspect "AuthService"
|
|
115
|
+
npx milens inspect "AuthService"
|
|
115
116
|
```
|
|
116
117
|
|
|
117
118
|
Shows incoming references (who calls/uses it) and outgoing dependencies (what it calls/imports/extends).
|
|
@@ -119,7 +120,7 @@ Shows incoming references (who calls/uses it) and outgoing dependencies (what it
|
|
|
119
120
|
### `impact`
|
|
120
121
|
|
|
121
122
|
```bash
|
|
122
|
-
milens impact "UserModel" --direction upstream --depth 3
|
|
123
|
+
npx milens impact "UserModel" --direction upstream --depth 3
|
|
123
124
|
```
|
|
124
125
|
|
|
125
126
|
*"What breaks if this symbol changes?"* — traverses the dependency graph via recursive CTEs.
|
|
@@ -132,21 +133,21 @@ milens impact "UserModel" --direction upstream --depth 3
|
|
|
132
133
|
### `serve`
|
|
133
134
|
|
|
134
135
|
```bash
|
|
135
|
-
milens serve -p /path/to/repo # stdio (for editors)
|
|
136
|
-
milens serve -p /path/to/repo --http --port 3100 # HTTP
|
|
136
|
+
npx milens serve -p /path/to/repo # stdio (for editors)
|
|
137
|
+
npx milens serve -p /path/to/repo --http --port 3100 # HTTP
|
|
137
138
|
```
|
|
138
139
|
|
|
139
140
|
### `list`
|
|
140
141
|
|
|
141
142
|
```bash
|
|
142
|
-
milens list # show all indexed repositories
|
|
143
|
+
npx milens list # show all indexed repositories
|
|
143
144
|
```
|
|
144
145
|
|
|
145
146
|
### `clean`
|
|
146
147
|
|
|
147
148
|
```bash
|
|
148
|
-
milens clean -p /path/to/repo # remove index for one repo
|
|
149
|
-
milens clean --all # remove all indexes
|
|
149
|
+
npx milens clean -p /path/to/repo # remove index for one repo
|
|
150
|
+
npx milens clean --all # remove all indexes
|
|
150
151
|
```
|
|
151
152
|
|
|
152
153
|
## MCP Server
|
|
@@ -210,8 +211,9 @@ Add to `.vscode/mcp.json`:
|
|
|
210
211
|
{
|
|
211
212
|
"servers": {
|
|
212
213
|
"milens": {
|
|
214
|
+
"type": "stdio",
|
|
213
215
|
"command": "npx",
|
|
214
|
-
"args": ["-y", "milens", "serve", "-p", "
|
|
216
|
+
"args": ["-y", "milens", "serve", "-p", "${workspaceFolder}"]
|
|
215
217
|
}
|
|
216
218
|
}
|
|
217
219
|
}
|
|
@@ -219,14 +221,14 @@ Add to `.vscode/mcp.json`:
|
|
|
219
221
|
|
|
220
222
|
### Cursor
|
|
221
223
|
|
|
222
|
-
Add to
|
|
224
|
+
Add to `.cursor/mcp.json` (per-project):
|
|
223
225
|
|
|
224
226
|
```json
|
|
225
227
|
{
|
|
226
228
|
"mcpServers": {
|
|
227
229
|
"milens": {
|
|
228
230
|
"command": "npx",
|
|
229
|
-
"args": ["-y", "milens", "serve"]
|
|
231
|
+
"args": ["-y", "milens", "serve", "-p", "."]
|
|
230
232
|
}
|
|
231
233
|
}
|
|
232
234
|
}
|
|
@@ -235,7 +237,7 @@ Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per-project):
|
|
|
235
237
|
### Claude Code
|
|
236
238
|
|
|
237
239
|
```bash
|
|
238
|
-
claude mcp add milens -- npx -y milens serve
|
|
240
|
+
claude mcp add milens -- npx -y milens serve -p .
|
|
239
241
|
```
|
|
240
242
|
|
|
241
243
|
### Codex
|
|
@@ -245,13 +247,13 @@ Add to `.codex/config.toml`:
|
|
|
245
247
|
```toml
|
|
246
248
|
[mcp_servers.milens]
|
|
247
249
|
command = "npx"
|
|
248
|
-
args = ["-y", "milens", "serve"]
|
|
250
|
+
args = ["-y", "milens", "serve", "-p", "."]
|
|
249
251
|
```
|
|
250
252
|
|
|
251
253
|
### HTTP Mode (remote agents)
|
|
252
254
|
|
|
253
255
|
```bash
|
|
254
|
-
milens serve --http --port 3100
|
|
256
|
+
npx milens serve --http --port 3100
|
|
255
257
|
```
|
|
256
258
|
|
|
257
259
|
Endpoint: `POST http://localhost:3100/mcp`
|
|
@@ -261,7 +263,7 @@ Endpoint: `POST http://localhost:3100/mcp`
|
|
|
261
263
|
Generate editor-specific context files from your codebase's knowledge graph:
|
|
262
264
|
|
|
263
265
|
```bash
|
|
264
|
-
milens analyze -p . --skills
|
|
266
|
+
npx milens analyze -p . --skills
|
|
265
267
|
```
|
|
266
268
|
|
|
267
269
|
This creates:
|
|
@@ -385,4 +387,6 @@ npm run self-serve # start MCP server on port 3100
|
|
|
385
387
|
|
|
386
388
|
## License
|
|
387
389
|
|
|
388
|
-
[
|
|
390
|
+
[PolyForm Noncommercial 1.0.0](LICENSE)
|
|
391
|
+
|
|
392
|
+
Architectural inspiration from [GitNexus](https://github.com/abhigyanpatwari/GitNexus) by Abhigyan Patwari.
|
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ const program = new Command();
|
|
|
7
7
|
program
|
|
8
8
|
.name('milens')
|
|
9
9
|
.description('Code intelligence engine — analyze codebases, build knowledge graphs, serve via MCP')
|
|
10
|
-
.version('0.2.
|
|
10
|
+
.version('0.2.3');
|
|
11
11
|
program
|
|
12
12
|
.command('analyze')
|
|
13
13
|
.description('Index a codebase: parse symbols, resolve dependencies, build search index')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "milens",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Lightweight Code Intelligence Platform — analyze codebases and build knowledge graphs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"tree-sitter-wasms": "^0.1.12",
|
|
50
50
|
"web-tree-sitter": "^0.24.7"
|
|
51
51
|
},
|
|
52
|
-
"license": "
|
|
52
|
+
"license": "PolyForm-Noncommercial-1.0.0",
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/better-sqlite3": "^7.0.0",
|
|
55
55
|
"@types/node": "^20.0.0",
|