laxy-verify 1.1.8 → 1.1.10

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
@@ -1,372 +1,150 @@
1
- # laxy-verify
2
-
3
- Frontend quality gate for AI-generated code. Build + Lighthouse verification with grade output (Gold/Silver/Bronze/Unverified).
4
-
5
- ```bash
6
- npx laxy-verify --init --run # 설정 생성 + 즉시 검증 (원커맨드)
7
- npx laxy-verify --init # Auto-detect framework, generate config
8
- npx laxy-verify . # Run verification
9
- npx laxy-verify login # Log in for Pro/Pro+ features
10
- npx laxy-verify --badge # Show shields.io badge
11
- npx laxy-verify --help # 도움말 보기
12
- ```
13
-
14
- ## Quick Start
15
-
16
- ### 1. Initialize
17
-
18
- ```bash
19
- cd your-project
20
- npx laxy-verify --init
21
- ```
22
-
23
- This generates `.laxy.yml` and `.github/workflows/laxy-verify.yml` automatically by detecting your framework and package manager.
24
-
25
- ### 2. Run Locally
26
-
27
- ```bash
28
- npx laxy-verify .
29
- ```
30
-
31
- ### 3. Add to CI
32
-
33
- Push the generated workflow file. Every PR gets a quality gate with grade comment and status check.
34
-
35
- ## Grades
36
-
37
- | Grade | Requirement |
38
- |-------|------------|
39
- | **Gold** | Build passes + all Lighthouse thresholds pass + all viewports pass (Pro+ only) |
40
- | **Silver** | Build passes + Lighthouse exceeds all thresholds |
41
- | **Bronze** | Build passes (Lighthouse not run or below threshold) |
42
- | **Unverified** | Build failed |
43
-
44
- `fail_on` controls the minimum acceptable grade. Default: `bronze`.
45
-
46
- > **Gold grade** is only achievable with a Pro+ account. It requires multi-viewport Lighthouse (desktop/tablet/mobile) to all pass in addition to the standard thresholds.
47
-
48
- ## Pro / Pro+ Features
49
-
50
- Log in to unlock paid plan features:
51
-
52
- ```bash
53
- npx laxy-verify login # Log in with your laxy-blue.vercel.app account
54
- npx laxy-verify whoami # Check current login status
55
- npx laxy-verify logout # Remove saved credentials
56
- ```
57
-
58
- | Feature | Free | Pro | Pro+ |
59
- |---------|------|-----|------|
60
- | Build verification | ✅ | ✅ | ✅ |
61
- | Lighthouse (1 run) | ✅ | ✅ | ✅ |
62
- | Silver grade | ✅ | ✅ | ✅ |
63
- | Bronze grade | | | |
64
- | Lighthouse (3 runs, averaged) | ❌ | ✅ | ✅ |
65
- | Gold grade eligibility | | | |
66
- | Verbose failure output | | | |
67
- | Multi-viewport Lighthouse (desktop/tablet/mobile) | | | |
68
- | Failure analysis report | | | |
69
- | Fast Lane (priority queue) | | | |
70
-
71
- ### Login
72
-
73
- ```bash
74
- npx laxy-verify login
75
- # Enter your email and password for laxy-blue.vercel.app
76
- ```
77
-
78
- Credentials are stored in `~/.laxy/credentials.json` (chmod 600). Token expires after 30 days.
79
-
80
- For CI environments, set the `LAXY_TOKEN` environment variable instead of logging in interactively:
81
-
82
- ```yaml
83
- env:
84
- LAXY_TOKEN: ${{ secrets.LAXY_TOKEN }}
85
- ```
86
-
87
- **LAXY_TOKEN을 GitHub Secrets에 등록하는 방법:**
88
-
89
- 1. 로컬에서 로그인: `npx laxy-verify login`
90
- 2. 토큰 복사: `cat ~/.laxy/credentials.json` → `"token"` 값을 복사
91
- 3. GitHub 리포 → Settings → Secrets and variables → Actions → **New repository secret**
92
- 4. Name: `LAXY_TOKEN`, Value: 복사한 토큰 붙여넣기
93
- 5. `--init` 으로 생성된 workflow 파일은 이미 `LAXY_TOKEN`을 포함합니다
94
-
95
- ### Multi-viewport (Pro+)
96
-
97
- ```bash
98
- npx laxy-verify --multi-viewport .
99
- ```
100
-
101
- Runs Lighthouse on three viewports: desktop, tablet (1024×768), and mobile. Gold grade requires all three to pass the configured thresholds.
102
-
103
- ## Configuration
104
-
105
- All fields optional in `.laxy.yml`:
106
-
107
- ```yaml
108
- framework: "auto" # auto | nextjs | vite | cra | sveltekit
109
- build_command: "" # default: auto-detected from package.json
110
- dev_command: "" # default: auto-detected
111
- package_manager: "auto" # auto | npm | pnpm | yarn | bun
112
- port: 3000 # dev server port
113
- build_timeout: 300 # seconds (default 5m)
114
- dev_timeout: 60 # seconds for dev server start (90 in CI mode)
115
- lighthouse_runs: 1 # @lhci/cli runs (CI mode auto-sets to 3)
116
-
117
- thresholds:
118
- performance: 70 # CI mode applies -10 offset (effective: 60)
119
- accessibility: 85
120
- seo: 80
121
- best_practices: 80
122
-
123
- fail_on: "bronze" # unverified | bronze | silver | gold
124
- # unverified = never fail (informational only)
125
- ```
126
-
127
- **fail_on vs build failure:** Build failure always produces grade `Unverified` and exit code 1, regardless of `fail_on`. `fail_on: unverified` means informational only (always exit 0).
128
-
129
- **--ci flag:** Lowers Performance threshold by 10, sets `lighthouse_runs=3` (when not explicitly set), and increases `dev_timeout` to 90s. Auto-set when `CI=true` env var exists.
130
-
131
- ## CLI Options
132
-
133
- ```
134
- npx laxy-verify [project-dir] Default: current directory
135
-
136
- Options:
137
- --format console | json Output format (default: console)
138
- --ci CI mode: -10 Performance, runs=3
139
- --config <path> Path to .laxy.yml
140
- --fail-on unverified|bronze|silver|gold Override fail_on
141
- --skip-lighthouse Build-only verification (max Bronze)
142
- --badge Show shields.io badge (reads .laxy-result.json)
143
- --init Generate .laxy.yml + GitHub workflow
144
- --multi-viewport Pro+: run Lighthouse on desktop/tablet/mobile
145
-
146
- Subcommands:
147
- login [email] Log in to unlock Pro/Pro+ features
148
- logout Remove saved credentials
149
- whoami Show current login status
150
- ```
151
-
152
- ## exit codes
153
-
154
- | Code | Meaning |
155
- |------|--------|
156
- | 0 | Grade meets or exceeds `fail_on` threshold |
157
- | 1 | Grade worse than `fail_on`, or build failed |
158
- | 2 | Configuration error (no package.json, invalid YAML, etc.) |
159
-
160
- ## GitHub Action
161
-
162
- ```yaml
163
- - uses: psungmin24/laxy-verify@v1
164
- with:
165
- github-token: ${{ secrets.GITHUB_TOKEN }}
166
- fail-on: silver # optional, default: bronze
167
- config: .laxy.yml # optional
168
- ```
169
-
170
- Posts a PR comment with grade and Lighthouse scores, and sets a commit status check.
171
-
172
- For Pro/Pro+ features in CI, add `LAXY_TOKEN` to your repository secrets:
173
-
174
- ```yaml
175
- - uses: psungmin24/laxy-verify@v1
176
- with:
177
- github-token: ${{ secrets.GITHUB_TOKEN }}
178
- fail-on: gold # Gold requires Pro+ account
179
- env:
180
- LAXY_TOKEN: ${{ secrets.LAXY_TOKEN }}
181
- ```
182
-
183
- ## Limitations (v1)
184
-
185
- - **Monorepos:** Not supported. Run `npx laxy-verify apps/web` for the app subdirectory.
186
- - **Lighthouse accuracy:** Scores are measured in dev mode (`npm run dev`). Production scores are typically higher.
187
- - **Fork PRs:** Comments and status checks are not posted on PRs from forks (GitHub security restriction).
188
- - **Yarn Berry:** May require manual `package_manager` configuration if using Corepack.
189
- - **Gold grade:** Requires Pro+ plan and `--multi-viewport` flag. All three viewports must pass Lighthouse thresholds.
190
-
191
- ## Expected CI Timing
192
-
193
- - Build: 15-30s
194
- - Dev server start: 5-20s
195
- - Lighthouse (1 run): ~15s
196
- - Lighthouse (3 runs CI): ~45s
197
- - Multi-viewport (Pro+, 3 viewports): ~60s
198
- - **Total: 35-95s per PR**
199
-
200
- ## .laxy-result.json
201
-
202
- Written after every run:
203
-
204
- ```json
205
- {
206
- "grade": "Silver",
207
- "timestamp": "2026-04-07T10:30:00Z",
208
- "build": { "success": true, "durationMs": 12300, "errors": [] },
209
- "lighthouse": { "performance": 87, "accessibility": 92, "seo": 88, "bestPractices": 90, "runs": 1 },
210
- "thresholds": { "performance": 70, "accessibility": 85, "seo": 80, "bestPractices": 80 },
211
- "ciMode": false,
212
- "framework": "nextjs",
213
- "exitCode": 0,
214
- "config_fail_on": "bronze"
215
- }
216
- ```
217
-
218
- Use `npx laxy-verify --badge` to output a shields.io badge markdown from this file.
219
-
220
- ## Badge
221
-
222
- ```bash
223
- npx laxy-verify --badge
224
- ```
225
-
226
- Output: `![Laxy Verify: Silver](https://img.shields.io/badge/laxy_verify-silver-brightgreen)`
227
-
228
- ## License
229
-
230
- MIT
231
-
232
-
233
- ## Quick Start
234
-
235
- ### 1. Initialize
236
-
237
- ```bash
238
- cd your-project
239
- npx laxy-verify --init
240
- ```
241
-
242
- This generates `.laxy.yml` and `.github/workflows/laxy-verify.yml` automatically by detecting your framework and package manager.
243
-
244
- ### 2. Run Locally
245
-
246
- ```bash
247
- npx laxy-verify .
248
- ```
249
-
250
- ### 3. Add to CI
251
-
252
- Push the generated workflow file. Every PR gets a quality gate with grade comment and status check.
253
-
254
- ## Grades
255
-
256
- | Grade | Requirement |
257
- |-------|------------|
258
- | **Silver** | Build passes + Lighthouse exceeds all thresholds |
259
- | **Bronze** | Build passes (Lighthouse not run or below threshold) |
260
- | **Unverified** | Build failed |
261
-
262
- `fail_on` controls the minimum acceptable grade. Default: `bronze`.
263
-
264
- ## Configuration
265
-
266
- All fields optional in `.laxy.yml`:
267
-
268
- ```yaml
269
- framework: "auto" # auto | nextjs | vite | cra | sveltekit
270
- build_command: "" # default: auto-detected from package.json
271
- dev_command: "" # default: auto-detected
272
- package_manager: "auto" # auto | npm | pnpm | yarn | bun
273
- port: 3000 # dev server port
274
- build_timeout: 300 # seconds (default 5m)
275
- dev_timeout: 60 # seconds for dev server start (90 in CI mode)
276
- lighthouse_runs: 1 # @lhci/cli runs (CI mode auto-sets to 3)
277
-
278
- thresholds:
279
- performance: 70 # CI mode applies -10 offset (effective: 60)
280
- accessibility: 85
281
- seo: 80
282
- best_practices: 80
283
-
284
- fail_on: "bronze" # unverified | bronze | silver | gold
285
- # unverified = never fail (informational only)
286
- ```
287
-
288
- **fail_on vs build failure:** Build failure always produces grade `Unverified` and exit code 1, regardless of `fail_on`. `fail_on: unverified` means informational only (always exit 0).
289
-
290
- **--ci flag:** Lowers Performance threshold by 10, sets `lighthouse_runs=3` (when not explicitly set), and increases `dev_timeout` to 90s. Auto-set when `CI=true` env var exists.
291
-
292
- ## CLI Options
293
-
294
- ```
295
- npx laxy-verify [project-dir] Default: current directory
296
-
297
- Options:
298
- --format console | json Output format (default: console)
299
- --ci CI mode: -10 Performance, runs=3
300
- --config <path> Path to .laxy.yml
301
- --fail-on unverified|bronze|silver|gold Override fail_on
302
- --skip-lighthouse Build-only verification (max Bronze)
303
- --badge Show shields.io badge (reads .laxy-result.json)
304
- --init Generate .laxy.yml + GitHub workflow
305
- ```
306
-
307
- ## exit codes
308
-
309
- | Code | Meaning |
310
- |------|--------|
311
- | 0 | Grade meets or exceeds `fail_on` threshold |
312
- | 1 | Grade worse than `fail_on`, or build failed |
313
- | 2 | Configuration error (no package.json, invalid YAML, etc.) |
314
-
315
- ## GitHub Action
316
-
317
- ```yaml
318
- - uses: psungmin24/laxy-verify@v1
319
- with:
320
- github-token: ${{ secrets.GITHUB_TOKEN }}
321
- fail-on: silver # optional, default: bronze
322
- config: .laxy.yml # optional
323
- ```
324
-
325
- Posts a PR comment with grade and Lighthouse scores, and sets a commit status check.
326
-
327
- ## Limitations (v1)
328
-
329
- - **Monorepos:** Not supported. Run `npx laxy-verify apps/web` for the app subdirectory.
330
- - **Lighthouse accuracy:** Scores are measured in dev mode (`npm run dev`). Production scores are typically higher.
331
- - **Fork PRs:** Comments and status checks are not posted on PRs from forks (GitHub security restriction).
332
- - **Yarn Berry:** May require manual `package_manager` configuration if using Corepack.
333
-
334
- ## Expected CI Timing
335
-
336
- - Build: 15-30s
337
- - Dev server start: 5-20s
338
- - Lighthouse (1 run): ~15s
339
- - Lighthouse (3 runs CI): ~45s
340
- - **Total: 35-95s per PR**
341
-
342
- ## .laxy-result.json
343
-
344
- Written after every run:
345
-
346
- ```json
347
- {
348
- "grade": "Silver",
349
- "timestamp": "2026-04-07T10:30:00Z",
350
- "build": { "success": true, "durationMs": 12300, "errors": [] },
351
- "lighthouse": { "performance": 87, "accessibility": 92, "seo": 88, "bestPractices": 90, "runs": 1 },
352
- "thresholds": { "performance": 70, "accessibility": 85, "seo": 80, "bestPractices": 80 },
353
- "ciMode": false,
354
- "framework": "nextjs",
355
- "exitCode": 0,
356
- "config_fail_on": "bronze"
357
- }
358
- ```
359
-
360
- Use `npx laxy-verify --badge` to output a shields.io badge markdown from this file.
361
-
362
- ## Badge
363
-
364
- ```bash
365
- npx laxy-verify --badge
366
- ```
367
-
368
- Output: `![Laxy Verify: Silver](https://img.shields.io/badge/laxy_verify-silver-brightgreen)`
369
-
370
- ## License
371
-
372
- MIT
1
+ # laxy-verify
2
+
3
+ CLI verification for frontend apps.
4
+
5
+ `laxy-verify` runs production build checks, Lighthouse, tiered verify E2E, and plan-gated verification features for Free, Pro, and Pro+ accounts.
6
+
7
+ ```bash
8
+ npx laxy-verify --init --run
9
+ npx laxy-verify .
10
+ npx laxy-verify login
11
+ npx laxy-verify whoami
12
+ npx laxy-verify --help
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ### 1. Initialize
18
+
19
+ ```bash
20
+ cd your-project
21
+ npx laxy-verify --init
22
+ ```
23
+
24
+ This generates `.laxy.yml` and a GitHub Actions workflow.
25
+
26
+ ### 2. Run locally
27
+
28
+ ```bash
29
+ npx laxy-verify .
30
+ ```
31
+
32
+ ### 3. Add to CI
33
+
34
+ Commit the generated workflow. Each PR gets a verification run, grade output, and optional GitHub reporting.
35
+
36
+ ## Verification Tiers
37
+
38
+ | Plan | Question it answers |
39
+ |------|---------------------|
40
+ | Free | Is this likely to break right now? |
41
+ | Pro | Is this strong enough to send to a client? |
42
+ | Pro+ | Can I call this release-ready with confidence? |
43
+
44
+ ## Grades
45
+
46
+ | Grade | Meaning |
47
+ |-------|---------|
48
+ | Gold | Build passed + E2E passed + Lighthouse passed + Pro+ viewport evidence passed |
49
+ | Silver | Build passed + E2E passed |
50
+ | Bronze | Build passed |
51
+ | Unverified | Build failed |
52
+
53
+ ## Paid Features
54
+
55
+ Log in with your Laxy account to unlock paid plan features.
56
+
57
+ ```bash
58
+ npx laxy-verify login
59
+ npx laxy-verify whoami
60
+ npx laxy-verify logout
61
+ ```
62
+
63
+ | Feature | Free | Pro | Pro+ |
64
+ |---------|------|-----|------|
65
+ | Build verification | Yes | Yes | Yes |
66
+ | Lighthouse | 1 run | 3 runs | 3 runs |
67
+ | Verify E2E | Smoke | Deeper client-send checks | Deeper client-send checks |
68
+ | Detailed report view | No | Yes | Yes |
69
+ | Report export | No | Yes | Yes |
70
+ | Multi-viewport verification | No | No | Yes |
71
+ | Visual diff | No | No | Yes |
72
+ | Failure analysis signals | No | No | Yes |
73
+
74
+ For CI, set `LAXY_TOKEN` instead of using interactive login.
75
+
76
+ ```yaml
77
+ env:
78
+ LAXY_TOKEN: ${{ secrets.LAXY_TOKEN }}
79
+ ```
80
+
81
+ ## Configuration
82
+
83
+ All fields are optional in `.laxy.yml`.
84
+
85
+ ```yaml
86
+ framework: "auto"
87
+ build_command: ""
88
+ dev_command: ""
89
+ package_manager: "auto"
90
+ port: 3000
91
+ build_timeout: 300
92
+ dev_timeout: 60
93
+ lighthouse_runs: 1
94
+
95
+ thresholds:
96
+ performance: 70
97
+ accessibility: 85
98
+ seo: 80
99
+ best_practices: 80
100
+
101
+ fail_on: "bronze"
102
+ ```
103
+
104
+ ## CLI Options
105
+
106
+ ```text
107
+ npx laxy-verify [project-dir]
108
+
109
+ Options:
110
+ --format console|json
111
+ --ci
112
+ --config <path>
113
+ --fail-on unverified|bronze|silver|gold
114
+ --skip-lighthouse
115
+ --badge
116
+ --init
117
+ --multi-viewport
118
+ --help
119
+
120
+ Subcommands:
121
+ login [email]
122
+ logout
123
+ whoami
124
+ ```
125
+
126
+ ## Result File
127
+
128
+ Each run writes `.laxy-result.json`.
129
+
130
+ ```json
131
+ {
132
+ "grade": "Silver",
133
+ "timestamp": "2026-04-09T09:00:00Z",
134
+ "build": { "success": true, "durationMs": 12000, "errors": [] },
135
+ "e2e": { "passed": 4, "failed": 0, "total": 4, "results": [] },
136
+ "lighthouse": { "performance": 82, "accessibility": 94, "seo": 90, "bestPractices": 92, "runs": 3 },
137
+ "exitCode": 0,
138
+ "_plan": "pro"
139
+ }
140
+ ```
141
+
142
+ ## Limitations
143
+
144
+ - Monorepos require targeting the app subdirectory explicitly.
145
+ - Dev-server-based Lighthouse can differ from production hosting.
146
+ - Pro+ visual diff and viewport checks increase runtime.
147
+
148
+ ## License
149
+
150
+ MIT