kryptheon 0.1.3 → 0.1.5
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 +132 -86
- package/bin/kryptheon.js +1309 -1179
- package/kryptheon-reporter.js +797 -783
- package/package.json +10 -2
package/README.md
CHANGED
|
@@ -1,86 +1,132 @@
|
|
|
1
|
-
# kryptheon
|
|
2
|
-
|
|
3
|
-
Record
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Install
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
npm i -D kryptheon
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
`
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
coding
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
1
|
+
# kryptheon
|
|
2
|
+
|
|
3
|
+
Record a flow in your app once, replay it after every AI change, and get told in
|
|
4
|
+
plain English what broke.
|
|
5
|
+
|
|
6
|
+
Runs entirely on your machine. No account, no API key, nothing leaves your
|
|
7
|
+
computer. It is a wrapper around [Playwright](https://playwright.dev).
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
npm i -D kryptheon
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Install it into your project, not globally — every recording imports
|
|
16
|
+
`kryptheon/kryptheon-fixture`, and your tests can only find that if kryptheon is
|
|
17
|
+
in your project's `node_modules`.
|
|
18
|
+
|
|
19
|
+
## Record
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
npx kryptheon record https://your-app.example.com
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
A browser opens. Use your app the way a customer would. Close the browser when
|
|
26
|
+
you are done, and the recording is saved as a test.
|
|
27
|
+
|
|
28
|
+
## Check
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
npx kryptheon check
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Runs everything you have recorded:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
OK Sign in (4.1s)
|
|
38
|
+
|
|
39
|
+
X Checkout
|
|
40
|
+
Could not find the button "Place order" on the page.
|
|
41
|
+
This was working on 12 Mar at 9:14 AM.
|
|
42
|
+
What to check: your last change may have renamed, hidden, or removed it.
|
|
43
|
+
Where to look:
|
|
44
|
+
- Browser was on: https://your-app.example.com/cart
|
|
45
|
+
- POST /api/orders returned 500
|
|
46
|
+
the server crashed or is unavailable - the error is in backend code, not the page
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Every failure ends with a short summary you can paste straight into an AI coding
|
|
50
|
+
tool.
|
|
51
|
+
|
|
52
|
+
## Recording something that replays
|
|
53
|
+
|
|
54
|
+
A recording is only useful if it still works the second time. So:
|
|
55
|
+
|
|
56
|
+
- **Record one simple flow.** Sign in and look at a page. Open a thing and check
|
|
57
|
+
it loaded. Short beats thorough.
|
|
58
|
+
- **Sign in with an account that already exists.** Do not sign up during a
|
|
59
|
+
recording — the account exists next time, and the signup step fails.
|
|
60
|
+
- **Avoid steps that cannot repeat.** Adding data piles up a row on every run.
|
|
61
|
+
Logging out at the end means the next run does not start where this one did.
|
|
62
|
+
|
|
63
|
+
Kryptheon warns you about these after a recording, and names the exact step.
|
|
64
|
+
|
|
65
|
+
## Make your AI assistant check its own work
|
|
66
|
+
|
|
67
|
+
An assistant will happily call a change done after only reading the code. This
|
|
68
|
+
writes a rule into the files assistants already read, so it has to run the check
|
|
69
|
+
first:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
npx kryptheon setup-ai
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
It writes `CLAUDE.md`, `AGENTS.md` and `.cursorrules`. If a file already exists,
|
|
76
|
+
it adds a marked section at the end rather than overwriting anything, and
|
|
77
|
+
running it again replaces that section instead of adding a second copy.
|
|
78
|
+
|
|
79
|
+
The rule: after any change, run `npx kryptheon check`, show the output, and do
|
|
80
|
+
not report the work as done until it passes.
|
|
81
|
+
|
|
82
|
+
For an assistant running the check after every change, `--quiet` keeps the
|
|
83
|
+
conversation readable — one line when everything passes, the full explanation
|
|
84
|
+
only when something breaks:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
npx kryptheon check --quiet
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
OK 3 recordings still working.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Automatic checks
|
|
95
|
+
|
|
96
|
+
The first time a test passes, kryptheon remembers where the browser ended up and
|
|
97
|
+
what the page was called. If either changes later, the test fails and says what
|
|
98
|
+
changed — so a recording catches regressions without you writing a single
|
|
99
|
+
assertion.
|
|
100
|
+
|
|
101
|
+
When a change is intentional, accept it for that one test:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
npx kryptheon accept "Checkout"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
`npx kryptheon accept` on its own lists what has been saved.
|
|
108
|
+
|
|
109
|
+
## Files it creates in your folder
|
|
110
|
+
|
|
111
|
+
| File | What it is |
|
|
112
|
+
| --- | --- |
|
|
113
|
+
| `tests/` | your recordings |
|
|
114
|
+
| `kryptheon-baselines.json` | the remembered result for each test |
|
|
115
|
+
| `kryptheon-history.jsonl` | one line per run, used for "this was working on …" |
|
|
116
|
+
|
|
117
|
+
A `.env` in the same folder is loaded automatically, and anything you type into a
|
|
118
|
+
password box is replaced with an environment variable rather than written into
|
|
119
|
+
the test.
|
|
120
|
+
|
|
121
|
+
Worth adding to `.gitignore`: `.env`, `kryptheon-baselines.json`,
|
|
122
|
+
`kryptheon-history.jsonl`, `test-results/`.
|
|
123
|
+
|
|
124
|
+
## Requirements
|
|
125
|
+
|
|
126
|
+
Node 20.6 or later. Recording needs a real terminal window — it opens a browser,
|
|
127
|
+
so it cannot run inside an AI coding assistant. The first run downloads a browser
|
|
128
|
+
(about 200MB, once).
|
|
129
|
+
|
|
130
|
+
## Licence
|
|
131
|
+
|
|
132
|
+
MIT
|