Skip to content

Commit 3f181c4

Browse files
committed
release: @devlensio/cli 0.2.6 (devlensio 0.4.1 — subgraph stdout fix)
1 parent 7165ab1 commit 3f181c4

19 files changed

Lines changed: 200 additions & 51 deletions

File tree

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,46 @@ devlens/
272272

273273
---
274274

275+
## Releasing
276+
277+
The repo ships three independently-versioned artifacts:
278+
279+
| Artifact | Package | Version source | Channel |
280+
| :-- | :-- | :-- | :-- |
281+
| Engine | `devlensio` | `engine/package.json` (or the `devlens-engine` repo) | npm |
282+
| CLI + MCP | `@devlensio/cli` (+ 5 platform pkgs) | `scripts/set-version.mjs` | npm (Trusted Publishing / OIDC) on `v*` tag |
283+
| Agent skill | `@devlensio/skill` + Claude plugin | `scripts/set-skill-version.mjs` | see [packages/skill-installer/README.md](packages/skill-installer/README.md) |
284+
285+
### Release the CLI (`@devlensio/cli`)
286+
287+
`scripts/set-version.mjs <ver>` stamps **every** manifest in lockstep — the main package, all 5 `npm/<platform>/package.json`, the pinned `optionalDependencies`, `server.json` (MCP registry), and the CLI's hardcoded `--version`. Pushing a `v*` tag triggers `.github/workflows/release.yml`, which builds the binaries and publishes to npm (via OIDC, no token), the MCP registry, and the GitHub release.
288+
289+
```bash
290+
# 0. (only if the engine changed) publish devlensio first, then bump its pin:
291+
# in devlens-engine: npm version patch && npm publish
292+
# here: set "devlensio" in package.json to the new ^x.y.z and `bun install`
293+
294+
# 1. bump all manifests in lockstep
295+
node scripts/set-version.mjs 0.2.6
296+
297+
# 2. commit
298+
git add -A
299+
git commit -m "release: @devlensio/cli 0.2.6"
300+
301+
# 3. tag + push (the tag push is what triggers the release workflow)
302+
git push
303+
git tag v0.2.6
304+
git push origin v0.2.6
305+
```
306+
307+
> The binaries bundle whatever `devlensio` resolves to **at build time**. CI installs the published `devlensio` from the dependency pin — so an engine fix only reaches users after `devlensio` is republished **and** the pin here is bumped. (Locally, `bun link devlensio` points at the working copy; re-run it if a `bun install` clobbers the link.)
308+
309+
### Release the Agent skill
310+
311+
Versioned separately from the CLI — see [packages/skill-installer/README.md](packages/skill-installer/README.md). In short: `node scripts/set-skill-version.mjs <ver>`, then `npm publish` the installer and push the plugin.
312+
313+
---
314+
275315
## Contributing
276316

277317
DevLens is actively under development. The core engine and frontend are functional, with a lot more planned.

bun.lock

