@stacknext/cli 0.11.0 → 0.12.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/README.md CHANGED
@@ -6,9 +6,9 @@ Next.js App Router apps and AI coding agents.
6
6
  StackNext collects OpenTelemetry spans plus Drizzle/Prisma query events and
7
7
  Next.js errors over loopback, stores them in a bounded in-memory sample, and
8
8
  exposes a dashboard, CLI and read-only MCP server. It also derives deterministic
9
- diagnostic findings and compares Playwright-linked runtime captures against
10
- saved baselines. No cloud account, hosted backend, AI API key or telemetry
11
- upload.
9
+ diagnostic findings, freezes samples into redacted snapshots and compares
10
+ Playwright-linked runtime captures against saved baselines. No cloud account,
11
+ hosted backend, AI API key or telemetry upload.
12
12
 
13
13
  ## Quick start
14
14
 
@@ -22,12 +22,88 @@ npx stacknext dev
22
22
  `init` detects Next.js 15/16 with the App Router, writes
23
23
  `stacknext.config.json`, and creates `instrumentation.ts` (or
24
24
  `instrumentation.js` for a JavaScript project) only when none exists. Existing
25
- instrumentation is preserved and a manual hook is printed.
26
- `dev` starts the loopback collector and the app's own `dev` script.
25
+ instrumentation is preserved and a manual hook is printed. `dev` starts the
26
+ loopback collector and the app's own `dev` script.
27
27
 
28
- Add `@stacknext/drizzle`, `@stacknext/prisma`, or `@stacknext/playwright` only
28
+ Add `@stacknext/drizzle`, `@stacknext/prisma` or `@stacknext/playwright` only
29
29
  when you use those integrations.
30
30
 
