codebeacon 0.1.2__tar.gz → 0.1.4__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.
- codebeacon-0.1.4/.github/CODEOWNERS +1 -0
- codebeacon-0.1.4/.github/dependabot.yml +12 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/.github/workflows/ci.yml +2 -2
- codebeacon-0.1.4/.github/workflows/release.yml +49 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/PKG-INFO +169 -42
- {codebeacon-0.1.2 → codebeacon-0.1.4}/README.de.md +185 -35
- {codebeacon-0.1.2 → codebeacon-0.1.4}/README.es.md +185 -35
- {codebeacon-0.1.2 → codebeacon-0.1.4}/README.fr.md +185 -35
- {codebeacon-0.1.2 → codebeacon-0.1.4}/README.ja.md +156 -41
- {codebeacon-0.1.2 → codebeacon-0.1.4}/README.ko.md +168 -41
- {codebeacon-0.1.2 → codebeacon-0.1.4}/README.md +168 -41
- {codebeacon-0.1.2 → codebeacon-0.1.4}/README.pt-BR.md +185 -35
- {codebeacon-0.1.2 → codebeacon-0.1.4}/README.zh-CN.md +156 -41
- codebeacon-0.1.4/codebeacon/__init__.py +1 -0
- codebeacon-0.1.4/codebeacon/cli.py +703 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/config.py +32 -16
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/discover/detector.py +30 -16
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/export/mcp.py +3 -1
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/react.scm +16 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/routes.py +1 -1
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/graph/build.py +8 -2
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/graph/enrich.py +13 -3
- {codebeacon-0.1.2 → codebeacon-0.1.4/codebeacon}/skill/SKILL.md +27 -25
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon.yaml.example +0 -1
- {codebeacon-0.1.2 → codebeacon-0.1.4}/pyproject.toml +1 -1
- codebeacon-0.1.2/codebeacon/__init__.py +0 -1
- codebeacon-0.1.2/codebeacon/cli.py +0 -391
- {codebeacon-0.1.2 → codebeacon-0.1.4}/.cursorrules +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/.gitignore +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/AGENTS.md +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/CLAUDE.md +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/LICENSE +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/__main__.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/cache.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/common/__init__.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/common/filters.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/common/symbols.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/common/types.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/contextmap/__init__.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/contextmap/generator.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/discover/__init__.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/discover/scanner.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/export/__init__.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/export/obsidian.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/__init__.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/base.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/components.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/dependencies.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/entities.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/README.md +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/actix.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/angular.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/aspnet.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/django.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/express.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/fastapi.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/flask.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/gin.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/ktor.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/laravel.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/nestjs.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/rails.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/spring_boot.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/svelte.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/vapor.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/queries/vue.scm +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/semantic.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/extract/services.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/graph/__init__.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/graph/analyze.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/graph/cluster.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/wave.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/wiki/__init__.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/wiki/generator.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/wiki/index.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/codebeacon/wiki/templates.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/docs/TRANSLATION_STATUS.md +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/public-plan.md +0 -0
- {codebeacon-0.1.2/codebeacon → codebeacon-0.1.4}/skill/SKILL.md +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/skill/install.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/__init__.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/conftest.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/actix/main.rs +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/angular/app.component.ts +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/aspnet/UserController.cs +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/django/views.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/express/userRouter.js +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/fastapi/main.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/flask/app.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/gin/main.go +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/ktor/UserRoutes.kt +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/laravel/UserController.php +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/nestjs/user.controller.ts +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/rails/users_controller.rb +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/react/UserPage.tsx +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/spring_boot/UserController.java +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/sveltekit/+page.svelte +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/vapor/routes.swift +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/fixtures/vue/UserList.vue +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/test_discover.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/test_entities.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/test_filters.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/test_graph.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/test_resolve.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/test_routes.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/test_services.py +0 -0
- {codebeacon-0.1.2 → codebeacon-0.1.4}/tests/test_wiki.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @Wandererer
|
|
@@ -16,9 +16,9 @@ jobs:
|
|
|
16
16
|
python-version: ["3.10", "3.11", "3.12"]
|
|
17
17
|
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
19
|
+
- uses: actions/checkout@v6
|
|
20
20
|
|
|
21
|
-
- uses: actions/setup-python@
|
|
21
|
+
- uses: actions/setup-python@v6
|
|
22
22
|
with:
|
|
23
23
|
python-version: ${{ matrix.python-version }}
|
|
24
24
|
cache: "pip"
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Release to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Build distribution
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v6
|
|
14
|
+
|
|
15
|
+
- uses: actions/setup-python@v6
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.12"
|
|
18
|
+
|
|
19
|
+
- name: Install build
|
|
20
|
+
run: pip install build
|
|
21
|
+
|
|
22
|
+
- name: Build package
|
|
23
|
+
run: python -m build
|
|
24
|
+
|
|
25
|
+
- name: Upload dist artifacts
|
|
26
|
+
uses: actions/upload-artifact@v7
|
|
27
|
+
with:
|
|
28
|
+
name: dist
|
|
29
|
+
path: dist/
|
|
30
|
+
|
|
31
|
+
publish:
|
|
32
|
+
name: Publish to PyPI
|
|
33
|
+
needs: build
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
environment:
|
|
36
|
+
name: pypi
|
|
37
|
+
url: https://pypi.org/project/codebeacon/
|
|
38
|
+
permissions:
|
|
39
|
+
id-token: write # Trusted Publishing (OIDC) — 비밀번호 불필요
|
|
40
|
+
|
|
41
|
+
steps:
|
|
42
|
+
- name: Download dist artifacts
|
|
43
|
+
uses: actions/download-artifact@v8
|
|
44
|
+
with:
|
|
45
|
+
name: dist
|
|
46
|
+
path: dist/
|
|
47
|
+
|
|
48
|
+
- name: Publish to PyPI
|
|
49
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codebeacon
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Source code AST analysis tool for AI context generation — unified multi-framework knowledge graph
|
|
5
5
|
Project-URL: Homepage, https://github.com/codebeacon/codebeacon
|
|
6
6
|
Project-URL: Repository, https://github.com/codebeacon/codebeacon
|
|
@@ -42,14 +42,14 @@ Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
|
42
42
|
Description-Content-Type: text/markdown
|
|
43
43
|
|
|
44
44
|
<p align="center">
|
|
45
|
-
<a href="https://github.com/
|
|
46
|
-
<a href="https://github.com/
|
|
47
|
-
<a href="https://github.com/
|
|
48
|
-
<a href="https://github.com/
|
|
49
|
-
<a href="https://github.com/
|
|
50
|
-
<a href="https://github.com/
|
|
51
|
-
<a href="https://github.com/
|
|
52
|
-
<a href="https://github.com/
|
|
45
|
+
<a href="https://github.com/Wandererer/codebeacon/blob/main/README.md"><img src="https://img.shields.io/badge/lang-English-blue" alt="English"></a>
|
|
46
|
+
<a href="https://github.com/Wandererer/codebeacon/blob/main/README.ko.md"><img src="https://img.shields.io/badge/lang-한국어-red" alt="Korean"></a>
|
|
47
|
+
<a href="https://github.com/Wandererer/codebeacon/blob/main/README.ja.md"><img src="https://img.shields.io/badge/lang-日本語-green" alt="Japanese"></a>
|
|
48
|
+
<a href="https://github.com/Wandererer/codebeacon/blob/main/README.zh-CN.md"><img src="https://img.shields.io/badge/lang-简体中文-orange" alt="Chinese"></a>
|
|
49
|
+
<a href="https://github.com/Wandererer/codebeacon/blob/main/README.es.md"><img src="https://img.shields.io/badge/lang-Español-yellow" alt="Spanish"></a>
|
|
50
|
+
<a href="https://github.com/Wandererer/codebeacon/blob/main/README.fr.md"><img src="https://img.shields.io/badge/lang-Français-blueviolet" alt="French"></a>
|
|
51
|
+
<a href="https://github.com/Wandererer/codebeacon/blob/main/README.de.md"><img src="https://img.shields.io/badge/lang-Deutsch-lightgrey" alt="German"></a>
|
|
52
|
+
<a href="https://github.com/Wandererer/codebeacon/blob/main/README.pt-BR.md"><img src="https://img.shields.io/badge/lang-Português_(BR)-brightgreen" alt="Portuguese (Brazil)"></a>
|
|
53
53
|
</p>
|
|
54
54
|
|
|
55
55
|
<h1 align="center">codebeacon</h1>
|
|
@@ -62,8 +62,8 @@ Description-Content-Type: text/markdown
|
|
|
62
62
|
<a href="https://pypi.org/project/codebeacon/"><img src="https://img.shields.io/pypi/v/codebeacon" alt="PyPI"></a>
|
|
63
63
|
<a href="https://pypi.org/project/codebeacon/"><img src="https://img.shields.io/pypi/pyversions/codebeacon" alt="Python"></a>
|
|
64
64
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License"></a>
|
|
65
|
-
<a href="https://github.com/
|
|
66
|
-
<a href="https://github.com/
|
|
65
|
+
<a href="https://github.com/Wandererer/codebeacon/stargazers"><img src="https://img.shields.io/github/stars/Wandererer/codebeacon" alt="GitHub Stars"></a>
|
|
66
|
+
<a href="https://github.com/Wandererer/codebeacon/commits/main"><img src="https://img.shields.io/github/last-commit/Wandererer/codebeacon" alt="Last Commit"></a>
|
|
67
67
|
</p>
|
|
68
68
|
|
|
69
69
|
---
|
|
@@ -81,14 +81,15 @@ Existing tools solve this partially. Route analyzers map your controllers but mi
|
|
|
81
81
|
## Key Features
|
|
82
82
|
|
|
83
83
|
- **Unified pipeline** — route/controller analysis + knowledge graph in one tool, no manual stitching
|
|
84
|
-
- **
|
|
85
|
-
- **Tree-sitter based** — structural AST parsing, not regex; all
|
|
84
|
+
- **24 frameworks, 9 languages** — Spring Boot, NestJS, Django, FastAPI, Flask, Rails, Express, Fastify, Koa, React, Next.js, Vue, Nuxt, Angular, SvelteKit, Gin, Echo, Fiber, Laravel, Actix-Web, Axum, ASP.NET Core, Vapor, Ktor
|
|
85
|
+
- **Tree-sitter based** — structural AST parsing, not regex; all language grammars included out of the box
|
|
86
86
|
- **Two-pass DI resolution** — Pass 1 extracts local AST nodes; Pass 2 builds a global symbol table and resolves Interface → Implementation mappings that single-pass tools miss
|
|
87
87
|
- **Wave merge architecture** — files processed in parallel chunks, results merged globally; handles large monorepos without memory blowouts
|
|
88
88
|
- **Multiple output formats** — JSON knowledge graph, Markdown wiki, Obsidian vault, AI context maps, MCP server
|
|
89
89
|
- **Community detection** — Leiden/Louvain clustering reveals your actual architectural boundaries
|
|
90
90
|
- **Incremental cache** — SHA-256 based; only re-extracts files that changed since the last scan
|
|
91
91
|
- **Zero configuration** — auto-detects frameworks and languages; generates `codebeacon.yaml` for repeat runs
|
|
92
|
+
- **Deep-dive mode** — `--deep-dive` generates per-project `.codebeacon/` + `CLAUDE.md` for every sub-project; running `codebeacon scan . --update` from any sub-project folder automatically syncs all projects in the workspace
|
|
92
93
|
|
|
93
94
|
---
|
|
94
95
|
|
|
@@ -117,11 +118,11 @@ codebeacon sync # subsequent runs via config
|
|
|
117
118
|
|----------|-----------|
|
|
118
119
|
| Java / Kotlin | Spring Boot, Ktor |
|
|
119
120
|
| Python | Django, FastAPI, Flask |
|
|
120
|
-
| JavaScript / TypeScript | Express, NestJS, React, Vue, Angular,
|
|
121
|
-
| Go | Gin |
|
|
121
|
+
| JavaScript / TypeScript | Express, Fastify, Koa, NestJS, React, Next.js, Vue, Nuxt, Angular, SvelteKit |
|
|
122
|
+
| Go | Gin, Echo, Fiber |
|
|
122
123
|
| Ruby | Rails |
|
|
123
124
|
| PHP | Laravel |
|
|
124
|
-
| Rust | Actix-Web |
|
|
125
|
+
| Rust | Actix-Web, Axum |
|
|
125
126
|
| C# | ASP.NET Core |
|
|
126
127
|
| Swift | Vapor |
|
|
127
128
|
|
|
@@ -150,37 +151,147 @@ codebeacon runs a two-pass extraction pipeline:
|
|
|
150
151
|
|
|
151
152
|
## Output Structure
|
|
152
153
|
|
|
153
|
-
After a scan,
|
|
154
|
+
After a scan, context map files are updated at the project root (existing user content is preserved) and the knowledge graph lands in `.codebeacon/`:
|
|
154
155
|
|
|
155
156
|
```
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
157
|
+
project-root/
|
|
158
|
+
CLAUDE.md ← AI context map (codebeacon block merged; user content kept)
|
|
159
|
+
.cursorrules ← Cursor IDE context (same merge strategy)
|
|
160
|
+
AGENTS.md ← OpenAI Agents / Codex context (same merge strategy)
|
|
161
|
+
.codebeacon/
|
|
162
|
+
beacon.json ← full knowledge graph (node-link JSON, queryable)
|
|
163
|
+
REPORT.md ← god nodes, surprising connections, hub files
|
|
164
|
+
wiki/
|
|
165
|
+
index.md ← global index (~200 tokens)
|
|
166
|
+
overview.md ← platform stats + cross-project connections
|
|
167
|
+
routes.md ← all routes table
|
|
168
|
+
cross-project/
|
|
169
|
+
connections.md ← cross-service edges
|
|
170
|
+
<project>/
|
|
171
|
+
index.md
|
|
172
|
+
routes.md
|
|
173
|
+
controllers/<Name>.md
|
|
174
|
+
services/<Name>.md
|
|
175
|
+
entities/<Name>.md
|
|
176
|
+
components/<Name>.md
|
|
177
|
+
obsidian/ ← Obsidian vault (one note per graph node)
|
|
176
178
|
```
|
|
177
179
|
|
|
180
|
+
### Deep Dive Mode
|
|
181
|
+
|
|
182
|
+
With `--deep-dive`, each sub-project also gets its own `.codebeacon/` directory and `CLAUDE.md`, so AI sessions opened inside a sub-project have full project-specific context:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
workspace/
|
|
186
|
+
CLAUDE.md ← combined (all projects)
|
|
187
|
+
.cursorrules
|
|
188
|
+
AGENTS.md
|
|
189
|
+
codebeacon.yaml ← deep_dive: true
|
|
190
|
+
.codebeacon/ ← combined knowledge graph
|
|
191
|
+
beacon.json
|
|
192
|
+
wiki/
|
|
193
|
+
obsidian/
|
|
194
|
+
api-server/
|
|
195
|
+
CLAUDE.md ← api-server only
|
|
196
|
+
.codebeacon/ ← api-server graph
|
|
197
|
+
beacon.json
|
|
198
|
+
wiki/
|
|
199
|
+
obsidian/
|
|
200
|
+
frontend/
|
|
201
|
+
CLAUDE.md ← frontend only
|
|
202
|
+
.codebeacon/ ← frontend graph
|
|
203
|
+
beacon.json
|
|
204
|
+
wiki/
|
|
205
|
+
obsidian/
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Claude Code loads `CLAUDE.md` hierarchically, so opening a session in `api-server/` loads both the parent workspace overview **and** the project-specific details.
|
|
209
|
+
|
|
210
|
+
To update from any sub-project directory after the initial scan:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Initial deep-dive scan
|
|
214
|
+
codebeacon scan /workspace --deep-dive
|
|
215
|
+
|
|
216
|
+
# Later, from any sub-project — finds the parent config and updates ALL projects
|
|
217
|
+
cd /workspace/api-server
|
|
218
|
+
codebeacon scan . --update
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## AI Integration
|
|
224
|
+
|
|
225
|
+
### Claude Code Skill (`/codebeacon`)
|
|
226
|
+
|
|
227
|
+
Install codebeacon as a Claude Code slash command:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
pip install codebeacon
|
|
231
|
+
codebeacon install
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
This copies `SKILL.md` to `~/.claude/skills/codebeacon/` and registers the `/codebeacon` trigger in `~/.claude/CLAUDE.md`. Restart your Claude Code session, then type `/codebeacon` to scan the current directory.
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
/codebeacon # scan current directory
|
|
238
|
+
/codebeacon /path/to/project # scan a specific path
|
|
239
|
+
/codebeacon sync # re-scan from codebeacon.yaml
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### MCP Server
|
|
243
|
+
|
|
244
|
+
Run codebeacon as a persistent MCP server so any MCP-compatible client can query your knowledge graph directly.
|
|
245
|
+
|
|
246
|
+
**Step 1 — scan your project:**
|
|
247
|
+
```bash
|
|
248
|
+
codebeacon scan .
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Step 2 — add to your MCP client config:**
|
|
252
|
+
|
|
253
|
+
**Claude Code** (`.claude.json` in project root or `~/.claude.json` globally):
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"mcpServers": {
|
|
257
|
+
"codebeacon": {
|
|
258
|
+
"command": "codebeacon",
|
|
259
|
+
"args": ["serve"]
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**Cursor** (`~/.cursor/mcp.json`):
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"mcpServers": {
|
|
269
|
+
"codebeacon": {
|
|
270
|
+
"command": "codebeacon",
|
|
271
|
+
"args": ["serve", "--dir", "/path/to/.codebeacon"]
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
**Available MCP tools** once connected:
|
|
278
|
+
|
|
279
|
+
| Tool | Description |
|
|
280
|
+
|------|-------------|
|
|
281
|
+
| `beacon_wiki_index` | Global project overview (routes, services, entities count) |
|
|
282
|
+
| `beacon_wiki_article` | Read a specific wiki article by path |
|
|
283
|
+
| `beacon_query` | Search nodes by label substring |
|
|
284
|
+
| `beacon_path` | Shortest dependency path between two nodes |
|
|
285
|
+
| `beacon_blast_radius` | Upstream callers + downstream affected nodes |
|
|
286
|
+
| `beacon_routes` | List all HTTP routes, filterable by project |
|
|
287
|
+
| `beacon_services` | List all services/classes, filterable by project |
|
|
288
|
+
|
|
178
289
|
---
|
|
179
290
|
|
|
180
291
|
## Installation Options
|
|
181
292
|
|
|
182
293
|
```bash
|
|
183
|
-
pip install codebeacon # all
|
|
294
|
+
pip install codebeacon # all language grammars included
|
|
184
295
|
pip install codebeacon[cluster] # + Leiden community detection (graspologic)
|
|
185
296
|
pip install --upgrade codebeacon # upgrade to latest version with all dependencies
|
|
186
297
|
```
|
|
@@ -197,10 +308,11 @@ codebeacon scan <path> [options]
|
|
|
197
308
|
codebeacon scan . # current directory
|
|
198
309
|
codebeacon scan /workspace # workspace root (multi-project)
|
|
199
310
|
codebeacon scan . --update # incremental: only re-extract changed files
|
|
200
|
-
codebeacon scan . --wiki-only # regenerate wiki
|
|
311
|
+
codebeacon scan . --wiki-only # skip re-extraction, regenerate wiki/obsidian/context map from existing beacon.json
|
|
201
312
|
codebeacon scan . --obsidian-dir <path> # write Obsidian vault to custom location
|
|
202
313
|
codebeacon scan . --semantic # enable LLM semantic extraction
|
|
203
314
|
codebeacon scan . --list-only # detect frameworks only, don't extract
|
|
315
|
+
codebeacon scan /workspace --deep-dive # per-project + combined workspace outputs
|
|
204
316
|
|
|
205
317
|
# Config-driven mode
|
|
206
318
|
codebeacon init [path] # auto-generate codebeacon.yaml
|
|
@@ -238,7 +350,6 @@ output:
|
|
|
238
350
|
dir: .codebeacon
|
|
239
351
|
wiki: true
|
|
240
352
|
obsidian: true
|
|
241
|
-
graph_html: true
|
|
242
353
|
context_map:
|
|
243
354
|
targets: [CLAUDE.md, .cursorrules, AGENTS.md]
|
|
244
355
|
|
|
@@ -249,6 +360,20 @@ wave:
|
|
|
249
360
|
|
|
250
361
|
semantic:
|
|
251
362
|
enabled: false # override with --semantic flag
|
|
363
|
+
|
|
364
|
+
deep_dive: false # set to true to generate per-project outputs
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### .codebeaconignore
|
|
368
|
+
|
|
369
|
+
Place a `.codebeaconignore` file at your project root to exclude directories or files from scanning. Syntax is the same as `.gitignore` — one pattern per line, `#` for comments.
|
|
370
|
+
|
|
371
|
+
```
|
|
372
|
+
# .codebeaconignore
|
|
373
|
+
generated/
|
|
374
|
+
build/
|
|
375
|
+
*.generated.ts
|
|
376
|
+
fixtures/
|
|
252
377
|
```
|
|
253
378
|
|
|
254
379
|
---
|
|
@@ -287,14 +412,16 @@ All processing is local. Your source code never leaves your machine.
|
|
|
287
412
|
|
|
288
413
|
- Tree-sitter AST parsing runs entirely in-process
|
|
289
414
|
- No telemetry, no analytics, no network calls during normal operation
|
|
290
|
-
- The `--semantic` flag (disabled by default)
|
|
415
|
+
- The `--semantic` flag (disabled by default) activates two extraction modes:
|
|
416
|
+
1. **Structured comment parsing** (no LLM required) — infers cross-references from Javadoc (`@see`, `{@link}`), Python docstrings (`:class:`, `:func:`), and JSDoc (`@see`, `@param` types)
|
|
417
|
+
2. **LLM inference** (optional) — when `ANTHROPIC_API_KEY` is set, sends code excerpts to the Claude API for deeper relationship inference; only enable it explicitly
|
|
291
418
|
|
|
292
419
|
---
|
|
293
420
|
|
|
294
421
|
## Contributing
|
|
295
422
|
|
|
296
423
|
```bash
|
|
297
|
-
git clone https://github.com/
|
|
424
|
+
git clone https://github.com/Wandererer/codebeacon
|
|
298
425
|
cd codebeacon
|
|
299
426
|
pip install -e ".[dev,cluster]"
|
|
300
427
|
pytest
|