@dailephd/my-dev-kit 1.0.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/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/README.md +221 -0
- package/dist/cli.js +2611 -0
- package/docs/ARCHITECTURE.md +649 -0
- package/docs/CI_CD.md +248 -0
- package/docs/COMMANDS.md +684 -0
- package/docs/DEVELOPMENT.md +360 -0
- package/docs/GRAPH_SCHEMA.md +675 -0
- package/docs/QUICKSTART.md +243 -0
- package/docs/RELEASE.md +249 -0
- package/docs/ROADMAP.md +733 -0
- package/docs/SECURITY.md +92 -0
- package/docs/WORKFLOWS.md +316 -0
- package/examples/README.md +23 -0
- package/examples/basic-python/README.md +14 -0
- package/examples/basic-python/src/main.py +38 -0
- package/examples/basic-python/src/utils.py +24 -0
- package/examples/basic-ts/README.md +14 -0
- package/examples/basic-ts/src/index.ts +6 -0
- package/examples/basic-ts/src/userService.ts +9 -0
- package/examples/basic-ts/src/userTypes.ts +6 -0
- package/package.json +51 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.0 — 2026-05-29
|
|
4
|
+
|
|
5
|
+
Initial release.
|
|
6
|
+
|
|
7
|
+
- Six CLI commands: `index`, `lookup`, `source`, `slice`, `view`, `search`
|
|
8
|
+
- TypeScript, JavaScript, and Python indexing with symbol extraction, code graph, and optional static call graph
|
|
9
|
+
- Python indexing covers functions, classes, constants, imports, and conservative syntactic call edges
|
|
10
|
+
- Graph-guided symbol retrieval workflow: search → lookup → slice → source
|
|
11
|
+
- Source output formats: `json`, `plain`, `numbered`; file output with `--out`
|
|
12
|
+
- Semantic graph visualization with three edge styles: `semantic` (default), `labeled`, `minimal`; DOT, SVG, and PNG output
|
|
13
|
+
- Deterministic local keyword search over indexed artifacts with field-weighted ranking
|
|
14
|
+
- Security hardening: artifact path containment, source retrieval path containment, DOT escaping, Graphviz subprocess isolation
|
|
15
|
+
- CI validation baseline via GitHub Actions
|
|
16
|
+
- MIT license, copyright 2026 dailephd LLC
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dailephd LLC
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# my-dev-kit
|
|
2
|
+
|
|
3
|
+
Local codebase graph indexing, keyword search, symbol lookup, source retrieval, graph slicing, and visualization for TypeScript, JavaScript, and Python projects.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
my-dev-kit helps you navigate a local project by building a deterministic graph of files and symbols. You can search the graph, inspect a selected node, slice nearby relationships, and retrieve only the source excerpts needed for a task.
|
|
8
|
+
|
|
9
|
+
Everything runs locally. my-dev-kit does not call an LLM, make network requests, or edit source files.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install -g @dailephd/my-dev-kit
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Confirm:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
my-dev-kit --help
|
|
21
|
+
my-dev-kit --version
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Quickstart
|
|
25
|
+
|
|
26
|
+
Run the CLI inside your own project:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
cd <your-project>
|
|
30
|
+
|
|
31
|
+
my-dev-kit index --root . --src src --out .my-dev-kit --json
|
|
32
|
+
my-dev-kit search --index .my-dev-kit --query "service" --limit 20 --json
|
|
33
|
+
my-dev-kit lookup --index .my-dev-kit --node "<node-id>" --depth 1 --json
|
|
34
|
+
my-dev-kit slice --index .my-dev-kit --node "<node-id>" --depth 2 --direction both --json
|
|
35
|
+
my-dev-kit source --index .my-dev-kit --file "<path>" --symbol "<symbol-name>" --format numbered
|
|
36
|
+
my-dev-kit view --index .my-dev-kit --format dot --out .my-dev-kit/graph.dot
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Use one or more `--src` flags for the source roots you want to index:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
my-dev-kit index --root . --src src --src tests --out .my-dev-kit --json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
For large monorepos, index targeted source folders instead of broad package roots. The indexer skips common generated, dependency, cache, and build directories by default, including `node_modules`, `.next`, `dist`, `build`, `coverage`, `playwright-report`, `test-results`, `output`, `out`, `.cache`, `.turbo`, `.vercel`, `.git`, `.pytest_cache`, `__pycache__`, `.venv`, and `venv`.
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
my-dev-kit index --root . --src apps/web/app --src apps/web/lib --src apps/web/prisma --out .my-dev-kit-web --call-graph --json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Use `--dry-run` to inspect what would be indexed without writing artifacts, `--progress` to print bounded progress diagnostics to stderr, and repeat `--exclude` for extra path/name exclusions:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
my-dev-kit index --root . --src apps/web --out .my-dev-kit-web --exclude .next --exclude coverage --dry-run --json
|
|
55
|
+
my-dev-kit index --root . --src apps/web/app --src apps/web/lib --out .my-dev-kit-web --progress --json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
See [docs/QUICKSTART.md](docs/QUICKSTART.md) for a step-by-step walkthrough.
|
|
59
|
+
|
|
60
|
+
## Graph-Guided Symbol Retrieval for LLM workflows
|
|
61
|
+
|
|
62
|
+
LLMs and coding agents work better with bounded, relevant context than with broad project dumps. my-dev-kit supports that workflow by preparing local codebase evidence you can paste into ChatGPT or provide to a coding agent.
|
|
63
|
+
|
|
64
|
+
my-dev-kit does not call an LLM. It prepares deterministic local context; you decide what to share.
|
|
65
|
+
|
|
66
|
+
Recommended flow:
|
|
67
|
+
|
|
68
|
+
1. Index the project.
|
|
69
|
+
2. Search for candidate files or symbols.
|
|
70
|
+
3. Look up the strongest candidate node.
|
|
71
|
+
4. Slice the graph around that node.
|
|
72
|
+
5. Retrieve targeted source excerpts.
|
|
73
|
+
6. Give only the selected search, lookup, slice, and source outputs to ChatGPT or your coding agent.
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
my-dev-kit index --root . --src src --out .my-dev-kit --json
|
|
77
|
+
my-dev-kit search --index .my-dev-kit --query "<topic>" --limit 20 --json
|
|
78
|
+
my-dev-kit lookup --index .my-dev-kit --node "<node-id>" --depth 1 --json
|
|
79
|
+
my-dev-kit slice --index .my-dev-kit --node "<node-id>" --depth 2 --direction both --json
|
|
80
|
+
my-dev-kit source --index .my-dev-kit --file "<path>" --symbol "<symbol-name>" --format numbered
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Compact prompt template:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
I am using my-dev-kit to provide bounded codebase context.
|
|
87
|
+
|
|
88
|
+
Task:
|
|
89
|
+
<describe the task>
|
|
90
|
+
|
|
91
|
+
Search result:
|
|
92
|
+
<paste selected search result>
|
|
93
|
+
|
|
94
|
+
Selected node:
|
|
95
|
+
<node-id>
|
|
96
|
+
|
|
97
|
+
Lookup and graph slice:
|
|
98
|
+
<paste selected lookup/slice output or concise summary>
|
|
99
|
+
|
|
100
|
+
Source excerpts:
|
|
101
|
+
<paste numbered source output with file paths>
|
|
102
|
+
|
|
103
|
+
Instructions:
|
|
104
|
+
Use only the provided context unless you say what additional my-dev-kit command I should run.
|
|
105
|
+
Explain which provided evidence supports your answer.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
For a fuller template and guidance on what to paste, see [docs/WORKFLOWS.md](docs/WORKFLOWS.md).
|
|
109
|
+
|
|
110
|
+
## Commands
|
|
111
|
+
|
|
112
|
+
| Command | Purpose |
|
|
113
|
+
| --- | --- |
|
|
114
|
+
| `index` | Scan source roots and write index artifacts |
|
|
115
|
+
| `search` | Search indexed files, symbols, and edges by keyword |
|
|
116
|
+
| `lookup` | Look up a graph node by exact node ID |
|
|
117
|
+
| `source` | Retrieve bounded source by line range, symbol, or node ID |
|
|
118
|
+
| `slice` | Build a bounded subgraph around a focus node |
|
|
119
|
+
| `view` | Render the code graph as DOT, SVG, or PNG |
|
|
120
|
+
|
|
121
|
+
See [docs/COMMANDS.md](docs/COMMANDS.md) for the full flag reference.
|
|
122
|
+
|
|
123
|
+
## Generated artifacts
|
|
124
|
+
|
|
125
|
+
The `index` command writes these artifacts to the output directory:
|
|
126
|
+
|
|
127
|
+
| Artifact | Contents |
|
|
128
|
+
| --- | --- |
|
|
129
|
+
| `manifest.json` | Project metadata, source roots, artifact paths, and summary counts |
|
|
130
|
+
| `symbol-index.json` | Per-file symbol tables with locations, imports, and exports |
|
|
131
|
+
| `code-graph.json` | Graph of file and symbol nodes connected by typed edges |
|
|
132
|
+
| `call-graph.json` | Call graph, written only when `--call-graph` is requested |
|
|
133
|
+
|
|
134
|
+
For normal LLM-assisted workflows, do not paste full `symbol-index.json` or `code-graph.json`. Use `search`, `lookup`, `slice`, and `source` to extract targeted context.
|
|
135
|
+
|
|
136
|
+
## Trying the bundled examples from a cloned repository
|
|
137
|
+
|
|
138
|
+
The bundled examples are useful when you cloned this repository, are inspecting package contents, or want a small smoke-test project. They are not the main quickstart path for npm users.
|
|
139
|
+
|
|
140
|
+
TypeScript example:
|
|
141
|
+
|
|
142
|
+
```sh
|
|
143
|
+
my-dev-kit index --root examples/basic-ts --src src --out .my-dev-kit --call-graph --json
|
|
144
|
+
my-dev-kit search --index examples/basic-ts/.my-dev-kit --query "user" --limit 5 --json
|
|
145
|
+
my-dev-kit lookup --index examples/basic-ts/.my-dev-kit --node symbol:src/index.ts#describeUser --depth 1 --json
|
|
146
|
+
my-dev-kit source --index examples/basic-ts/.my-dev-kit --file src/index.ts --symbol describeUser --format numbered
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Python example:
|
|
150
|
+
|
|
151
|
+
```sh
|
|
152
|
+
my-dev-kit index --root examples/basic-python --src src --language python --out .my-dev-kit --call-graph --json
|
|
153
|
+
my-dev-kit search --index examples/basic-python/.my-dev-kit --query "greet" --limit 5 --json
|
|
154
|
+
my-dev-kit lookup --index examples/basic-python/.my-dev-kit --node file:src/main.py --depth 1 --json
|
|
155
|
+
my-dev-kit source --index examples/basic-python/.my-dev-kit --file src/main.py --symbol greet --format numbered
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
See [examples/README.md](examples/README.md) for more detail.
|
|
159
|
+
|
|
160
|
+
## Graph visualization example
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
my-dev-kit view --index .my-dev-kit --format dot --out .my-dev-kit/graph.dot --edge-style semantic
|
|
164
|
+
my-dev-kit view --index .my-dev-kit --format svg --out .my-dev-kit/graph.svg
|
|
165
|
+
my-dev-kit view --index .my-dev-kit --format svg --allow-dot-fallback --out .my-dev-kit/graph.dot
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
DOT output does not require Graphviz. SVG and PNG rendering require the Graphviz `dot` executable.
|
|
169
|
+
|
|
170
|
+
## Design boundaries
|
|
171
|
+
|
|
172
|
+
my-dev-kit is a local, deterministic read-only CLI tool. It does not:
|
|
173
|
+
|
|
174
|
+
- Make network requests or LLM calls
|
|
175
|
+
- Edit or modify source files
|
|
176
|
+
- Perform semantic or embedding-based search
|
|
177
|
+
- Execute orchestration, agents, or external services
|
|
178
|
+
|
|
179
|
+
Search is keyword-based. Result scores are deterministic ranking values, not probabilities or confidence scores.
|
|
180
|
+
|
|
181
|
+
## Limitations
|
|
182
|
+
|
|
183
|
+
- Symbol end lines are not recorded during indexing. Symbol source retrieval returns a capped preview from the symbol's start line with a warning. Use line-range mode with explicit `--start` and `--end` for exact bounds.
|
|
184
|
+
- Call-graph extraction is best-effort static syntactic analysis and may miss dynamic dispatch, computed calls, monkey-patching, decorator effects, and runtime behavior.
|
|
185
|
+
- Python call-graph extraction uses `ast` and records high-confidence function and method call sites such as `foo()`, `self.foo()`, `module.foo()`, and `ClassName.method()`.
|
|
186
|
+
- Python indexing requires `python` or `python3` on `PATH`. Python 3.8 or later is required. Python files are skipped with a warning if no interpreter is found.
|
|
187
|
+
|
|
188
|
+
## Development from source
|
|
189
|
+
|
|
190
|
+
```sh
|
|
191
|
+
npm install
|
|
192
|
+
npm run build
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Validate:
|
|
196
|
+
|
|
197
|
+
```sh
|
|
198
|
+
npm run typecheck
|
|
199
|
+
npm run test
|
|
200
|
+
npm run verify
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
See [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) for the development guide and [docs/RELEASE.md](docs/RELEASE.md) for the maintainer release checklist.
|
|
204
|
+
|
|
205
|
+
## Roadmap
|
|
206
|
+
|
|
207
|
+
Version 1.0.0 includes all six commands fully implemented and tested.
|
|
208
|
+
|
|
209
|
+
Immediate next roadmap item: data-model graph extraction, a planned downstream layer that will interpret indexed code and schema files to identify entities, fields, keys, and relationships.
|
|
210
|
+
|
|
211
|
+
See [docs/ROADMAP.md](docs/ROADMAP.md) for the full roadmap.
|
|
212
|
+
|
|
213
|
+
## Bug reports
|
|
214
|
+
|
|
215
|
+
Open an issue in the project repository with a description of the finding and a reproduction case.
|
|
216
|
+
|
|
217
|
+
## License
|
|
218
|
+
|
|
219
|
+
MIT. Copyright (c) 2026 dailephd LLC.
|
|
220
|
+
|
|
221
|
+
See [LICENSE](LICENSE) for the full license text.
|