31
+ ## Commands
32
+
33
+ ```bash
34
+ stacknext init [--install]
35
+ stacknext dev [--open] [--quiet] [--token <token>] [nextArgs...]
36
+ stacknext status [--json]
37
+ stacknext doctor [--json]
38
+ stacknext coverage [--json]
39
+ stacknext diagnose [--id <id>] [--trace-id <id>] [--category <category>] [--severity <severity>] [--json]
40
+ stacknext capture [--name <name>] -- <test command...>
41
+ stacknext runs list|show
42
+ stacknext baseline save|list|show|remove
43
+ stacknext compare <baseline-id> <candidate-run-id> [--fail-on regression|inconclusive|any]
44
+ stacknext snapshot save|list|show|export|import|delete
45
+ stacknext export [-o <file> | --stdout]
46
+ stacknext uninstall [--yes] [--keep-config] [--remove-data]
47
+ stacknext mcp [--collector <url>] [--token <token>]
48
+ stacknext skill install --client opencode|codex|claude-code
49
+ ```
50
+
51
+ `dev` writes `.stacknext/run.json` (`0600`) and passes the collector URL and
52
+ token to the app. `status`, `doctor`, `coverage`, `diagnose`, `snapshot`,
53
+ `export` and `mcp` use that runtime state. The collector binds to loopback and
54
+ ingestion requires the bearer token.
55
+
56
+ ## Configuration
57
+
58
+ `stacknext.config.json` is validated by Zod. The main fields cover the project
59
+ name, collector capacity and retention, slow-request threshold, diagnostics
60
+ thresholds, database adapters, error/fetch capture, verbose tracing and
61
+ snapshots. See the installed
62
+ [configuration reference](docs/configuration.md) for every field and default.
63
+
64
+ ## Documentation
65
+
66
+ - [CLI commands](docs/commands.md)
67
+ - [Configuration](docs/configuration.md)
68
+ - [Agent setup](docs/agent-setup.md)
69
+ - [Agent Skill](docs/skill.md)
70
+ - [Troubleshooting](docs/troubleshooting.md)
71
+ - [Installed package index](docs/packages.md)
72
+
73
+ The same files ship in this package under `docs/`, so they match the installed
74
+ version. Public guides live on the
75
+ [documentation site](https://github.com/marrrkkk/stacknext/tree/main/apps/docs).
76
+
77
+ ## AI agents
78
+
79
+ The CLI ships the portable `stacknext-debugging` Agent Skill and a read-only
80
+ stdio MCP server. Start `stacknext dev`, then configure the client to run
81
+ `stacknext mcp` from the app directory. All MCP tools are read-only and only
82
+ perform GETs against the loopback collector. Install the skill with:
83
+
84
+ ```bash
85
+ stacknext skill install --client opencode
86
+ stacknext skill install --client codex
87
+ stacknext skill install --client claude-code
88
+ ```
89
+
90
+ See [agent setup](docs/agent-setup.md) and the public
91
+ [AI agent guide](https://github.com/marrrkkk/stacknext/blob/main/apps/docs/ai-agents/index.md).
92
+
93
+ ## Development
94
+
95
+ This package is part of the StackNext pnpm monorepo:
96
+
97
+ ```bash
98
+ pnpm --filter @stacknext/cli build
99
+ pnpm --filter @stacknext/cli typecheck
100
+ pnpm test
101
+ ```
102
+
103
+ The collector and CLI tests use real transport and collector behavior where
104
+ practical. See the repository
105
+ [testing strategy](https://github.com/marrrkkk/stacknext/blob/main/docs/testing/testing-strategy.md).
106
+
31
107
  ## Requirements
32
108
 
33
109
  - Node.js 20.9 or newer
@@ -35,8 +111,7 @@ when you use those integrations.
35
111
  - Playwright 1.40+ for runtime regression capture
36
112
 
37
113
  Next.js Edge runtime and the Pages Router are not supported. The package is
38
- ESM-only. See the [project README](https://github.com/marrrkkk/stacknext#readme),
39
- [getting started](https://github.com/marrrkkk/stacknext/blob/main/docs/getting-started.md)
40
- and [compatibility matrix](https://github.com/marrrkkk/stacknext/blob/main/docs/compatibility.md).
114
+ ESM-only. See the [project README](https://github.com/marrrkkk/stacknext#readme)
115
+ and [compatibility matrix](https://github.com/marrrkkk/stacknext/blob/main/apps/docs/compatibility.md).
41
116
 
42
117
  License: MIT.
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const CLI_VERSION = "0.11.0";
1
+ export declare const CLI_VERSION = "0.12.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const CLI_VERSION = '0.11.0';
1
+ export const CLI_VERSION = '0.12.0';
2
2
  //# sourceMappingURL=version.js.map
@@ -14,7 +14,7 @@ another.
14
14
 
15
15
  | Surface | Purpose | Command |
16
16
  | --- | --- | --- |
17
- | Local package documentation | Version-matched API reference | Ships in the seven documented packages |
17
+ | Local package documentation | Version-matched API reference | Ships in the ten documented packages |
18
18
  | Managed `AGENTS.md` block | Short project rules and documentation pointers | `stacknext init --agents` |
19
19
  | Agent Skill | Detailed evidence-first workflows | `stacknext skill install` |
20
20
  | MCP server | Read-only runtime evidence | `stacknext mcp` |
@@ -27,10 +27,11 @@ another.
27
27
 
28
28
  <!-- coderabbit-ai-generated-section:v1:5322f074c4bd22377289b52567028ebfbba0bcf2a8678742f28a42cbc3ec8e3c -->
29
29
 
30
- The seven packages listed in `DOCUMENTED_PACKAGES` ship `docs/`:
30
+ The ten packages listed in `DOCUMENTED_PACKAGES` ship `docs/`:
31
31
  `@stacknext/cli`, `@stacknext/next`, `@stacknext/core`,
32
- `@stacknext/regression`, `@stacknext/playwright`, `@stacknext/drizzle` and
33
- `@stacknext/prisma`. Start with the CLI package's
32
+ `@stacknext/diagnostics`, `@stacknext/regression`, `@stacknext/playwright`,
33
+ `@stacknext/drizzle`, `@stacknext/prisma`, `@stacknext/mcp` and
34
+ `@stacknext/dashboard`. Start with the CLI package's
34
35
  `docs/index.md`; the managed block below records its actual path, which may be
35
36
  at the workspace root. The generated [package index](packages.md) lists the
36
37
  documented packages and which docs to read.
package/docs/index.md CHANGED
@@ -68,11 +68,10 @@ node_modules/@stacknext/playwright/docs/index.md
68
68
 
69
69
  <!-- coderabbit-ai-generated-section:v1:a2a2d1bacf1a7101a5884977852db99861650a2a201f6dffdf985fa4ec246abe -->
70
70
 
71
- `@stacknext/core` and `@stacknext/regression` are installed through the CLI
72
- and ship documentation. In a pnpm workspace, locate their docs using the
73
- relative paths listed in `packages.md`. The CLI also installs
74
- `@stacknext/diagnostics`, `@stacknext/mcp` and `@stacknext/dashboard`, which
75
- do not currently ship `docs/` directories.
71
+ `@stacknext/core`, `@stacknext/diagnostics`, `@stacknext/regression`,
72
+ `@stacknext/mcp` and `@stacknext/dashboard` are installed through the CLI and
73
+ ship documentation. In a pnpm workspace, locate their docs using the relative
74
+ paths listed in `packages.md`.
76
75
 
77
76
  <!-- /coderabbit-ai-generated:v1 -->
78
77
 
@@ -84,10 +83,6 @@ its APIs are available.
84
83
 
85
84
  <!-- coderabbit-ai-generated:v1 -->
86
85
 
87
- <!-- coderabbit-ai-generated-section:v1:cce8643ce7fa90852e67d36250d2daa286bf00bf29c08506b2ca194409f5b5a8 -->
88
-
89
- <!-- coderabbit-ai-generated:v1 -->
90
-
91
86
  <!-- coderabbit-ai-generated-section:v1:4ccde9b676836098da0c0e0810b43c6306a967030d387f11f30aed3a2b950eab -->
92
87
 
93
88
  | Task | Read |
@@ -95,7 +90,7 @@ its APIs are available.
95
90
  | Install, configure or run StackNext | `cli`, `next` |
96
91
  | Change `instrumentation.ts` or manual spans | `next` |
97
92
  | Work with shared types, redaction, transport or snapshots | `core` |
98
- | Change or interpret diagnostic findings | CLI [commands](commands.md) |
93
+ | Change or interpret diagnostic findings | `diagnostics` and CLI [commands](commands.md) |
99
94
  | Work with Playwright capture, baselines or comparisons | `playwright`, `regression` |
100
95
  | Add Drizzle query evidence | `drizzle` |
101
96
  | Add Prisma query evidence | `prisma` |
@@ -103,8 +98,6 @@ its APIs are available.
103
98
 
104
99
  <!-- /coderabbit-ai-generated:v1 -->
105
100
 
106
- <!-- /coderabbit-ai-generated:v1 -->
107
-
108
101
  ## Optional and internal packages
109
102
 
110
103
  <!-- coderabbit-ai-generated:v1 -->
package/docs/packages.md CHANGED
@@ -17,16 +17,16 @@ directory to confirm the installed version.
17
17
 
18
18
  | Package | Version | Visibility | Role | Documentation |
19
19
  | --- | --- | --- | --- | --- |
20
- | `@stacknext/cli` | 0.11.0 | public | CLI, collector and dashboard host | `index.md` |
21
- | `@stacknext/next` | 0.11.0 | public | Next.js instrumentation | `../../next/docs/index.md` |
22
- | `@stacknext/core` | 0.11.0 | internal | Shared base package | `../../core/docs/index.md` |
23
- | `@stacknext/diagnostics` | 0.11.0 | internal | Diagnostic engine | `@stacknext/diagnostics/docs/index.md (resolve from CLI)` |
24
- | `@stacknext/regression` | 0.11.0 | internal | Regression data model | `../../regression/docs/index.md` |
25
- | `@stacknext/playwright` | 0.11.0 | public | Playwright fixture | `../../playwright/docs/index.md` |
26
- | `@stacknext/drizzle` | 0.11.0 | public | Database adapter | `../../drizzle/docs/index.md` |
27
- | `@stacknext/prisma` | 0.11.0 | public | Database adapter | `../../prisma/docs/index.md` |
28
- | `@stacknext/mcp` | 0.11.0 | internal | Read-only MCP server | `@stacknext/mcp/docs/index.md (resolve from CLI)` |
29
- | `@stacknext/dashboard` | 0.11.0 | internal | Static dashboard | `@stacknext/dashboard/docs/index.md (resolve from CLI)` |
20
+ | `@stacknext/cli` | 0.12.0 | public | CLI, collector and dashboard host | `index.md` |
21
+ | `@stacknext/next` | 0.12.0 | public | Next.js instrumentation | `../../next/docs/index.md` |
22
+ | `@stacknext/core` | 0.12.0 | internal | Shared base package | `../../core/docs/index.md` |
23
+ | `@stacknext/diagnostics` | 0.12.0 | internal | Diagnostic engine | `@stacknext/diagnostics/docs/index.md (resolve from CLI)` |
24
+ | `@stacknext/regression` | 0.12.0 | internal | Regression data model | `../../regression/docs/index.md` |
25
+ | `@stacknext/playwright` | 0.12.0 | public | Playwright fixture | `../../playwright/docs/index.md` |
26
+ | `@stacknext/drizzle` | 0.12.0 | public | Database adapter | `../../drizzle/docs/index.md` |
27
+ | `@stacknext/prisma` | 0.12.0 | public | Database adapter | `../../prisma/docs/index.md` |
28
+ | `@stacknext/mcp` | 0.12.0 | internal | Read-only MCP server | `@stacknext/mcp/docs/index.md (resolve from CLI)` |
29
+ | `@stacknext/dashboard` | 0.12.0 | internal | Static dashboard | `@stacknext/dashboard/docs/index.md (resolve from CLI)` |
30
30
 
31
31
  ## How to use this index
32
32
 
package/docs/skill.md CHANGED
@@ -67,7 +67,7 @@ along with package versions.
67
67
  `SKILL.md` follows the Agent Skills specification with YAML frontmatter and a
68
68
  concise body. Details live in `references/`. Keep it portable: no
69
69
  client-specific syntax in the canonical skill and no claim of support without a
70
- recorded test in `docs/agent-testing.md`.
70
+ recorded test in `docs/testing/agent-compatibility.md`.
71
71
 
72
72
  ## Client paths
73
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stacknext/cli",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Local-first runtime debugging, diagnostics and Playwright regression testing for Next.js",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23,11 +23,11 @@
23
23
  "./package.json": "./package.json"
24
24
  },
25
25
  "dependencies": {
26
- "@stacknext/core": "0.11.0",
27
- "@stacknext/dashboard": "0.11.0",
28
- "@stacknext/diagnostics": "0.11.0",
29
- "@stacknext/mcp": "0.11.0",
30
- "@stacknext/regression": "0.11.0",
26
+ "@stacknext/core": "0.12.0",
27
+ "@stacknext/dashboard": "0.12.0",
28
+ "@stacknext/diagnostics": "0.12.0",
29
+ "@stacknext/mcp": "0.12.0",
30
+ "@stacknext/regression": "0.12.0",
31
31
  "commander": "14.0.3",
32
32
  "zod": "4.6.7"
33
33
  },
@@ -4,7 +4,7 @@ description: Investigate Next.js App Router runtime behavior with StackNext's lo
4
4
  license: MIT
5
5
  compatibility: Next.js 15 or 16 App Router on the Node.js runtime, with a local StackNext collector. No cloud account, AI API key, or remote service is required.
6
6
  metadata:
7
- version: "0.11.0"
7
+ version: "0.12.0"
8
8
  author: StackNext
9
9
  ---
10
10
 
@@ -23,7 +23,7 @@ If the project is not set up yet:
23
23
  2. Run `pnpm exec stacknext init` in the app. Add `--agents` if the user wants a
24
24
  managed StackNext block in `AGENTS.md`.
25
25
  3. In a StackNext source checkout, run `pnpm install && pnpm build` first and
26
- see `docs/getting-started/quickstart.md`.
26
+ see the [quickstart](https://github.com/marrrkkk/stacknext/blob/main/apps/docs/getting-started/quickstart.md).
27
27
 
28
28
  Check the collector and instrumentation:
29
29
 
@@ -177,8 +177,8 @@ pnpm exec stacknext baseline save --run <run-id> --name main
177
177
  pnpm exec stacknext compare <baseline-id> <candidate-run-id>
178
178
  ```
179
179
 
180
- See [runtime regression testing](../../../docs/regression-testing.md) and
181
- [Playwright integration](../../../docs/playwright-integration.md).
180
+ See [runtime regression testing](https://github.com/marrrkkk/stacknext/blob/main/apps/docs/regression-testing.md)
181
+ and [Playwright integration](https://github.com/marrrkkk/stacknext/blob/main/apps/docs/playwright-integration.md).
182
182
 
183
183
  The three snapshot tools read frozen records from `.stacknext/snapshots`. They
184
184
  cannot save, import, rotate or delete a snapshot. Save one from the dashboard
@@ -55,8 +55,8 @@ immutable snapshots and are never deleted by these tools.
55
55
  "instrumentation": "connected",
56
56
  "instances": 1,
57
57
  "lastSeen": "2026-11-02T11:59:59.000Z",
58
- "sdkVersion": "0.6.1",
59
- "collectorVersion": "0.6.1"
58
+ "sdkVersion": "0.11.0",
59
+ "collectorVersion": "0.11.0"
60
60
  },
61
61
  "completeness": { "complete": true, "reasons": [] },
62
62
  "notes": []