kiroo 0.8.0 β 0.9.0
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 +368 -293
- package/bin/kiroo.js +361 -288
- package/package.json +2 -1
- package/src/analyze.js +550 -0
- package/src/config.js +109 -0
- package/src/deterministic.js +22 -0
- package/src/env.js +31 -3
- package/src/executor.js +17 -0
- package/src/export.js +503 -93
- package/src/init.js +80 -48
- package/src/lingo.js +32 -36
- package/src/proxy.js +120 -0
- package/src/replay.js +5 -4
- package/src/sanitizer.js +100 -0
- package/src/snapshot.js +76 -19
- package/src/storage.js +223 -142
package/README.md
CHANGED
|
@@ -1,293 +1,368 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<img src="./kiroo_banner.png" alt="Kiroo Banner" width="100%">
|
|
3
|
-
|
|
4
|
-
# π¦ KIROO
|
|
5
|
-
### **Version Control for API Interactions**
|
|
6
|
-
|
|
7
|
-
[](https://opensource.org/licenses/MIT)
|
|
8
|
-
[](https://nodejs.org/)
|
|
9
|
-
[](http://makeapullrequest.com)
|
|
10
|
-
|
|
11
|
-
**Record, Replay, Snapshot, and Diff your APIs just like Git handles code.**
|
|
12
|
-
|
|
13
|
-
[Installation](#-installation) β’ [Quick Start](#-quick-start) β’ [Key Features](#-core-capabilities) β’ [Why Kiroo?](#-why-kiroo)
|
|
14
|
-
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## π What is Kiroo?
|
|
20
|
-
|
|
21
|
-
Kiroo is **Version Control for API Interactions**. It treats your requests and responses as first-class, versionable artifacts that live right alongside your code in your Git repository.
|
|
22
|
-
|
|
23
|
-
Stop copy-pasting JSON into Postman. Stop losing your API history. Start versioning it. π
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## πΈοΈ Visual Dependency Graph (`kiroo graph`)
|
|
28
|
-
|
|
29
|
-
Kiroo doesn't just record requests; it understands the **relationships** between them.
|
|
30
|
-
- **Auto-Tracking**: Kiroo tracks variables created via `--save` and consumed via `{{key}}`.
|
|
31
|
-
- **Insight**: Instantly see how data flows from your `/login` to your `/profile` and beyond.
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## π Insights & Performance Dashboard (`kiroo stats`)
|
|
36
|
-
|
|
37
|
-
Monitor your API's health directly from your terminal.
|
|
38
|
-
- **Success Rates**: Real-time 2xx/4xx/5xx distribution.
|
|
39
|
-
- **Performance**: Average response times across all interactions.
|
|
40
|
-
- **Bottlenecks**: Automatically identifies your top 5 slowest endpoints.
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## π Instant cURL Import (`kiroo import`)
|
|
45
|
-
|
|
46
|
-
Coming from a browser? Don't type a single header.
|
|
47
|
-
- **Copy-Paste Magic**: Just `Copy as cURL` from Chrome/Firefox and run `kiroo import`.
|
|
48
|
-
- **Clean Parsing**: Automatically handles multi-line commands, quotes, and complex flags.
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
##
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Capture
|
|
56
|
-
- **
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
kiroo
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
###
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
kiroo
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
- **
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
- **Example**:
|
|
155
|
-
```bash
|
|
156
|
-
kiroo
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### `kiroo
|
|
160
|
-
|
|
161
|
-
- **Description**:
|
|
162
|
-
- **Arguments**:
|
|
163
|
-
|
|
164
|
-
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
-
|
|
173
|
-
- **
|
|
174
|
-
|
|
175
|
-
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
-
|
|
193
|
-
|
|
194
|
-
- **Options**:
|
|
195
|
-
- `-
|
|
196
|
-
- `-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
-
|
|
210
|
-
-
|
|
211
|
-
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
-
|
|
227
|
-
- **
|
|
228
|
-
-
|
|
229
|
-
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
- `
|
|
262
|
-
- **Example**:
|
|
263
|
-
```bash
|
|
264
|
-
kiroo
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
### `kiroo
|
|
268
|
-
|
|
269
|
-
- **
|
|
270
|
-
-
|
|
271
|
-
-
|
|
272
|
-
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="./kiroo_banner.png" alt="Kiroo Banner" width="100%">
|
|
3
|
+
|
|
4
|
+
# π¦ KIROO
|
|
5
|
+
### **Version Control for API Interactions**
|
|
6
|
+
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](https://nodejs.org/)
|
|
9
|
+
[](http://makeapullrequest.com)
|
|
10
|
+
|
|
11
|
+
**Record, Replay, Snapshot, and Diff your APIs just like Git handles code.**
|
|
12
|
+
|
|
13
|
+
[Installation](#-installation) β’ [Quick Start](#-quick-start) β’ [Key Features](#-core-capabilities) β’ [Why Kiroo?](#-why-kiroo)
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## π What is Kiroo?
|
|
20
|
+
|
|
21
|
+
Kiroo is **Version Control for API Interactions**. It treats your requests and responses as first-class, versionable artifacts that live right alongside your code in your Git repository.
|
|
22
|
+
|
|
23
|
+
Stop copy-pasting JSON into Postman. Stop losing your API history. Start versioning it. π
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## πΈοΈ Visual Dependency Graph (`kiroo graph`)
|
|
28
|
+
|
|
29
|
+
Kiroo doesn't just record requests; it understands the **relationships** between them.
|
|
30
|
+
- **Auto-Tracking**: Kiroo tracks variables created via `--save` and consumed via `{{key}}`.
|
|
31
|
+
- **Insight**: Instantly see how data flows from your `/login` to your `/profile` and beyond.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## π Insights & Performance Dashboard (`kiroo stats`)
|
|
36
|
+
|
|
37
|
+
Monitor your API's health directly from your terminal.
|
|
38
|
+
- **Success Rates**: Real-time 2xx/4xx/5xx distribution.
|
|
39
|
+
- **Performance**: Average response times across all interactions.
|
|
40
|
+
- **Bottlenecks**: Automatically identifies your top 5 slowest endpoints.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## π Instant cURL Import (`kiroo import`)
|
|
45
|
+
|
|
46
|
+
Coming from a browser? Don't type a single header.
|
|
47
|
+
- **Copy-Paste Magic**: Just `Copy as cURL` from Chrome/Firefox and run `kiroo import`.
|
|
48
|
+
- **Clean Parsing**: Automatically handles multi-line commands, quotes, and complex flags.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## π°οΈ Time-Travel Proxy (`kiroo proxy`)
|
|
53
|
+
|
|
54
|
+
Stop typing CLI commands manually.
|
|
55
|
+
- **Auto-Capture**: Start the Kiroo Proxy between your frontend and backend. Every click in your app is automatically captured and versioned.
|
|
56
|
+
- **Zero Effort**: `kiroo proxy --target http://localhost:3000`. Perfect for instantly recording broken frontend flows to reproduce later.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## β¨ Features that WOW
|
|
61
|
+
|
|
62
|
+
### π’ **Git-Native Diffing & Translating**
|
|
63
|
+
Capture a **Snapshot** of your entire API state and compare versions.
|
|
64
|
+
- **Deep Structural Diffs**: Recursively tracks nested schema changes and silent datatype overrides.
|
|
65
|
+
- **Lingo.dev Translation**: Instantly localize breaking change alerts natively in your terminal.
|
|
66
|
+
```bash
|
|
67
|
+
kiroo snapshot save v1-stable
|
|
68
|
+
kiroo --lang hi snapshot compare v1-stable current
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### π§ **AI Blast Radius Analysis**
|
|
72
|
+
Understand impact, not just raw diffs.
|
|
73
|
+
```bash
|
|
74
|
+
kiroo analyze v1-stable current --fail-on high
|
|
75
|
+
kiroo analyze v1-stable current --ai
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### π **Variable Chaining**
|
|
79
|
+
Chain requests like a pro. Save a token from one response and inject it into the next.
|
|
80
|
+
```bash
|
|
81
|
+
kiroo post /login --save jwt=data.token
|
|
82
|
+
kiroo get /users -H "Authorization: Bearer {{jwt}}"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### π **Git-Safe Recording (Secret Redaction)**
|
|
86
|
+
Kiroo redacts sensitive values before writing interaction files, so `.kiroo/` can be safely shared in Git.
|
|
87
|
+
```bash
|
|
88
|
+
kiroo scrub --dry-run
|
|
89
|
+
kiroo scrub
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### β¨οΈ **Shorthand JSON Parser**
|
|
93
|
+
Forget escaping quotes. Type JSON like a human.
|
|
94
|
+
```bash
|
|
95
|
+
kiroo post /api/user -d "name=Yash email=yash@kiroo.io role=admin"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### π§ͺ **Zero-Code Testing Framework**
|
|
101
|
+
Turn your terminal into an automated test runner. Validate responses on the fly without writing a single line of JS.
|
|
102
|
+
```bash
|
|
103
|
+
kiroo check /api/login -m POST -d "user=yash pass=123" --status 200 --has token
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### π **Local Load Benchmarking**
|
|
107
|
+
Stress test endpoints instantly. Simulates massive concurrency and environment-variable-injected workloads to locate latency limits.
|
|
108
|
+
```bash
|
|
109
|
+
kiroo bench /api/reports -n 1000 -c 50 -v
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## π Quick Start
|
|
115
|
+
|
|
116
|
+
### 1. Installation
|
|
117
|
+
```bash
|
|
118
|
+
npm install -g kiroo
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 2. Initialization
|
|
122
|
+
```bash
|
|
123
|
+
kiroo init
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### 3. Record Your First Request
|
|
127
|
+
```bash
|
|
128
|
+
kiroo get https://api.github.com/users/yash-pouranik
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## π Full Command Documentation
|
|
134
|
+
|
|
135
|
+
### `kiroo init`
|
|
136
|
+
Initialize Kiroo in your current project.
|
|
137
|
+
- **Description**: Creates the `.kiroo/` directory structure, a default `env.json`, and `.kiroo/config.json` with deterministic/redaction-safe defaults. During setup, you can store `baseUrl`, `GROQ_API_KEY`, and `LINGODOTDEV_API_KEY` into `.kiroo/env.json`.
|
|
138
|
+
- **Prerequisites**: None. Run once per project.
|
|
139
|
+
- **Example**:
|
|
140
|
+
```bash
|
|
141
|
+
kiroo init
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### `kiroo get/post/put/delete <url>`
|
|
145
|
+
Execute and record an API interaction.
|
|
146
|
+
- **Description**: Performs an HTTP request, displays the response, and saves it to history.
|
|
147
|
+
- **Prerequisites**: Access to the URL (or a `baseUrl` set in the environment).
|
|
148
|
+
- **Arguments**:
|
|
149
|
+
- `url`: The endpoint (Absolute URL or relative path if `baseUrl` exists).
|
|
150
|
+
- **Options**:
|
|
151
|
+
- `-H, --header <key:value>`: Add custom headers.
|
|
152
|
+
- `-d, --data <data>`: Request body (JSON or shorthand `key=val`).
|
|
153
|
+
- `-s, --save <key=path>`: Save response data to environment variables.
|
|
154
|
+
- **Example**:
|
|
155
|
+
```bash
|
|
156
|
+
kiroo post /api/auth/login -d "email=user@test.com password=123" --save token=data.token
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### `kiroo list`
|
|
160
|
+
View your interaction history.
|
|
161
|
+
- **Description**: Displays a paginated list of all recorded requests.
|
|
162
|
+
- **Arguments**: None.
|
|
163
|
+
- **Options**:
|
|
164
|
+
- `-n, --limit <number>`: How many records to show (Default: 10).
|
|
165
|
+
- `-o, --offset <number>`: How many records to skip (Default: 0).
|
|
166
|
+
- **Example**:
|
|
167
|
+
```bash
|
|
168
|
+
kiroo list -n 20
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### `kiroo replay <id>`
|
|
172
|
+
Re-run a specific interaction.
|
|
173
|
+
- **Description**: Fetches the original request from history and executes it again.
|
|
174
|
+
- **Arguments**:
|
|
175
|
+
- `id`: The timestamp ID of the interaction (found via `kiroo list`).
|
|
176
|
+
- **Example**:
|
|
177
|
+
```bash
|
|
178
|
+
kiroo replay 2026-03-10T14-30-05-123Z
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### `kiroo edit <id>`
|
|
182
|
+
Quick Refinement. Edit an interaction on the fly and replay it.
|
|
183
|
+
- **Description**: Opens the stored interaction JSON in your default system editor (VS Code, Nano, Vim, etc.). Edit the headers, body, or URL, save, and close. Kiroo immediately replays the updated request.
|
|
184
|
+
- **Arguments**:
|
|
185
|
+
- `id`: The timestamp ID of the interaction.
|
|
186
|
+
- **Example**:
|
|
187
|
+
```bash
|
|
188
|
+
kiroo edit 2026-03-10T14-30-05-123Z
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### `kiroo proxy`
|
|
192
|
+
Start a time-travel proxy.
|
|
193
|
+
- **Description**: Acts as a middleware between the frontend and backend, automatically capturing HTTP traffic and saving it as interactions without typing CLI commands.
|
|
194
|
+
- **Options**:
|
|
195
|
+
- `-t, --target <url>`: Target URL of the backend.
|
|
196
|
+
- `-p, --port <port>`: Port for the proxy to listen on (Default: 8080).
|
|
197
|
+
- **Example**:
|
|
198
|
+
```bash
|
|
199
|
+
kiroo proxy --target http://localhost:3000 --port 8080
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### `kiroo check <url>`
|
|
203
|
+
Zero-Code Testing engine.
|
|
204
|
+
- **Description**: Executes a request and runs assertions on the response. Exits with code 1 on failure.
|
|
205
|
+
- **Prerequisites**: Access to the URL.
|
|
206
|
+
- **Arguments**:
|
|
207
|
+
- `url`: The endpoint.
|
|
208
|
+
- **Options**:
|
|
209
|
+
- `-m, --method <method>`: HTTP method (GET, POST, etc. Default: GET).
|
|
210
|
+
- `-H, --header <key:value>`: Add custom headers.
|
|
211
|
+
- `-d, --data <data>`: Request body.
|
|
212
|
+
- `--status <numbers>`: Expected HTTP status code.
|
|
213
|
+
- `--has <fields>`: Comma-separated list of expected fields in JSON.
|
|
214
|
+
- `--match <key=val>`: Exact value matching for JSON fields.
|
|
215
|
+
- **Example**:
|
|
216
|
+
```bash
|
|
217
|
+
# Check if login is successful
|
|
218
|
+
kiroo check /api/login -m POST -d "user=yash pass=123" --status 200 --has token
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### `kiroo bench <url>`
|
|
222
|
+
Local load testing and benchmarking.
|
|
223
|
+
- **Description**: Sends multiple concurrent HTTP requests to measure endpoint performance (Latency, RPS, Error Rate).
|
|
224
|
+
- **Prerequisites**: Access to the URL.
|
|
225
|
+
- **Arguments**:
|
|
226
|
+
- `url`: The endpoint (supports Auto-BaseURL).
|
|
227
|
+
- **Options**:
|
|
228
|
+
- `-m, --method <method>`: HTTP method (GET, POST, etc. Default: GET).
|
|
229
|
+
- `-n, --number <number>`: Total requests to send (Default: 10).
|
|
230
|
+
- `-c, --concurrent <number>`: Concurrent workers (Default: 1).
|
|
231
|
+
- `-v, --verbose`: Show the HTTP status, response time, and truncated response body for every individual request instead of a single progress spinner.
|
|
232
|
+
- `-H, --header <key:value>`: Add custom headers.
|
|
233
|
+
- `-d, --data <data>`: Request body.
|
|
234
|
+
- **Example**:
|
|
235
|
+
```bash
|
|
236
|
+
# Send 100 requests in batches of 10
|
|
237
|
+
kiroo bench /api/projects -n 100 -c 10
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### `kiroo graph`
|
|
241
|
+
Visualize API dependencies.
|
|
242
|
+
- **Description**: Generates a tree view showing how data flows between endpoints via saved/used variables.
|
|
243
|
+
- **Prerequisites**: Recorded interactions that use `--save` and `{{variable}}`.
|
|
244
|
+
- **Example**:
|
|
245
|
+
```bash
|
|
246
|
+
kiroo graph
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### `kiroo stats`
|
|
250
|
+
Analytics dashboard.
|
|
251
|
+
- **Description**: Shows performance metrics, success rates, and identify slow endpoints.
|
|
252
|
+
- **Example**:
|
|
253
|
+
```bash
|
|
254
|
+
kiroo stats
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### `kiroo import`
|
|
258
|
+
Import from cURL.
|
|
259
|
+
- **Description**: Converts a cURL command into a Kiroo interaction. Opens an interactive editor if no argument is provided.
|
|
260
|
+
- **Arguments**:
|
|
261
|
+
- `curl`: (Optional) The raw cURL string in quotes.
|
|
262
|
+
- **Example**:
|
|
263
|
+
```bash
|
|
264
|
+
kiroo import "curl https://api.exa.com -H 'Auth: 123'"
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### `kiroo snapshot`
|
|
268
|
+
Snapshot management.
|
|
269
|
+
- **Commands**:
|
|
270
|
+
- `save <tag>`: Save current history as a versioned state.
|
|
271
|
+
- `list`: List all saved snapshots.
|
|
272
|
+
- `compare <tag1> <tag2>`: Detect structural changes between two states.
|
|
273
|
+
- `compare <tag1> <tag2> --analyze`: Structural compare + semantic severity in one run.
|
|
274
|
+
- **Example**:
|
|
275
|
+
```bash
|
|
276
|
+
kiroo snapshot compare v1.stable current
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### `kiroo analyze <tag1> <tag2>`
|
|
280
|
+
Semantic blast-radius analysis between snapshots.
|
|
281
|
+
- **Description**: Generates endpoint-wise severity report for contract drift (`low|medium|high|critical`) and can optionally generate AI impact summary via Groq.
|
|
282
|
+
- **Options**:
|
|
283
|
+
- `--json`: Output machine-readable JSON report.
|
|
284
|
+
- `--fail-on <severity>`: Exit non-zero if max severity meets threshold.
|
|
285
|
+
- `--ai`: Add Groq-powered impact summary.
|
|
286
|
+
- `--model <model>`: Override default model priority.
|
|
287
|
+
- `--max-tokens <number>`: Max completion tokens for AI summary.
|
|
288
|
+
- **Environment**:
|
|
289
|
+
- `GROQ_API_KEY` in `.kiroo/env.json`: Required when `--ai` is used.
|
|
290
|
+
- **Example**:
|
|
291
|
+
```bash
|
|
292
|
+
kiroo analyze before-refactor after-refactor --fail-on high
|
|
293
|
+
kiroo analyze before-refactor after-refactor --ai --model qwen/qwen3-32b
|
|
294
|
+
kiroo snapshot compare before-refactor after-refactor --analyze --ai
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### `kiroo export`
|
|
298
|
+
Team Compatibility. Export to Postman or OpenAPI.
|
|
299
|
+
- **Description**: Converts stored Kiroo interactions into Postman Collection or OpenAPI/Swagger JSON for team sharing and docs.
|
|
300
|
+
- **Options**:
|
|
301
|
+
- `-f, --format <format>`: `postman` or `openapi` (Default: `postman`).
|
|
302
|
+
- `-o, --out <filename>`: Output file name (Default: `kiroo-collection.json` for postman, `openapi.json` for openapi).
|
|
303
|
+
- `--title <title>`: OpenAPI title override.
|
|
304
|
+
- `--api-version <version>`: OpenAPI version override.
|
|
305
|
+
- `--server <url>`: OpenAPI server URL override.
|
|
306
|
+
- `--path-prefix <prefix>`: Include only matching API paths (e.g. `/api`).
|
|
307
|
+
- `--min-samples <number>`: Include only operations observed at least N times.
|
|
308
|
+
- **Example**:
|
|
309
|
+
```bash
|
|
310
|
+
kiroo export --format postman --out my_api_collection.json
|
|
311
|
+
kiroo export --format openapi --out openapi.json --title "My API" --api-version 1.0.0
|
|
312
|
+
kiroo export --format openapi --path-prefix /api --min-samples 2 --out openapi.json
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### `kiroo scrub`
|
|
316
|
+
Redact sensitive values in already stored data.
|
|
317
|
+
- **Description**: Scans `.kiroo/interactions` and `.kiroo/snapshots`, then masks secrets like auth headers, cookies, tokens, passwords, and API keys.
|
|
318
|
+
- **Options**:
|
|
319
|
+
- `--dry-run`: Show what would change without modifying files.
|
|
320
|
+
- **Example**:
|
|
321
|
+
```bash
|
|
322
|
+
kiroo scrub --dry-run
|
|
323
|
+
kiroo scrub
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### `kiroo env`
|
|
327
|
+
Environment & Variable management.
|
|
328
|
+
- **Commands**:
|
|
329
|
+
- `list`: View all environments and their variables.
|
|
330
|
+
- `use <name>`: Switch active environment (e.g., `prod`, `local`).
|
|
331
|
+
- `set <key> <value>`: Set a variable in the active environment.
|
|
332
|
+
- `rm <key>`: Remove a variable.
|
|
333
|
+
- **Note**:
|
|
334
|
+
- Sensitive keys (tokens/passwords/API keys) are masked in `kiroo env list`.
|
|
335
|
+
- **Example**:
|
|
336
|
+
```bash
|
|
337
|
+
kiroo env set baseUrl https://api.myapp.com
|
|
338
|
+
kiroo env set GROQ_API_KEY your_key
|
|
339
|
+
kiroo env set LINGODOTDEV_API_KEY your_key
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### `kiroo clear`
|
|
343
|
+
Wipe history.
|
|
344
|
+
- **Description**: Deletes all recorded interactions to start fresh.
|
|
345
|
+
- **Options**:
|
|
346
|
+
- `-f, --force`: Clear without a confirmation prompt.
|
|
347
|
+
- **Example**:
|
|
348
|
+
```bash
|
|
349
|
+
kiroo clear --force
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## π€ Contributing
|
|
355
|
+
|
|
356
|
+
Kiroo is an open-source project and we love contributions! Check out our [Contribution Guidelines](CONTRIBUTING.md).
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## π License
|
|
361
|
+
|
|
362
|
+
Distributed under the MIT License. See `LICENSE` for more information.
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
<div align="center">
|
|
367
|
+
Built with β€οΈ for Developers
|
|
368
|
+
</div>
|