@inspecto-dev/cli 0.2.0-alpha.5 → 0.3.0-alpha.1
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/.turbo/turbo-build.log +19 -20
- package/CHANGELOG.md +22 -0
- package/README.md +93 -11
- package/bin/inspecto.js +5 -1
- package/dist/bin.d.ts +5 -1
- package/dist/bin.js +530 -49
- package/dist/chunk-FZS2TLXQ.js +3140 -0
- package/dist/index.d.ts +233 -2
- package/dist/index.js +17 -3
- package/package.json +3 -2
- package/src/bin.ts +286 -66
- package/src/commands/apply.ts +118 -0
- package/src/commands/detect.ts +59 -0
- package/src/commands/doctor.ts +225 -72
- package/src/commands/init.ts +143 -183
- package/src/commands/integration-install.ts +452 -0
- package/src/commands/onboard.ts +50 -0
- package/src/commands/plan.ts +41 -0
- package/src/detect/build-tool.ts +107 -3
- package/src/index.ts +17 -2
- package/src/inject/ast-injector.ts +17 -6
- package/src/inject/extension.ts +40 -22
- package/src/inject/gitignore.ts +10 -3
- package/src/instructions.ts +60 -46
- package/src/onboarding/apply.ts +364 -0
- package/src/onboarding/context.ts +36 -0
- package/src/onboarding/planner.ts +284 -0
- package/src/onboarding/session.ts +434 -0
- package/src/onboarding/target-resolution.ts +116 -0
- package/src/prompts.ts +54 -11
- package/src/types.ts +184 -0
- package/src/utils/fs.ts +2 -1
- package/src/utils/logger.ts +9 -0
- package/src/utils/output.ts +40 -0
- package/tests/apply.test.ts +583 -0
- package/tests/ast-injector.test.ts +50 -0
- package/tests/build-tool.test.ts +3 -5
- package/tests/detect.test.ts +94 -0
- package/tests/doctor.test.ts +224 -0
- package/tests/init.test.ts +364 -0
- package/tests/install-wrapper.test.ts +76 -0
- package/tests/instructions.test.ts +61 -0
- package/tests/integration-install.test.ts +294 -0
- package/tests/logger.test.ts +100 -0
- package/tests/onboard.test.ts +258 -0
- package/tests/plan.test.ts +713 -0
- package/tests/workspace-build-tool.test.ts +75 -0
- package/.turbo/turbo-test.log +0 -16
- package/dist/chunk-MIHQGC3L.js +0 -1720
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
DTS Build
|
|
18
|
-
DTS
|
|
19
|
-
DTS dist/
|
|
20
|
-
DTS dist/index.d.ts 1.18 KB
|
|
1
|
+
|
|
2
|
+
> @inspecto-dev/cli@0.3.0-alpha.1 build /Users/tangjie/hugo.felix/inspecto/packages/cli
|
|
3
|
+
> tsup
|
|
4
|
+
|
|
5
|
+
CLI Building entry: src/bin.ts, src/index.ts
|
|
6
|
+
CLI Using tsconfig: tsconfig.json
|
|
7
|
+
CLI tsup v8.5.1
|
|
8
|
+
CLI Using tsup config: /Users/tangjie/hugo.felix/inspecto/packages/cli/tsup.config.ts
|
|
9
|
+
CLI Target: node18
|
|
10
|
+
CLI Cleaning output folder
|
|
11
|
+
ESM Build start
|
|
12
|
+
ESM dist/index.js 319.00 B
|
|
13
|
+
ESM dist/bin.js 20.37 KB
|
|
14
|
+
ESM dist/chunk-FZS2TLXQ.js 103.35 KB
|
|
15
|
+
ESM ⚡️ Build success in 61ms
|
|
16
|
+
DTS Build start
|
|
17
|
+
DTS ⚡️ Build success in 5204ms
|
|
18
|
+
DTS dist/bin.d.ts 185.00 B
|
|
19
|
+
DTS dist/index.d.ts 7.79 KB
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @inspecto-dev/cli
|
|
2
2
|
|
|
3
|
+
## 0.3.0-alpha.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Prepare the first `0.3.0-alpha.1` release line for Inspecto's browser-first workflow.
|
|
8
|
+
- unify onboarding around assistant-first setup and the single-entry `inspecto onboard --json` contract
|
|
9
|
+
- stabilize the browser UX across `Inspect`, `Annotate`, and `Alt + Click` quick jump
|
|
10
|
+
- tighten prompt and settings schema boundaries and keep evidence toggles built-in
|
|
11
|
+
- refresh README, website, onboarding docs, and playgrounds to match the shipped workflow
|
|
12
|
+
- refactor large runtime modules without intended behavior changes
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @inspecto-dev/types@0.3.0-alpha.1
|
|
18
|
+
|
|
19
|
+
## 0.2.0-alpha.6
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- release alpha test version
|
|
24
|
+
|
|
3
25
|
## 0.2.0-alpha.5
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
# @inspecto-dev/cli
|
|
2
2
|
|
|
3
|
-
The official command-line interface for Inspecto. This tool automates the process of
|
|
3
|
+
The official command-line interface for Inspecto. This tool automates the process of detecting, planning, applying, and maintaining the Inspecto setup within your project.
|
|
4
|
+
|
|
5
|
+
## Onboarding Flow
|
|
6
|
+
|
|
7
|
+
For most users, the preferred setup path is assistant-first onboarding via the integrations documented in:
|
|
8
|
+
`packages/docs/integrations/onboarding-skills.md`
|
|
9
|
+
|
|
10
|
+
Install those assistant integration assets with:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx @inspecto-dev/cli integrations install <assistant>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Supported assistants currently include `codex`, `claude-code`, `copilot`, `cursor`, `gemini`, `trae`, and `coco`.
|
|
17
|
+
|
|
18
|
+
Inspect available integration targets with:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx @inspecto-dev/cli integrations list
|
|
22
|
+
npx @inspecto-dev/cli integrations install codex
|
|
23
|
+
npx @inspecto-dev/cli integrations path <assistant>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Use `inspecto init` when you want a guided setup directly in the terminal, or when the assistant path is unavailable.
|
|
27
|
+
|
|
28
|
+
If you are building your own agent/runtime integration, the machine-readable flow is:
|
|
29
|
+
|
|
30
|
+
1. `inspecto detect --json`
|
|
31
|
+
2. `inspecto plan --json`
|
|
32
|
+
3. `inspecto apply --json`
|
|
33
|
+
4. `inspecto doctor --json`
|
|
34
|
+
|
|
35
|
+
See the public onboarding contract for response shapes and field semantics:
|
|
36
|
+
`packages/docs/integrations/onboarding-contract.md`
|
|
4
37
|
|
|
5
38
|
## Installation
|
|
6
39
|
|
|
@@ -18,20 +51,53 @@ npm install -D @inspecto-dev/cli
|
|
|
18
51
|
|
|
19
52
|
## Commands
|
|
20
53
|
|
|
21
|
-
### `inspecto
|
|
54
|
+
### `inspecto detect`
|
|
22
55
|
|
|
23
|
-
|
|
56
|
+
Detects whether the current project can be onboarded automatically.
|
|
24
57
|
|
|
25
58
|
**Features:**
|
|
26
59
|
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
60
|
+
- Detects the package manager, build tool/framework, IDE, and available AI tools.
|
|
61
|
+
- Produces structured output for agent-driven setup flows.
|
|
62
|
+
|
|
63
|
+
### `inspecto plan`
|
|
64
|
+
|
|
65
|
+
Previews the onboarding plan for the current project.
|
|
66
|
+
|
|
67
|
+
**Features:**
|
|
68
|
+
|
|
69
|
+
- Summarizes the proposed setup strategy and actions.
|
|
70
|
+
- Produces structured output that agents can inspect before applying changes.
|
|
71
|
+
|
|
72
|
+
### `inspecto apply [--json]`
|
|
73
|
+
|
|
74
|
+
Applies the onboarding plan to the current project. Use `--json` when the command is driven by an agent/runtime integration.
|
|
75
|
+
|
|
76
|
+
**Features:**
|
|
77
|
+
|
|
78
|
+
- Installs the required `@inspecto-dev/plugin` dependencies.
|
|
79
|
+
- Injects the plugin into supported build configurations.
|
|
80
|
+
- Installs or configures the selected IDE extension when needed.
|
|
81
|
+
- Writes `.inspecto/settings.local.json` and updates `.gitignore` when appropriate.
|
|
82
|
+
|
|
83
|
+
### `inspecto integrations`
|
|
84
|
+
|
|
85
|
+
Manages assistant integration assets for the current project.
|
|
86
|
+
|
|
87
|
+
**Subcommands:**
|
|
88
|
+
|
|
89
|
+
- `inspecto integrations list` prints the supported assistant targets and their preferred install surfaces.
|
|
90
|
+
- `inspecto integrations path <assistant>` prints the concrete files that a selected variant will create.
|
|
91
|
+
- `inspecto integrations install <assistant>` installs the integration assets for the selected assistant.
|
|
92
|
+
|
|
93
|
+
Examples:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
inspecto integrations install codex
|
|
97
|
+
inspecto integrations path codex
|
|
98
|
+
inspecto integrations install claude-code --scope project
|
|
99
|
+
inspecto integrations install cursor --mode rules
|
|
100
|
+
```
|
|
35
101
|
|
|
36
102
|
### `inspecto doctor`
|
|
37
103
|
|
|
@@ -43,6 +109,22 @@ A diagnostic command to verify your current environment.
|
|
|
43
109
|
- Verifies if the IDE is supported.
|
|
44
110
|
- Scans for available AI tools (both CLI and Plugin modes).
|
|
45
111
|
- Validates the current Inspecto installation and configuration.
|
|
112
|
+
- Supports `--json` for agent-friendly diagnostics.
|
|
113
|
+
|
|
114
|
+
### `inspecto init`
|
|
115
|
+
|
|
116
|
+
The guided/manual fallback for scaffolding Inspecto into a project. It performs a comprehensive environmental analysis and automatically configures Inspecto in one step.
|
|
117
|
+
|
|
118
|
+
**Features:**
|
|
119
|
+
|
|
120
|
+
- **Package Manager Detection:** Auto-detects `npm`, `pnpm`, `yarn`, or `bun`.
|
|
121
|
+
- **Build Tool / Framework Detection:** Detects Vite, Webpack, Rspack, Rsbuild, and others. Supports legacy versions (e.g., `@rspack/cli < 0.4.0`).
|
|
122
|
+
- **IDE Detection:** Prioritizes environment variables, then falls back to directory structures to accurately detect VS Code, Cursor, Trae, Windsurf, or WebStorm.
|
|
123
|
+
- **AI Tool Detection:** Scans for both CLI-based tools (Claude, Coco, CodeX, Gemini) and IDE Plugins (GitHub Copilot, Claude Code, Gemini, CodeX).
|
|
124
|
+
- **Interactive Prompts:** If multiple build configurations or AI tools are detected, it presents an interactive prompt for you to select your preferred configuration.
|
|
125
|
+
- **AST Injection:** Safely injects the `@inspecto-dev/plugin` into your Vite configuration file (`vite.config.ts`, etc.) using AST transformation, preventing duplicate injections. Manual setup is required for other build tools.
|
|
126
|
+
- **IDE Extension Installation:** Uses a robust 4-level waterfall strategy to install the necessary IDE extension.
|
|
127
|
+
- **Configuration Scaffolding:** Generates the `.inspecto/settings.local.json` file tailored to your detected or selected AI tools, and updates `.gitignore` to prevent committing local settings.
|
|
46
128
|
|
|
47
129
|
### `inspecto teardown`
|
|
48
130
|
|
package/bin/inspecto.js
CHANGED