afterburn-cli 1.0.0 → 1.0.2

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.
Files changed (39) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +287 -281
  3. package/dist/ai/gemini-client.js +13 -6
  4. package/dist/ai/gemini-client.js.map +1 -1
  5. package/dist/analysis/error-analyzer.js +23 -23
  6. package/dist/analysis/source-mapper.js +10 -4
  7. package/dist/analysis/source-mapper.js.map +1 -1
  8. package/dist/analysis/ui-auditor.js +21 -21
  9. package/dist/cli/commander-cli.js +4 -2
  10. package/dist/cli/commander-cli.js.map +1 -1
  11. package/dist/cli/first-run.js +11 -0
  12. package/dist/cli/first-run.js.map +1 -1
  13. package/dist/core/engine.js +20 -5
  14. package/dist/core/engine.js.map +1 -1
  15. package/dist/discovery/element-mapper.js +24 -6
  16. package/dist/discovery/element-mapper.js.map +1 -1
  17. package/dist/execution/step-handlers.js +233 -3
  18. package/dist/execution/step-handlers.js.map +1 -1
  19. package/dist/execution/workflow-executor.js +3 -1
  20. package/dist/execution/workflow-executor.js.map +1 -1
  21. package/dist/mcp/server.js +3 -1
  22. package/dist/mcp/server.js.map +1 -1
  23. package/dist/planning/heuristic-planner.js +58 -17
  24. package/dist/planning/heuristic-planner.js.map +1 -1
  25. package/dist/planning/workflow-planner.js +27 -27
  26. package/dist/reports/html-generator.js +5 -2
  27. package/dist/reports/html-generator.js.map +1 -1
  28. package/dist/reports/markdown-generator.js +113 -94
  29. package/dist/reports/markdown-generator.js.map +1 -1
  30. package/dist/types/discovery.d.ts +3 -0
  31. package/dist/utils/sanitizer.d.ts +5 -0
  32. package/dist/utils/sanitizer.js +17 -1
  33. package/dist/utils/sanitizer.js.map +1 -1
  34. package/dist/version.d.ts +1 -0
  35. package/dist/version.js +37 -0
  36. package/dist/version.js.map +1 -0
  37. package/package.json +93 -86
  38. package/templates/report.hbs +203 -202
  39. package/templates/styles/report.css +607 -607
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Afterburn Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Afterburn Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,281 +1,287 @@
1
- # Afterburn
2
-
3
- [![npm version](https://img.shields.io/npm/v/afterburn-cli)](https://www.npmjs.com/package/afterburn-cli)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
- [![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org/)
6
- [![Tests](https://img.shields.io/badge/tests-193%20passing-brightgreen)]()
7
- [![Built at BridgeMind Vibeathon 2026](https://img.shields.io/badge/Built%20at-BridgeMind%20Vibeathon%202026-blueviolet)]()
8
-
9
- **One command finds every bug on your website.** Zero config. Generates a report your AI coding tool can use to fix them automatically.
10
-
11
- ```bash
12
- npx afterburn-cli https://your-site.com
13
- ```
14
-
15
- ```
16
- Afterburn v1.0.0
17
-
18
- ✔ Checking browser...
19
- ✔ Crawling site...
20
- Testing workflows...
21
- ✔ Analyzing results...
22
- Generating reports...
23
-
24
- Health: 62/100 — 20 issues found (0 high, 17 medium, 3 low)
25
-
26
- Reports saved:
27
- HTML: afterburn-reports/1770564079516/report.html
28
- Markdown: afterburn-reports/1770564079516/report.md
29
- ```
30
-
31
- Afterburn crawls your site, fills out forms, clicks every button, and tells you what's broken -- in plain English for you, in structured Markdown for Claude, Cursor, or ChatGPT to auto-fix.
32
-
33
- > **The AI workflow:** Afterburn finds the bugs. You paste the Markdown report into Claude, Cursor, or ChatGPT. It reads the reproduction steps and fixes them. You re-scan. Done.
34
-
35
- ## The AI-readable report (the killer feature)
36
-
37
- Every scan generates **two reports**:
38
-
39
- 1. **HTML Report** -- A health score and prioritized bug list in plain English. For you to read.
40
- 2. **Markdown Report** -- Structured with reproduction steps and fix suggestions. Feed it directly to Claude, ChatGPT, or Cursor and your AI coding tool can **fix the bugs automatically**.
41
-
42
- ```
43
- You: "Here's my Afterburn report. Fix these bugs."
44
- AI: *reads structured report, fixes 12 issues across 4 files*
45
- ```
46
-
47
- This is the workflow: Afterburn finds the bugs, your AI fixes them. Zero manual debugging.
48
-
49
- ### What the AI report looks like
50
-
51
- The Markdown report is structured so AI tools can parse and act on it:
52
-
53
- ```markdown
54
- ## Issues (Prioritized)
55
-
56
- | # | Priority | Category | Summary | Location |
57
- |---|----------|----------|---------|----------|
58
- | 1 | HIGH | Workflow Error | Form "form#contact-form" submission isn't working | /contact |
59
- | 2 | MEDIUM | Dead Button | Button "Get Started Free" doesn't do anything when clicked | / |
60
- | 3 | MEDIUM | Console Error | An image failed to load | /images/icon-deploy.png |
61
- ```
62
-
63
- Each issue includes a category, priority, plain-English summary, and location. Paste this into Claude or Cursor and it knows exactly what to fix.
64
-
65
- ### Sample reports
66
-
67
- See what Afterburn produces when scanning a real app with 20+ intentional defects:
68
-
69
- ![Afterburn HTML Report](assets/report-preview.png)
70
-
71
- - [Sample HTML report](demo-cache/report.html) -- Health score, prioritized issues, fix suggestions
72
- - [Sample Markdown report](demo-cache/report.md) -- Structured for AI coding tools
73
- - [Terminal output](demo-cache/terminal-output.txt) -- What you see in the CLI
74
-
75
- ## What it catches
76
-
77
- - Broken forms that don't submit
78
- - Dead buttons that do nothing when clicked
79
- - JavaScript errors and console crashes
80
- - HTTP errors (404s, 500s, failed API calls)
81
- - Broken images and missing assets
82
- - Accessibility violations (WCAG 2.1 AA via axe-core)
83
- - Slow page loads and poor performance scores
84
-
85
- ## Quick start
86
-
87
- ```bash
88
- # No install needed -- run directly
89
- npx afterburn-cli https://your-site.com
90
-
91
- # Or install globally
92
- npm install -g afterburn-cli
93
- ```
94
-
95
- Afterburn downloads a browser automatically on first run (~200MB, one-time).
96
-
97
- ## Try it now
98
-
99
- Scan any public website -- no signup, no API key, no config:
100
-
101
- ```bash
102
- npx afterburn-cli https://en.wikipedia.org/wiki/Main_Page
103
- ```
104
-
105
- Or point it at your own site to see what's broken.
106
-
107
- ### Common options
108
-
109
- ```bash
110
- # Test login flows
111
- npx afterburn-cli https://your-site.com --email test@example.com --password mypass123
112
-
113
- # Hint at specific workflows
114
- npx afterburn-cli https://your-site.com --flows "signup, checkout, profile edit"
115
-
116
- # Map bugs to your source code (file:line)
117
- npx afterburn-cli https://your-site.com --source ./src
118
-
119
- # Watch the browser do its thing
120
- npx afterburn-cli https://your-site.com --no-headless
121
- ```
122
-
123
- Reports are saved to `./afterburn-reports/{timestamp}/`.
124
-
125
- ## How it works
126
-
127
- ```
128
- Your URL --> Crawl all pages --> Plan test workflows --> Execute tests --> Analyze failures --> Generate reports
129
- ```
130
-
131
- 1. **Crawl** -- Discovers all pages, forms, buttons, and links. Handles SPAs (React, Next.js, Vue, Angular, Svelte).
132
- 2. **Plan** -- AI generates smart test workflows (or heuristic fallback with no API key).
133
- 3. **Execute** -- Runs each workflow in a real browser: fills forms, clicks buttons, captures screenshots.
134
- 4. **Analyze** -- Diagnoses root causes. AI vision analysis with Gemini, or pattern matching without.
135
- 5. **Report** -- Health score (0-100) and prioritized fix list in HTML + Markdown.
136
-
137
- ### AI is optional
138
-
139
- Afterburn works **without any API keys**. Set `GEMINI_API_KEY` for smarter test planning and AI-powered diagnosis, but the core tool runs a full test suite either way.
140
-
141
- ```bash
142
- # Optional: enable AI-powered planning and diagnosis
143
- export GEMINI_API_KEY=your-key-here
144
- ```
145
-
146
- ## How is this different?
147
-
148
- | Feature | Afterburn | Lighthouse | axe-core | Manual testing |
149
- |---------|-----------|------------|----------|----------------|
150
- | Zero config (no test writing) | Yes | Yes | Needs integration | Yes |
151
- | Crawls entire site | Yes | Single page | No | Tedious |
152
- | Form filling and submission | Yes | No | No | Manual |
153
- | Dead button detection | Yes | No | No | If you notice |
154
- | Plain English reports | Yes | Partial | No | N/A |
155
- | AI-ready report for auto-fix | Yes | No | No | No |
156
- | Free and open source | Yes | Yes | Yes | Free (your time) |
157
- | CI/CD integration | GitHub Action | CI plugin | CI plugin | No |
158
-
159
- ## Health score
160
-
161
- The health score (0-100) is weighted:
162
-
163
- | Category | Weight | What it measures |
164
- |----------|--------|------------------|
165
- | Workflows | 40% | Did test workflows complete without errors? |
166
- | Errors | 30% | HTTP errors, console crashes, broken resources |
167
- | Accessibility | 20% | WCAG 2.1 AA violations |
168
- | Performance | 10% | Page load times, LCP scores |
169
-
170
- ## Pre-flight check
171
-
172
- ```bash
173
- npx afterburn-cli doctor
174
- ```
175
-
176
- Checks Node.js version, browser installation, API key, and network connectivity.
177
-
178
- ## Testing
179
-
180
- ```bash
181
- # Build CLI + bundled GitHub Action artifacts
182
- npm run build:release
183
-
184
- # Fast default lane (unit tests)
185
- npm test
186
-
187
- # Deterministic end-to-end lane (local fixture server)
188
- npm run test:e2e
189
-
190
- # Unit coverage gate with thresholds
191
- npm run test:coverage
192
-
193
- # Optional real-internet smoke test (only runs when URL is provided)
194
- AFTERBURN_EXTERNAL_SMOKE_URL=https://example.com npm run test:smoke:external
195
- ```
196
-
197
- ## CLI reference
198
-
199
- ```
200
- Usage: afterburn [options] [command] <url>
201
-
202
- Automated testing for vibe-coded websites
203
-
204
- Arguments:
205
- url URL to test
206
-
207
- Options:
208
- -V, --version output the version number
209
- --source <path> Source code directory for pinpointing bugs
210
- --email <email> Login email (or set AFTERBURN_EMAIL env var)
211
- --password <password> Login password (tip: use AFTERBURN_PASSWORD env var
212
- to avoid shell history exposure)
213
- --output-dir <path> Custom output directory
214
- (default: ./afterburn-reports/{timestamp})
215
- --flows <hints> Comma-separated workflow hints (e.g., "signup, checkout")
216
- --max-pages <n> Max pages to crawl (default: 50, max: 500)
217
- --no-headless Show browser window (useful for debugging)
218
- --verbose Show detailed progress output
219
- -h, --help display help for command
220
-
221
- Commands:
222
- doctor Check if your environment is ready to run Afterburn
223
- ```
224
-
225
- ## Known limitations
226
-
227
- - **Visual analysis requires GEMINI_API_KEY**. Without it, UI analysis relies on axe-core plus pattern matching.
228
- - **SPA support is experimental**. Complex client-side routing may not be fully exercised.
229
- - **Desktop viewport only**. Tests run at 1920x1080. Mobile testing planned for v2.
230
-
231
- ## Three interfaces
232
-
233
- ### CLI
234
-
235
- ```bash
236
- npx afterburn-cli https://your-site.com
237
- ```
238
-
239
- ### GitHub Action
240
-
241
- ```yaml
242
- name: Afterburn
243
- on: [pull_request]
244
-
245
- jobs:
246
- test:
247
- runs-on: ubuntu-latest
248
- steps:
249
- - uses: actions/checkout@v4
250
- - uses: gods-strongest-vibecoder/afterburn@main
251
- with:
252
- url: https://your-staging-site.com
253
- fail-on: high
254
- ```
255
-
256
- Posts a summary comment on your PR and uploads reports as artifacts.
257
-
258
- ### MCP Server (for AI coding assistants)
259
-
260
- ```json
261
- {
262
- "mcpServers": {
263
- "afterburn": {
264
- "command": "npx",
265
- "args": ["afterburn-mcp"]
266
- }
267
- }
268
- }
269
- ```
270
-
271
- Exposes a `scan_website` tool that returns structured results your AI assistant can act on.
272
-
273
- ## Tech stack
274
-
275
- [Playwright](https://playwright.dev/) (browser automation) | [Gemini 2.5 Flash](https://ai.google.dev/) (AI vision, optional) | [axe-core](https://github.com/dequelabs/axe-core) (accessibility) | [Commander.js](https://github.com/tj/commander.js) (CLI) | [Handlebars](https://handlebarsjs.com/) (HTML reports) | [ts-morph](https://github.com/dsherret/ts-morph) (source mapping) | [sharp](https://sharp.pixelplumbing.com/) (screenshot compression)
276
-
277
- ## License
278
-
279
- MIT
280
-
281
- Built for the [BridgeMind Vibeathon 2026](https://bridgemind.dev).
1
+ # Afterburn
2
+
3
+ [![npm version](https://img.shields.io/npm/v/afterburn-cli)](https://www.npmjs.com/package/afterburn-cli)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org/)
6
+ [![CI](https://github.com/gods-strongest-vibecoder/afterburn/actions/workflows/ci.yml/badge.svg)](https://github.com/gods-strongest-vibecoder/afterburn/actions/workflows/ci.yml)
7
+ [![Built at BridgeMind Vibeathon 2026](https://img.shields.io/badge/Built%20at-BridgeMind%20Vibeathon%202026-blueviolet)]()
8
+
9
+ <p align="center">
10
+ <img src="demo/afterburn-demo.gif" alt="Afterburn scanning a website and finding 20 issues in seconds" width="720">
11
+ </p>
12
+
13
+ **One command finds every bug on your website.** Zero config. Generates a report your AI coding tool can use to fix them automatically.
14
+
15
+ ```bash
16
+ npx afterburn-cli https://your-site.com
17
+ ```
18
+
19
+ ```
20
+ Afterburn v1.0.2
21
+
22
+ [ok] Checking browser...
23
+ [ok] Crawling site...
24
+ [ok] Testing workflows...
25
+ [ok] Analyzing results...
26
+ [ok] Generating reports...
27
+
28
+ Health: 62/100 - 20 issues found (0 high, 17 medium, 3 low)
29
+
30
+ Reports saved:
31
+ HTML: afterburn-reports/1770564079516/report.html
32
+ Markdown: afterburn-reports/1770564079516/report.md
33
+ ```
34
+
35
+ Afterburn crawls your site, fills out forms, clicks every button, and tells you what's broken -- in plain English for you, in structured Markdown for Claude, Cursor, or ChatGPT to auto-fix.
36
+
37
+ > **The AI workflow:** Afterburn finds the bugs. You paste the Markdown report into Claude, Cursor, or ChatGPT. It reads the reproduction steps and fixes them. You re-scan. Done.
38
+
39
+ ## The AI-readable report (the killer feature)
40
+
41
+ Every scan generates **two reports**:
42
+
43
+ 1. **HTML Report** -- A health score and prioritized bug list in plain English. For you to read.
44
+ 2. **Markdown Report** -- Structured with reproduction steps and fix suggestions. Feed it directly to Claude, ChatGPT, or Cursor and your AI coding tool can **fix the bugs automatically**.
45
+
46
+ ```
47
+ You: "Here's my Afterburn report. Fix these bugs."
48
+ AI: *reads structured report, fixes 12 issues across 4 files*
49
+ ```
50
+
51
+ This is the workflow: Afterburn finds the bugs, your AI fixes them. Zero manual debugging.
52
+
53
+ ### What the AI report looks like
54
+
55
+ The Markdown report is structured so AI tools can parse and act on it:
56
+
57
+ ```markdown
58
+ ## Issues (Prioritized)
59
+
60
+ | # | Priority | Category | Summary | Location |
61
+ |---|----------|----------|---------|----------|
62
+ | 1 | HIGH | Workflow Error | Form "form#contact-form" submission isn't working | /contact |
63
+ | 2 | MEDIUM | Dead Button | Button "Get Started Free" doesn't do anything when clicked | / |
64
+ | 3 | MEDIUM | Console Error | An image failed to load | /images/icon-deploy.png |
65
+ ```
66
+
67
+ Each issue includes a category, priority, plain-English summary, and location. Paste this into Claude or Cursor and it knows exactly what to fix.
68
+
69
+ ### Sample reports
70
+
71
+ See what Afterburn produces when scanning a real app with 20+ intentional defects:
72
+
73
+ ![Afterburn HTML Report](assets/report-preview.png)
74
+
75
+ - [Sample HTML report](demo-cache/report.html) -- Health score, prioritized issues, fix suggestions
76
+ - [Sample Markdown report](demo-cache/report.md) -- Structured for AI coding tools
77
+ - [Terminal output](demo-cache/terminal-output.txt) -- What you see in the CLI
78
+
79
+ ## What it catches
80
+
81
+ - Broken forms that don't submit
82
+ - Dead buttons that do nothing when clicked
83
+ - JavaScript errors and console crashes
84
+ - HTTP errors (404s, 500s, failed API calls)
85
+ - Broken images and missing assets
86
+ - Accessibility violations (WCAG 2.1 AA via axe-core)
87
+ - Slow page loads and poor performance scores
88
+
89
+ ## Quick start
90
+
91
+ ```bash
92
+ # No install needed -- run directly
93
+ npx afterburn-cli https://your-site.com
94
+
95
+ # Or install globally
96
+ npm install -g afterburn-cli
97
+ ```
98
+
99
+ Afterburn downloads a browser automatically on first run (~200MB, one-time).
100
+
101
+ ## Try it now
102
+
103
+ Scan any public website -- no signup, no API key, no config:
104
+
105
+ ```bash
106
+ npx afterburn-cli https://en.wikipedia.org/wiki/Main_Page
107
+ ```
108
+
109
+ Or point it at your own site to see what's broken.
110
+
111
+ ### Common options
112
+
113
+ ```bash
114
+ # Test login flows
115
+ npx afterburn-cli https://your-site.com --email test@example.com --password mypass123
116
+
117
+ # Hint at specific workflows
118
+ npx afterburn-cli https://your-site.com --flows "signup, checkout, profile edit"
119
+
120
+ # Map bugs to your source code (file:line)
121
+ npx afterburn-cli https://your-site.com --source ./src
122
+
123
+ # Watch the browser do its thing
124
+ npx afterburn-cli https://your-site.com --no-headless
125
+ ```
126
+
127
+ Reports are saved to `./afterburn-reports/{timestamp}/`.
128
+
129
+ ## How it works
130
+
131
+ ```
132
+ Your URL --> Crawl all pages --> Plan test workflows --> Execute tests --> Analyze failures --> Generate reports
133
+ ```
134
+
135
+ 1. **Crawl** -- Discovers all pages, forms, buttons, and links. Handles SPAs (React, Next.js, Vue, Angular, Svelte).
136
+ 2. **Plan** -- AI generates smart test workflows (or heuristic fallback with no API key).
137
+ 3. **Execute** -- Runs each workflow in a real browser: fills forms, clicks buttons, captures screenshots.
138
+ 4. **Analyze** -- Diagnoses root causes. AI vision analysis with Gemini, or pattern matching without.
139
+ 5. **Report** -- Health score (0-100) and prioritized fix list in HTML + Markdown.
140
+
141
+ ### AI is optional
142
+
143
+ Afterburn works **without any API keys**. Set `GEMINI_API_KEY` for smarter test planning and AI-powered diagnosis, but the core tool runs a full test suite either way.
144
+
145
+ ```bash
146
+ # Optional: enable AI-powered planning and diagnosis
147
+ export GEMINI_API_KEY=your-key-here
148
+ ```
149
+
150
+ ## How is this different?
151
+
152
+ | Feature | Afterburn | Lighthouse | axe-core | Manual testing |
153
+ |---------|-----------|------------|----------|----------------|
154
+ | Zero config (no test writing) | Yes | Yes | Needs integration | Yes |
155
+ | Crawls entire site | Yes | Single page | No | Tedious |
156
+ | Form filling and submission | Yes | No | No | Manual |
157
+ | Dead button detection | Yes | No | No | If you notice |
158
+ | Plain English reports | Yes | Partial | No | N/A |
159
+ | AI-ready report for auto-fix | Yes | No | No | No |
160
+ | Free and open source | Yes | Yes | Yes | Free (your time) |
161
+ | CI/CD integration | GitHub Action | CI plugin | CI plugin | No |
162
+
163
+ ## Health score
164
+
165
+ The health score (0-100) is weighted:
166
+
167
+ | Category | Weight | What it measures |
168
+ |----------|--------|------------------|
169
+ | Workflows | 40% | Did test workflows complete without errors? |
170
+ | Errors | 30% | HTTP errors, console crashes, broken resources |
171
+ | Accessibility | 20% | WCAG 2.1 AA violations |
172
+ | Performance | 10% | Page load times, LCP scores |
173
+
174
+ ## Pre-flight check
175
+
176
+ ```bash
177
+ npx afterburn-cli doctor
178
+ ```
179
+
180
+ Checks Node.js version, browser installation, API key, and network connectivity.
181
+
182
+ ## Testing
183
+
184
+ ```bash
185
+ # Build CLI + bundled GitHub Action artifacts
186
+ npm run build:release
187
+
188
+ # Fast default lane (unit tests)
189
+ npm test
190
+
191
+ # Deterministic end-to-end lane (local fixture server)
192
+ npm run test:e2e
193
+
194
+ # Unit coverage gate with thresholds
195
+ npm run test:coverage
196
+
197
+ # Optional real-internet smoke test (only runs when URL is provided)
198
+ AFTERBURN_EXTERNAL_SMOKE_URL=https://example.com npm run test:smoke:external
199
+ ```
200
+
201
+ ## CLI reference
202
+
203
+ ```
204
+ Usage: afterburn [options] [command] <url>
205
+
206
+ Automated testing for vibe-coded websites
207
+
208
+ Arguments:
209
+ url URL to test
210
+
211
+ Options:
212
+ -V, --version output the version number
213
+ --source <path> Source code directory for pinpointing bugs
214
+ --email <email> Login email (or set AFTERBURN_EMAIL env var)
215
+ --password <password> Login password (tip: use AFTERBURN_PASSWORD env var
216
+ to avoid shell history exposure)
217
+ --output-dir <path> Custom output directory
218
+ (default: ./afterburn-reports/{timestamp})
219
+ --flows <hints> Comma-separated workflow hints (e.g., "signup, checkout")
220
+ --max-pages <n> Max pages to crawl (default: 50, max: 500)
221
+ --no-headless Show browser window (useful for debugging)
222
+ --verbose Show detailed progress output
223
+ -h, --help display help for command
224
+
225
+ Commands:
226
+ doctor Check if your environment is ready to run Afterburn
227
+ ```
228
+
229
+ ## Known limitations
230
+
231
+ - **Visual analysis requires GEMINI_API_KEY**. Without it, UI analysis relies on axe-core plus pattern matching.
232
+ - **SPA support is experimental**. Complex client-side routing may not be fully exercised.
233
+ - **Desktop viewport only**. Tests run at 1920x1080. Mobile testing planned for v2.
234
+
235
+ ## Three interfaces
236
+
237
+ ### CLI
238
+
239
+ ```bash
240
+ npx afterburn-cli https://your-site.com
241
+ ```
242
+
243
+ ### GitHub Action
244
+
245
+ ```yaml
246
+ name: Afterburn
247
+ on: [pull_request]
248
+
249
+ jobs:
250
+ test:
251
+ runs-on: ubuntu-latest
252
+ steps:
253
+ - uses: actions/checkout@v4
254
+ - uses: gods-strongest-vibecoder/afterburn@main
255
+ with:
256
+ url: https://your-staging-site.com
257
+ fail-on: high
258
+ ```
259
+
260
+ Posts a summary comment on your PR and uploads reports as artifacts.
261
+
262
+ ### MCP Server (for AI coding assistants)
263
+
264
+ ```json
265
+ {
266
+ "mcpServers": {
267
+ "afterburn": {
268
+ "command": "npx",
269
+ "args": ["afterburn-mcp"]
270
+ }
271
+ }
272
+ }
273
+ ```
274
+
275
+ Exposes a `scan_website` tool that returns structured results your AI assistant can act on.
276
+
277
+ ## Tech stack
278
+
279
+ [Playwright](https://playwright.dev/) (browser automation) | [Gemini 2.5 Flash](https://ai.google.dev/) (AI vision, optional) | [axe-core](https://github.com/dequelabs/axe-core) (accessibility) | [Commander.js](https://github.com/tj/commander.js) (CLI) | [Handlebars](https://handlebarsjs.com/) (HTML reports) | [ts-morph](https://github.com/dsherret/ts-morph) (source mapping) | [sharp](https://sharp.pixelplumbing.com/) (screenshot compression)
280
+
281
+ ## License
282
+
283
+ MIT
284
+
285
+ Built for the [BridgeMind Vibeathon 2026](https://bridgemind.dev).
286
+
287
+