Lines changed: 20 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm/darwin-arm64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devlensio/cli-darwin-arm64",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"description": "Prebuilt DevLens CLI binary for macOS arm64 (Apple Silicon)",
55
"license": "AGPL-3.0",
66
"repository": {

npm/darwin-x64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devlensio/cli-darwin-x64",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"description": "Prebuilt DevLens CLI binary for macOS x64 (Intel)",
55
"license": "AGPL-3.0",
66
"repository": {

npm/linux-arm64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devlensio/cli-linux-arm64",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"description": "Prebuilt DevLens CLI binary for Linux arm64",
55
"license": "AGPL-3.0",
66
"repository": {

npm/linux-x64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devlensio/cli-linux-x64",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"description": "Prebuilt DevLens CLI binary for Linux x64",
55
"license": "AGPL-3.0",
66
"repository": {

npm/windows-x64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devlensio/cli-windows-x64",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"description": "Prebuilt DevLens CLI binary for Windows x64",
55
"license": "AGPL-3.0",
66
"repository": {

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devlensio/cli",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"mcpName": "io.github.devlensio/devlens",
55
"type": "module",
66
"publishConfig": {
@@ -27,19 +27,19 @@
2727
"stage:binaries": "node scripts/stage-binaries.mjs"
2828
},
2929
"optionalDependencies": {
30-
"@devlensio/cli-darwin-arm64": "0.2.5",
31-
"@devlensio/cli-darwin-x64": "0.2.5",
32-
"@devlensio/cli-linux-x64": "0.2.5",
33-
"@devlensio/cli-linux-arm64": "0.2.5",
34-
"@devlensio/cli-windows-x64": "0.2.5"
30+
"@devlensio/cli-darwin-arm64": "0.2.6",
31+
"@devlensio/cli-darwin-x64": "0.2.6",
32+
"@devlensio/cli-linux-x64": "0.2.6",
33+
"@devlensio/cli-linux-arm64": "0.2.6",
34+
"@devlensio/cli-windows-x64": "0.2.6"
3535
},
3636
"devDependencies": {
3737
"@modelcontextprotocol/sdk": "^1.29.0",
3838
"@types/bun": "^1.3.14",
3939
"@types/node": "^26.0.0",
4040
"commander": "^15.0.0",
4141
"concurrently": "^9.0.0",
42-
"devlensio": "^0.4.0",
42+
"devlensio": "^0.4.1",
4343
"dotenv": "^17.3.1",
4444
"lru-cache": "^11.5.1",
4545
"zod": "^4.4.3"

plugins/devlens/skills/devlens/SKILL.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: devlens
33
description: Understand a TS/JS/React/Next.js/Node codebase with the DevLens CLI — query a precomputed graph of nodes (components, hooks, functions, routes) and typed edges, each carrying technical/business/security summaries, instead of grepping and reading whole files. Use when exploring an unfamiliar repo, before editing code, or for requests like "where does X live", "what breaks if I change Y", "explain this codebase", "draw the architecture", "is this secure", "find circular dependencies", or impact/security/architecture review.
4-
argument-hint: "[init|architecture|diagram|summary|security-analysis|explain|tech-debt|impact|find]"
4+
argument-hint: "[init|architecture|diagram|summary|security-analysis|explain|tech-debt|impact|find|changes|guard]"
55
allowed-tools: Bash(devlens *), Bash(git *), Bash(npm *), Bash(npx *)
66
---
77

@@ -11,6 +11,8 @@ DevLens precomputes a structural graph of a repo: nodes (components, hooks, func
1111

1212
**Why this saves tokens:** a node summary is ~50 tokens; the underlying file is ~2000. Querying summaries, and using `blast-radius`/`khop` to fetch only the relevant slice, costs a fraction of reading files. Always pass `--json`. Reach for raw source (`node-code`) only as a last resort.
1313

14+
**Standing rule — prefer summaries when available:** whenever a node has a technical or functional (business) summary, read it (`get-node` / `get-summaries -i technical|business`) to understand the code **instead of opening the file** — it is far cheaper and usually enough. Only fall back to `node-code` or reading the file when no summary exists (structure-only graph) or the summary is genuinely insufficient to act. This applies to every subcommand below.
15+
1416
## Step 1 — Ensure the CLI exists
1517
Run `devlens --version`. If it is missing: `npm install -g @devlensio/cli` (corporate proxy? see the install note — set `NODE_EXTRA_CA_CERTS`).
1618

@@ -47,6 +49,8 @@ You were invoked as `/devlens $ARGUMENTS`. Take the first word (`$0`) as the sub
4749
| `tech-debt` | `${CLAUDE_SKILL_DIR}/commands/tech-debt.md` |
4850
| `impact` | `${CLAUDE_SKILL_DIR}/commands/impact.md` |
4951
| `find` | `${CLAUDE_SKILL_DIR}/commands/find.md` |
52+
| `changes` | `${CLAUDE_SKILL_DIR}/commands/changes.md` |
53+
| `guard` | `${CLAUDE_SKILL_DIR}/commands/guard.md` |
5054

5155
- **No argument** (bare `/devlens`): briefly list the subcommands above with one line each, and point to `${CLAUDE_SKILL_DIR}/reference.md` for the full CLI catalog and when to use each command. Do not run analysis.
5256
- **Unknown argument**: say so and show the subcommand list.
Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
# /devlens architecture — system design brief
22

3-
Produce a high-level map of the codebase. Arguments: none (operates on the cwd graph; `-g <id>` to target another).
3+
Produce a **complete** map of the codebase, not a sample. The graph can be large (hundreds of nodes); cover every node type, the module/layer structure, the key connections **and their edge types**, and the risks. Arguments: none (operates on the cwd graph; `-g <id>` to target another).
44

55
**Needs summaries** for the richest output — follow the freshness/summarize-permission policy in SKILL.md first.
66

7-
## Commands used
8-
1. `devlens overview --json` — fingerprint: `framework`, `router`, `stateManagement`, `dataFetching`, `databases`, `rawDependencies`, stats, central nodes.
9-
2. `devlens top-nodes -l 15 --json` — the most central modules (`-l` sets how many).
10-
3. `devlens subgraph <seedNodeId> --json` — run on the top 2–3 central node ids from step 2 to reveal their clusters.
11-
4. `devlens cycles --json` — circular dependency groups (`{total, cycles}`).
7+
## Commands & how to use them
8+
1. **Headline stats:** `devlens overview --json``stats.totalNodes`/`totalEdges`, `routeCount`, `fingerprint` (framework, router, stateManagement, dataFetching, databases), plus `topNodes` (10) and `topFiles` (10).
9+
2. **Full node inventory (this is what makes it complete):** `devlens find-nodes -l 2000 --json`**all** nodes as compact refs `{id, name, type, filePath, score, severity, summary}`. From this, compute:
10+
- the **node-type distribution** (counts per type: COMPONENT, FUNCTION, FILE, ROUTE, STATE_STORE, HOOK, …);
11+
- **modules/layers** by grouping nodes on their top-level directory (e.g. `src/app/api`, `src/components`, `src/app/firebase`, `src/components/ZustandStores`).
12+
3. **Backbone enumeration** (the structural anchors):
13+
- Entry points: `devlens find-nodes -t ROUTE -l 200 --json`.
14+
- State: `devlens find-nodes -t STATE_STORE -l 50 --json`.
15+
- Key UI/logic: the highest-`score` COMPONENT/FUNCTION nodes from the inventory (or `devlens top-nodes -l 20 --json`).
16+
4. **Connections + edge types** — do **NOT** use `devlens subgraph --json` (it currently prints a text cluster listing, not JSON). Instead, for the central nodes (topNodes) and each store/route hub:
17+
- `devlens khop <id> -r 2 --json` (downstream) and/or `devlens blast-radius <id> -r 2 --json` (upstream). Each returned node carries **`viaEdge`** (the edge type: CALLS, IMPORTS, READS_FROM, WRITES_TO, PROP_PASS, USES, HANDLES, …) and `hop`.
18+
- For one node's immediate wiring: `devlens get-node <id> --json``callers`/`callees`, each with `viaEdge`.
19+
- Aggregate the `viaEdge` values to describe how modules connect and which edge types dominate.
20+
5. **Meaning (batch, cheap):** `devlens get-summaries <id...> -i business --json` (functional) **and** `-i technical --json` for the backbone nodes. Use the **functional** summary to say what each module/node means for the product and the **technical** summary to say what it does — describe every module and backbone node from its summaries, not from its name alone.
21+
6. **Security posture:** every compact node ref carries a `severity` (none|low|medium|high); also run `devlens security --min-severity low --json` for the flagged set with `securitySummary`. Fold this into the brief — call out which modules/nodes carry medium/high risk.
1222

13-
## Output
14-
A concise brief:
23+
## Output — a thorough brief
1524
- **Stack** — framework + router, state management, data fetching, databases, notable deps.
16-
- **Shape** — node/edge counts, dominant node types.
17-
- **Core modules** — the central nodes (name, file, one-line role from their summary).
18-
- **Clusters** — the cohesive groups from subgraph, and how they relate.
19-
- **Risks** — any cycles, and unusually high-fan-out hubs.
25+
- **By the numbers**`totalNodes`/`totalEdges`, `routeCount`, and the **node-type distribution** (counts per type).
26+
- **Modules / layers** — the directory groups, each with its purpose **drawn from the functional + technical summaries** and representative nodes.
27+
- **Backbone** — key routes (entry points), stores (state), and central components/functions, each with a one-line role from its summary.
28+
- **How it connects** — the dominant **edge types** (CALLS/IMPORTS/READS_FROM/WRITES_TO/PROP_PASS/HANDLES/USES/…) and the main data/control-flow paths between modules (from the `viaEdge` data in step 4).
29+
- **Security posture** — modules/nodes with medium/high `severity`, summarized from their `securitySummary` (step 6).
30+
- **Risks** — cycles (`devlens cycles --json`) and high-fan-in hubs (large blast radius).
2031

2132
End by offering `/devlens diagram architecture` for a visual and `/devlens explain` for an onboarding walkthrough.

0 commit comments

Comments
 (0)