codemind-sh 0.1.0__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.
- codemind_sh-0.1.0/LICENSE +91 -0
- codemind_sh-0.1.0/PKG-INFO +330 -0
- codemind_sh-0.1.0/README.md +287 -0
- codemind_sh-0.1.0/codemind/__init__.py +4 -0
- codemind_sh-0.1.0/codemind/__main__.py +6 -0
- codemind_sh-0.1.0/codemind/ai/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/ai/enricher.py +545 -0
- codemind_sh-0.1.0/codemind/ai/pro_features.py +381 -0
- codemind_sh-0.1.0/codemind/ai/stack_learner.py +404 -0
- codemind_sh-0.1.0/codemind/analyzer/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/analyzer/base.py +148 -0
- codemind_sh-0.1.0/codemind/analyzer/dependency_analyzer.py +667 -0
- codemind_sh-0.1.0/codemind/analyzer/java_analyzer.py +375 -0
- codemind_sh-0.1.0/codemind/analyzer/typescript_analyzer.py +439 -0
- codemind_sh-0.1.0/codemind/cli.py +1847 -0
- codemind_sh-0.1.0/codemind/context/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/context/engine.py +635 -0
- codemind_sh-0.1.0/codemind/core/__init__.py +7 -0
- codemind_sh-0.1.0/codemind/core/config.py +201 -0
- codemind_sh-0.1.0/codemind/core/constants.py +84 -0
- codemind_sh-0.1.0/codemind/core/graph.py +235 -0
- codemind_sh-0.1.0/codemind/core/project.py +185 -0
- codemind_sh-0.1.0/codemind/git/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/graph/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/graph/builder.py +372 -0
- codemind_sh-0.1.0/codemind/graph/query.py +515 -0
- codemind_sh-0.1.0/codemind/graph/store.py +157 -0
- codemind_sh-0.1.0/codemind/health/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/health/checker.py +111 -0
- codemind_sh-0.1.0/codemind/health/dependency_check.py +105 -0
- codemind_sh-0.1.0/codemind/health/pattern_check.py +87 -0
- codemind_sh-0.1.0/codemind/health/test_coverage.py +58 -0
- codemind_sh-0.1.0/codemind/knowledge/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/knowledge/architecture.py +320 -0
- codemind_sh-0.1.0/codemind/knowledge/connection_builder.py +284 -0
- codemind_sh-0.1.0/codemind/knowledge/connections.py +205 -0
- codemind_sh-0.1.0/codemind/knowledge/generator.py +392 -0
- codemind_sh-0.1.0/codemind/knowledge/index_builder.py +292 -0
- codemind_sh-0.1.0/codemind/license/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/license/client.py +140 -0
- codemind_sh-0.1.0/codemind/license/enforcer.py +156 -0
- codemind_sh-0.1.0/codemind/license/keygen.py +62 -0
- codemind_sh-0.1.0/codemind/license/license.py +202 -0
- codemind_sh-0.1.0/codemind/mcp/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/mcp/connect.py +305 -0
- codemind_sh-0.1.0/codemind/mcp/decisions.py +90 -0
- codemind_sh-0.1.0/codemind/mcp/server.py +452 -0
- codemind_sh-0.1.0/codemind/mcp/tools.py +561 -0
- codemind_sh-0.1.0/codemind/parser/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/parser/base.py +59 -0
- codemind_sh-0.1.0/codemind/parser/gap_detector.py +123 -0
- codemind_sh-0.1.0/codemind/parser/java_parser.py +426 -0
- codemind_sh-0.1.0/codemind/parser/python_parser.py +366 -0
- codemind_sh-0.1.0/codemind/parser/registry.py +54 -0
- codemind_sh-0.1.0/codemind/parser/rule_cache.py +154 -0
- codemind_sh-0.1.0/codemind/parser/typescript_parser.py +550 -0
- codemind_sh-0.1.0/codemind/router/__init__.py +3 -0
- codemind_sh-0.1.0/codemind/router/call_extractor.py +493 -0
- codemind_sh-0.1.0/codemind/router/linker.py +374 -0
- codemind_sh-0.1.0/codemind/router/route_extractor.py +517 -0
- codemind_sh-0.1.0/codemind/scaffold/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/scaffold/generator.py +278 -0
- codemind_sh-0.1.0/codemind/scaffold/pattern_extractor.py +257 -0
- codemind_sh-0.1.0/codemind/scaffold/templates/java/controller.java.j2 +40 -0
- codemind_sh-0.1.0/codemind/scaffold/templates/java/entity.java.j2 +20 -0
- codemind_sh-0.1.0/codemind/scaffold/templates/java/repository.java.j2 +10 -0
- codemind_sh-0.1.0/codemind/scaffold/templates/java/service.java.j2 +21 -0
- codemind_sh-0.1.0/codemind/scaffold/templates/java/test.java.j2 +22 -0
- codemind_sh-0.1.0/codemind/scaffold/templates/typescript/service.ts.j2 +21 -0
- codemind_sh-0.1.0/codemind/tasks/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/watcher/__init__.py +1 -0
- codemind_sh-0.1.0/codemind/watcher/handler.py +191 -0
- codemind_sh-0.1.0/pyproject.toml +72 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
|
|
2
|
+
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
3
|
+
|
|
4
|
+
Parameters
|
|
5
|
+
|
|
6
|
+
Licensor: OnixSolutions (onixsolutions.net)
|
|
7
|
+
Licensed Work: CodeMind Version 0.1.0 or later. The Licensed Work is (c) 2026
|
|
8
|
+
OnixSolutions
|
|
9
|
+
Additional Use Grant: You may make production use of the Licensed Work, provided
|
|
10
|
+
Your use does not include offering the Licensed Work to third
|
|
11
|
+
parties on a hosted or embedded basis in order to compete with
|
|
12
|
+
OnixSolutions's paid version(s) of the Licensed Work. For
|
|
13
|
+
purposes of this license:
|
|
14
|
+
|
|
15
|
+
A "competitive offering" is a Product that is offered to third
|
|
16
|
+
parties on a paid basis, including through paid support
|
|
17
|
+
arrangements, that significantly overlaps with the capabilities
|
|
18
|
+
of OnixSolutions's paid version(s) of the Licensed Work. If
|
|
19
|
+
Your Product is not a competitive offering when You first make
|
|
20
|
+
it generally available, it will not become a competitive
|
|
21
|
+
offering later due to OnixSolutions releasing a new version of
|
|
22
|
+
the Licensed Work with additional capabilities. In addition,
|
|
23
|
+
Products that are not provided on a paid basis are not
|
|
24
|
+
competitive offerings.
|
|
25
|
+
|
|
26
|
+
"Product" means software that is offered to end users to manage
|
|
27
|
+
in their own environments or offered as a service on a hosted
|
|
28
|
+
basis.
|
|
29
|
+
|
|
30
|
+
"Embedded" means including the source code or executable code
|
|
31
|
+
from the Licensed Work in a competitive offering. "Embedded"
|
|
32
|
+
also means packaging the competitive offering in such a way
|
|
33
|
+
that the Licensed Work must be accessed or downloaded for the
|
|
34
|
+
competitive offering to operate.
|
|
35
|
+
|
|
36
|
+
Hosting or using the Licensed Work(s) for internal purposes
|
|
37
|
+
within an organization is not considered a competitive
|
|
38
|
+
offering. OnixSolutions considers your organization to include
|
|
39
|
+
all of your affiliates under common control.
|
|
40
|
+
|
|
41
|
+
Change Date: Four years from the date the Licensed Work is first publicly
|
|
42
|
+
distributed under this License.
|
|
43
|
+
Change License: MIT
|
|
44
|
+
|
|
45
|
+
For information about alternative licensing arrangements for the Licensed Work,
|
|
46
|
+
please contact licensing@onixsolutions.net.
|
|
47
|
+
|
|
48
|
+
Notice
|
|
49
|
+
|
|
50
|
+
Business Source License 1.1
|
|
51
|
+
|
|
52
|
+
Terms
|
|
53
|
+
|
|
54
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
55
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
56
|
+
Licensor may make an Additional Use Grant, above, permitting limited production use.
|
|
57
|
+
|
|
58
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
59
|
+
available distribution of a specific version of the Licensed Work under this
|
|
60
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
61
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
62
|
+
above terminate.
|
|
63
|
+
|
|
64
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
65
|
+
currently in effect as described in this License, you must purchase a
|
|
66
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
67
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
68
|
+
|
|
69
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
70
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
71
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
72
|
+
for each version of the Licensed Work released by Licensor.
|
|
73
|
+
|
|
74
|
+
You must conspicuously display this License on each original or modified copy
|
|
75
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
76
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
77
|
+
License apply to your use of that work.
|
|
78
|
+
|
|
79
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
80
|
+
terminate your rights under this License for the current and all other
|
|
81
|
+
versions of the Licensed Work.
|
|
82
|
+
|
|
83
|
+
This License does not grant you any right in any trademark or logo of
|
|
84
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
85
|
+
Licensor as expressly required by this License).
|
|
86
|
+
|
|
87
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
88
|
+
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
89
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
90
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
91
|
+
TITLE.
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codemind-sh
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local-first knowledge graph for software projects. Gives AI tools structural facts about your codebase via 11 MCP tools.
|
|
5
|
+
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: ai,developer-tools,codebase,mcp,context,architecture
|
|
8
|
+
Author: Mohammed
|
|
9
|
+
Author-email: mohammed@onixsolutions.net
|
|
10
|
+
Requires-Python: >=3.11,<4.0
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
21
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Provides-Extra: ai
|
|
24
|
+
Provides-Extra: all
|
|
25
|
+
Requires-Dist: anthropic (>=0.40) ; extra == "ai" or extra == "all"
|
|
26
|
+
Requires-Dist: click (>=8.1)
|
|
27
|
+
Requires-Dist: jinja2 (>=3.1)
|
|
28
|
+
Requires-Dist: mcp (>=1.0)
|
|
29
|
+
Requires-Dist: pyperclip (>=1.9)
|
|
30
|
+
Requires-Dist: pyyaml (>=6.0)
|
|
31
|
+
Requires-Dist: rich (>=13.7)
|
|
32
|
+
Requires-Dist: tree-sitter (>=0.22)
|
|
33
|
+
Requires-Dist: tree-sitter-java (>=0.23)
|
|
34
|
+
Requires-Dist: tree-sitter-python (>=0.23)
|
|
35
|
+
Requires-Dist: tree-sitter-typescript (>=0.23)
|
|
36
|
+
Requires-Dist: typer[all] (>=0.12)
|
|
37
|
+
Requires-Dist: watchdog (>=4.0)
|
|
38
|
+
Project-URL: Documentation, https://codemind.sh/docs
|
|
39
|
+
Project-URL: Homepage, https://codemind.sh
|
|
40
|
+
Project-URL: Repository, https://github.com/onixsolutions/codemind
|
|
41
|
+
Description-Content-Type: text/markdown
|
|
42
|
+
|
|
43
|
+
# CodeMind
|
|
44
|
+
|
|
45
|
+
**Your codebase finally knows what connects to what — and it never leaves your machine.**
|
|
46
|
+
|
|
47
|
+
CodeMind is a local-first knowledge graph for software projects. It lives inside your project as `.codemind/` (like `.git/`) and builds a precise, always-current graph of every component and every typed connection. When you use AI coding tools (Claude Code, Cursor, Copilot), CodeMind exposes 11 structural MCP tools — so the AI answers *"what calls X?"*, *"what breaks if I change Y?"*, and *"which Angular service calls `/api/offers`?"* with facts from the graph, not guesses.
|
|
48
|
+
|
|
49
|
+
## Why?
|
|
50
|
+
|
|
51
|
+
Every AI coding tool has amnesia. Claude Code, Cursor, Copilot — they read your files, help you code, and forget everything the moment the session ends. You waste 10–30 minutes per session re-explaining your architecture.
|
|
52
|
+
|
|
53
|
+
CodeMind fixes this — and goes further: it maps every component and connection so the AI understands your project structurally, not just textually.
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install codemind
|
|
59
|
+
|
|
60
|
+
cd your-project/
|
|
61
|
+
codemind init
|
|
62
|
+
codemind scan
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
✓ graph.json built
|
|
67
|
+
|
|
68
|
+
Graph summary
|
|
69
|
+
Components (nodes): 428
|
|
70
|
+
Connections (edges): 1,138
|
|
71
|
+
Cross-layer (frontend→backend): 20
|
|
72
|
+
Languages: java, typescript
|
|
73
|
+
Types: 118 interface, 92 class, 69 service, 44 component,
|
|
74
|
+
23 controller, 20 repository, 19 entity, 24 enum ...
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
That's it. Your project now has a living knowledge graph.
|
|
78
|
+
|
|
79
|
+
## Use With Claude Code, Cursor, or Claude Desktop (MCP)
|
|
80
|
+
|
|
81
|
+
`codemind init` automatically registers CodeMind with every AI coding tool it detects on your machine. No manual config editing required.
|
|
82
|
+
|
|
83
|
+
If you need to re-register later (e.g. after installing a new tool):
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
codemind connect # auto-detect and register all installed AI tools
|
|
87
|
+
codemind connect --tool claude # Claude Code only
|
|
88
|
+
codemind connect --global # write to global config instead of project-level
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This creates `.mcp.json` at your project root (the format Claude Code requires):
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"mcpServers": {
|
|
96
|
+
"codemind": {
|
|
97
|
+
"command": "/path/to/codemind",
|
|
98
|
+
"args": ["serve", "--path", "/absolute/path/to/your/project"]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`codemind serve` always includes the file watcher — graph.json is kept current on every save so the AI always answers with structural facts, never stale data.
|
|
105
|
+
|
|
106
|
+
## The 11 MCP Tools
|
|
107
|
+
|
|
108
|
+
Once connected, Claude Code (or any MCP-compatible tool) can use:
|
|
109
|
+
|
|
110
|
+
| Tool | What it answers |
|
|
111
|
+
|------|----------------|
|
|
112
|
+
| `get_connections(component)` | What it injects, calls, extends, implements — and what depends on it. Includes cross-layer edges (frontend→backend). |
|
|
113
|
+
| `impact_analysis(component)` | Everything that breaks if this component changes. BFS, sorted by distance. |
|
|
114
|
+
| `find_components(query)` | Free-text search across names, packages, method names. Auto-discovers unindexed files when nothing found. |
|
|
115
|
+
| `find_for_task(description)` | Relevant existing components + gaps for a stated feature. |
|
|
116
|
+
| `get_pattern()` | Best existing full-stack domain as a copy-me template. |
|
|
117
|
+
| `trace_request(path)` | Trace an HTTP path from frontend to backend. `/api/offers` → `OfferService` → `OfferController`. |
|
|
118
|
+
| `record_decision(...)` | Write a decision record after completing a task. |
|
|
119
|
+
| `get_decisions(limit)` | Read recent decisions at session start — the AI never starts from zero. |
|
|
120
|
+
| `enrich_node(component, notes)` | Attach AI-discovered notes to a graph node — persists across sessions. |
|
|
121
|
+
| `index_file(path)` | Read any source file (Dart, Kotlin, Swift, Go…) and return it with extraction instructions. |
|
|
122
|
+
| `add_component(name, type, file, language, …)` | Persist a component extracted from `index_file` to the graph permanently. |
|
|
123
|
+
|
|
124
|
+
### Example session (Claude Code with CodeMind connected)
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
You: "What would break if I change ThresholdEvaluator?"
|
|
128
|
+
|
|
129
|
+
Claude → impact_analysis("ThresholdEvaluator")
|
|
130
|
+
→ Direct dependents (distance 1): KpiCalculationService, KpiAlertService
|
|
131
|
+
→ Indirect dependents (distance 2): KpiController, ReportsService
|
|
132
|
+
→ 4 components affected — 2 controllers + 2 services
|
|
133
|
+
|
|
134
|
+
You: "Which Angular service calls /api/kpi-builder?"
|
|
135
|
+
|
|
136
|
+
Claude → trace_request("/api/kpi-builder")
|
|
137
|
+
→ Frontend: KpiService (service) — calls this endpoint
|
|
138
|
+
→ Backend: KpiBuilderController (controller) — route: /api/kpi-builder
|
|
139
|
+
→ Cross-layer connection: KpiService → KpiBuilderController
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## What `.codemind/` Contains
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
your-project/
|
|
146
|
+
└── .codemind/
|
|
147
|
+
├── graph.json ← The knowledge graph (auto-updated on every save)
|
|
148
|
+
├── ARCHITECTURE.md ← System overview, module map (auto-generated)
|
|
149
|
+
├── modules/ ← Per-domain docs: auth.md, kpi.md, ...
|
|
150
|
+
├── decisions/ ← Why things were built this way
|
|
151
|
+
│ └── 2026-02-15-add-kpi-alert.md
|
|
152
|
+
├── tasks/ ← Implementation checklists (from scaffold)
|
|
153
|
+
└── config.yml ← Project settings
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Everything is human-readable. Git-friendly. Private.
|
|
157
|
+
|
|
158
|
+
## Scaffold — Generate Code From Your Graph
|
|
159
|
+
|
|
160
|
+
CodeMind learns your project's package structure, naming conventions, and injection patterns from the graph, then generates new code that matches:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
codemind scaffold service KpiAlert # KpiAlertService.java + test
|
|
164
|
+
codemind scaffold module Attendance # Full stack: service + controller + entity + repository + test
|
|
165
|
+
codemind scaffold api ReportExport # Controller + service + test
|
|
166
|
+
codemind scaffold component Dashboard # Angular/TypeScript service
|
|
167
|
+
|
|
168
|
+
# Preview without writing:
|
|
169
|
+
codemind scaffold module Attendance --dry-run
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Generated files use your real package (`com.app.kpi.business.kpialert`), your real API path (`/api/kpi-alert`), and your real table name (`kpi_alert`) — all derived from the graph.
|
|
173
|
+
|
|
174
|
+
## Health Checks
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
codemind check # Full check: naming, layer violations, missing tests, orphans, domains
|
|
178
|
+
codemind check --quick # Fast: naming + layer violations only
|
|
179
|
+
codemind check --pre-commit # Git hook mode: exit 1 on errors
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Five checks, all driven by the graph:
|
|
183
|
+
- **naming** — component names match their type (`KpiService` should end in `Service`)
|
|
184
|
+
- **layer_violation** — controllers injecting repositories directly (error)
|
|
185
|
+
- **missing_test** — services/controllers without a test class
|
|
186
|
+
- **orphan** — structural nodes with no connections (dead code?)
|
|
187
|
+
- **domain_incomplete** — domains missing key layers
|
|
188
|
+
|
|
189
|
+
Install as a git pre-commit hook:
|
|
190
|
+
```bash
|
|
191
|
+
codemind install-hook
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Decision Tracking
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
codemind decide "Add KPI threshold alert" # Interactive — prompts for components + reason
|
|
198
|
+
codemind decisions # List recent decisions
|
|
199
|
+
codemind decisions show kpi-threshold # Print full decision
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
At session start, Claude calls `get_decisions` automatically and knows what was built and why. No re-explaining.
|
|
203
|
+
|
|
204
|
+
## Team Reports (BYOK)
|
|
205
|
+
|
|
206
|
+
When you ask Claude about your codebase in a session, the answer disappears when the session ends.
|
|
207
|
+
These three commands generate **persistent markdown reports** that live in your repo — readable by
|
|
208
|
+
the whole team, committable, and shareable without anyone needing an active AI session.
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
codemind review # Architectural review → .codemind/REVIEW.md
|
|
212
|
+
codemind brief # Onboarding brief → .codemind/BRIEF.md
|
|
213
|
+
codemind impact ThresholdEvaluator --ai # Risk badge → printed + committable
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**`codemind review`** — compresses your entire graph (all components, health check results,
|
|
217
|
+
connection counts) into a structured architectural review: strengths, risks, recommendations,
|
|
218
|
+
key metrics. Commit `REVIEW.md` so every teammate sees the same picture.
|
|
219
|
+
|
|
220
|
+
**`codemind brief`** — generates an onboarding doc: what the system does, the 5 most important
|
|
221
|
+
components, the 3 domains to understand first, key patterns, and a glossary of domain terms
|
|
222
|
+
extracted from your component names. A new developer reads it before their first session —
|
|
223
|
+
onboarded before they open Claude Code.
|
|
224
|
+
|
|
225
|
+
**`codemind impact <component> --ai`** — runs a full BFS across the entire graph first (not
|
|
226
|
+
just what's in your current context), then asks Claude to assess risk level (🟢/🟡/🔴) with
|
|
227
|
+
specific high-risk callers named. Useful in CI: block a PR when blast radius is 🔴 HIGH.
|
|
228
|
+
|
|
229
|
+
All three require `ANTHROPIC_API_KEY` (set once in your shell). Results are cached in
|
|
230
|
+
`.codemind/ai-cache/` keyed by graph content — running them twice on the same graph costs
|
|
231
|
+
nothing. One `codemind review` (~$0.003) generates a report the whole team benefits from.
|
|
232
|
+
|
|
233
|
+
> **Any-language support needs no API key.** `index_file` + `add_component` index Dart,
|
|
234
|
+
> Kotlin, Swift, Go, C#, Ruby, Rust and any other language at zero cost — they use your
|
|
235
|
+
> existing Claude Code session, not a separate key.
|
|
236
|
+
|
|
237
|
+
## CLI Reference
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
# Core
|
|
241
|
+
codemind init # Initialize .codemind/ (1 project free)
|
|
242
|
+
codemind scan # Parse codebase → graph.json + ARCHITECTURE.md + modules/
|
|
243
|
+
codemind status # Graph stats overview
|
|
244
|
+
|
|
245
|
+
# AI tool integration
|
|
246
|
+
codemind connect # Auto-register MCP with Claude Code/Cursor/Claude Desktop
|
|
247
|
+
codemind connect --tool claude # Claude Code only
|
|
248
|
+
codemind connect --global # Global config (all projects)
|
|
249
|
+
|
|
250
|
+
# Keep graph live
|
|
251
|
+
codemind watch # File watcher only (CLI workflow)
|
|
252
|
+
codemind serve # MCP server + file watcher (AI tool integration)
|
|
253
|
+
|
|
254
|
+
# Query
|
|
255
|
+
codemind query "email on KPI drop" # find_for_task
|
|
256
|
+
codemind query "" --connections KpiService # get_connections
|
|
257
|
+
codemind query "" --impact ThresholdEvaluator # impact_analysis
|
|
258
|
+
codemind query "" --pattern # get_pattern
|
|
259
|
+
|
|
260
|
+
# Pro AI (requires ANTHROPIC_API_KEY)
|
|
261
|
+
codemind review # Architectural review
|
|
262
|
+
codemind brief # Onboarding brief
|
|
263
|
+
codemind impact <component> --ai # Impact + AI risk assessment
|
|
264
|
+
|
|
265
|
+
# Scaffold
|
|
266
|
+
codemind scaffold service|module|api|component <name>
|
|
267
|
+
codemind scaffold module Attendance --dry-run # Preview
|
|
268
|
+
|
|
269
|
+
# Health
|
|
270
|
+
codemind check
|
|
271
|
+
codemind check --quick
|
|
272
|
+
codemind install-hook # Install as git pre-commit hook
|
|
273
|
+
|
|
274
|
+
# Decisions
|
|
275
|
+
codemind decide "What was built"
|
|
276
|
+
codemind decisions
|
|
277
|
+
codemind decisions show <slug>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## Supported Stacks
|
|
281
|
+
|
|
282
|
+
### Native parsers — fully offline, no API key ever
|
|
283
|
+
|
|
284
|
+
| Language | Frameworks | Edges extracted |
|
|
285
|
+
|----------|-----------|----------------|
|
|
286
|
+
| Java | Spring Boot, Jakarta EE, Lombok, JPA | injects, calls, extends, implements |
|
|
287
|
+
| TypeScript | Angular, React, Next.js, NestJS | injects, calls, extends, implements |
|
|
288
|
+
| Python | FastAPI, Django, Flask, Pydantic, SQLAlchemy | injects, calls, extends |
|
|
289
|
+
|
|
290
|
+
**Fullstack cross-layer routing:** Spring Boot + Angular, Spring Boot + React. CodeMind detects frontend HTTP calls and backend routes, then creates cross-layer edges — so `trace_request("/api/offers")` shows the full path from Angular service to Spring controller.
|
|
291
|
+
|
|
292
|
+
### Any other language — via `index_file` + `add_component` — free, no API key
|
|
293
|
+
|
|
294
|
+
When `find_components` finds nothing for a Dart / Kotlin / Swift / Go file, CodeMind automatically reads the file and returns it to your AI session with extraction instructions. Claude Code analyses it using your existing subscription and calls `add_component` to persist each class to `graph.json` permanently — available offline from that point forward.
|
|
295
|
+
|
|
296
|
+
| Language | Cost |
|
|
297
|
+
|----------|------|
|
|
298
|
+
| Dart / Flutter | $0 — uses your Claude Code session |
|
|
299
|
+
| Kotlin / Android | $0 — uses your Claude Code session |
|
|
300
|
+
| Swift / iOS | $0 — uses your Claude Code session |
|
|
301
|
+
| Go / Gin | $0 — uses your Claude Code session |
|
|
302
|
+
| C# / ASP.NET Core | $0 — uses your Claude Code session |
|
|
303
|
+
| Ruby / Rails | $0 — uses your Claude Code session |
|
|
304
|
+
| Rust, PHP, Elixir, … | $0 — uses your Claude Code session |
|
|
305
|
+
|
|
306
|
+
## Privacy
|
|
307
|
+
|
|
308
|
+
**Everything stays on your machine.** No cloud. No external database. No telemetry.
|
|
309
|
+
|
|
310
|
+
- `graph.json` — stays local
|
|
311
|
+
- `decisions/*.md` — stays local
|
|
312
|
+
- Your source code — never leaves your machine
|
|
313
|
+
- MCP tools run over local stdio — no network
|
|
314
|
+
|
|
315
|
+
The optional BYOK AI enricher (gap-filling injection edges) sends only small structural samples to the Claude API and is strictly opt-in via `ANTHROPIC_API_KEY`. All other features — including any-language indexing via `index_file` — run entirely offline using your existing AI tool session.
|
|
316
|
+
|
|
317
|
+
## Links
|
|
318
|
+
|
|
319
|
+
- **Website:** [codemind.sh](https://codemind.sh)
|
|
320
|
+
- **Docs:** [codemind.sh/docs](https://codemind.sh/docs)
|
|
321
|
+
- **GitHub:** [github.com/onixsolutions/codemind](https://github.com/onixsolutions/codemind)
|
|
322
|
+
|
|
323
|
+
## License
|
|
324
|
+
|
|
325
|
+
Business Source License 1.1 (BSL) — source visible, not for commercial redistribution.
|
|
326
|
+
Converts to MIT after 4 years.
|
|
327
|
+
Personal and evaluation use permitted.
|
|
328
|
+
|
|
329
|
+
Built by [OnixSolutions](https://onixsolutions.net)
|
|
330
|
+
|