getseatbelt 0.0.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/README.md +122 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +4735 -0
- package/dist/index.d.ts +1592 -0
- package/dist/index.js +4615 -0
- package/package.json +72 -0
package/README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# getseatbelt
|
|
2
|
+
|
|
3
|
+
> **QA for AI-coded apps, before you merge.**
|
|
4
|
+
|
|
5
|
+
Seatbelt is a local-first CLI. AI made code changes — Seatbelt maps your app's critical
|
|
6
|
+
flows, replays them in a **real, visible browser**, captures evidence (video, screenshots,
|
|
7
|
+
console, network), and returns a merge verdict plus a paste-ready **LLM fix prompt** for
|
|
8
|
+
Claude, Cursor, or Codex. So you can trust an AI-generated change before you commit or merge it.
|
|
9
|
+
|
|
10
|
+
- **Package:** `getseatbelt`
|
|
11
|
+
- **Command:** `seatbelt`
|
|
12
|
+
- **Website:** https://getseatbelt.ai · **Docs:** https://getseatbelt.ai/docs
|
|
13
|
+
|
|
14
|
+
## Quick start
|
|
15
|
+
|
|
16
|
+
Requires **Node 18+**.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install getseatbelt # add Seatbelt to your project
|
|
20
|
+
npx seatbelt init # set up Seatbelt and map your app's critical flows
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`seatbelt init` writes a small `seatbelt.config.yaml`, scaffolds a starter flow set in
|
|
24
|
+
`qa-flows/`, and — at the end of setup — offers to run your first browser replay right away
|
|
25
|
+
and to set up a clean test user. After that, run Seatbelt whenever AI changes your app:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx seatbelt run # replay your QA flows in a visible browser, then open the report
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The first time a command needs your Seatbelt account, the CLI opens your browser to connect —
|
|
32
|
+
you never paste a token. Local runs and reports work with no account at all.
|
|
33
|
+
|
|
34
|
+
## What you get
|
|
35
|
+
|
|
36
|
+
- **A visible browser replay.** Seatbelt drives a real browser through your flows so you can
|
|
37
|
+
watch it happen — not a green check you take on faith.
|
|
38
|
+
- **A clean test user each run.** Seatbelt can add a safe reset so every run starts from a
|
|
39
|
+
known-clean account/state (run `seatbelt setup-reset`, or say yes during `seatbelt init`).
|
|
40
|
+
- **Evidence, saved locally.** Video, screenshots, trace, console, and network for every run,
|
|
41
|
+
in a self-contained `report.html` that opens automatically.
|
|
42
|
+
- **A merge verdict.** `MERGE` / `MERGE WITH CAUTION` / `DO NOT MERGE`, with the failed step
|
|
43
|
+
and an LLM fix prompt you can paste straight back into your coding agent.
|
|
44
|
+
- **A QA-certified flow map.** A local, per-project map of your critical flows and their status,
|
|
45
|
+
kept in sync as your app changes.
|
|
46
|
+
|
|
47
|
+
## Commands
|
|
48
|
+
|
|
49
|
+
| Command | What it does |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `seatbelt init` (alias `on`) | Set up Seatbelt in your repo, scaffold starter flows, seed the flow map. Offers to run the first browser QA and to set up a clean test user. |
|
|
52
|
+
| `seatbelt run [target]` | Detect + start your app, run your clean-test-user reset, replay eligible `qa-flows/*.yaml` in a fresh visible browser, capture evidence, write + open the report, update the flow map. `target` can be a flow id or `all`. |
|
|
53
|
+
| `seatbelt certify [--run]` | Show the QA-certified flow map. With `--run`, verify every eligible flow and record certification. |
|
|
54
|
+
| `seatbelt refresh-flows` | Restore missing starter templates and flag stale flows. With `--ai`, ask Seatbelt for refreshed YAML suggestions. |
|
|
55
|
+
| `seatbelt generate-flows` | Inspect your app and generate flow YAML suggestions. |
|
|
56
|
+
| `seatbelt setup-reset` | Generate a reset-hook prompt for your coding agent (never executes anything). |
|
|
57
|
+
| `seatbelt lint` | Run your detected lint / typecheck / build / test scripts (no browser). |
|
|
58
|
+
| `seatbelt doctor` | Plain-language pre-flight of your setup. |
|
|
59
|
+
| `seatbelt report` | Reopen the latest report without re-running. |
|
|
60
|
+
| `seatbelt login` / `logout` / `whoami` | Manage your Seatbelt connection (usually automatic). |
|
|
61
|
+
| `seatbelt status` / `billing` | Show your plan/access, or open the billing portal. |
|
|
62
|
+
|
|
63
|
+
**Run flags:** `--headed` / `--headless` (headed is the default — the visible browser is the
|
|
64
|
+
point), `--no-open`, `--yes`. Great for CI while keeping the visible browser as the everyday default.
|
|
65
|
+
|
|
66
|
+
## Configuration
|
|
67
|
+
|
|
68
|
+
`seatbelt init` writes a minimal `seatbelt.config.yaml`. Everything omitted falls back to
|
|
69
|
+
sensible defaults.
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
version: 1
|
|
73
|
+
app:
|
|
74
|
+
name: My app
|
|
75
|
+
|
|
76
|
+
server:
|
|
77
|
+
baseUrl: http://localhost:3000
|
|
78
|
+
reuseExistingServer: true
|
|
79
|
+
|
|
80
|
+
browser:
|
|
81
|
+
headed: true # visible browser — the trust layer
|
|
82
|
+
freshSession: true # fresh context, cleared storage each run
|
|
83
|
+
video: true
|
|
84
|
+
trace: false
|
|
85
|
+
|
|
86
|
+
report:
|
|
87
|
+
formats:
|
|
88
|
+
- html
|
|
89
|
+
openOnFinish: true
|
|
90
|
+
|
|
91
|
+
flows:
|
|
92
|
+
dir: qa-flows
|
|
93
|
+
autoRefresh: prompt
|
|
94
|
+
|
|
95
|
+
# Clean test user (optional but recommended — add via `seatbelt setup-reset`):
|
|
96
|
+
# reset:
|
|
97
|
+
# command: npm run qa:reset-user # Seatbelt runs this before your flows
|
|
98
|
+
# required: true # true = block browser QA (DO NOT MERGE) if it fails
|
|
99
|
+
# timeoutMs: 30000
|
|
100
|
+
# allowNonLocal: false # safety: refuse to reset a non-localhost baseUrl
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Flows
|
|
104
|
+
|
|
105
|
+
Flows are simple YAML in `qa-flows/`. Each flow lists deterministic steps for one critical
|
|
106
|
+
path — login, checkout, billing, entitlements, onboarding, uploads, or whatever matters in your
|
|
107
|
+
app. Not every app has every flow; delete the templates you don't need. Steps include `goto`,
|
|
108
|
+
`click`, `fill` (`value` or `valueFromEnv` — secrets never live in the flow file), `press`,
|
|
109
|
+
`selectOption`, `upload`, `waitFor*`, `expect*`, and `screenshot`. Credentials come from your
|
|
110
|
+
`.env.local` by variable name; values are never printed or uploaded.
|
|
111
|
+
|
|
112
|
+
## Privacy
|
|
113
|
+
|
|
114
|
+
Browser QA runs on your machine, against your local app; artifacts are stored in your local
|
|
115
|
+
project directory and are not uploaded by default. When you use AI to generate or maintain
|
|
116
|
+
flows, Seatbelt sends a **sanitized summary** of your app (framework, scripts, routes, dependency
|
|
117
|
+
names, redacted snippets, and env var names only) — never your `.env` secret values. Run with
|
|
118
|
+
`--local-only` to keep everything offline (this disables AI flow generation and refresh).
|
|
119
|
+
|
|
120
|
+
## License
|
|
121
|
+
|
|
122
|
+
MIT. By using Seatbelt you agree to the Terms and Privacy Policy at https://getseatbelt.ai/terms.
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|