kiroo 0.7.4 β†’ 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 CHANGED
@@ -1,258 +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
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
- [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18-green.svg)](https://nodejs.org/)
9
- [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](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
- ## ✨ Features that WOW
53
-
54
- ### 🟒 **Git-Native Testing**
55
- Capture a **Snapshot** of your entire API state and compare versions to detect breaking changes instantly.
56
- ```bash
57
- kiroo snapshot save v1-stable
58
- # ... make changes ...
59
- kiroo snapshot compare v1-stable current
60
- ```
61
-
62
- ### 🌍 **Variable Chaining**
63
- Chain requests like a pro. Save a token from one response and inject it into the next.
64
- ```bash
65
- kiroo post /login --save jwt=data.token
66
- kiroo get /users -H "Authorization: Bearer {{jwt}}"
67
- ```
68
-
69
- ### ⌨️ **Shorthand JSON Parser**
70
- Forget escaping quotes. Type JSON like a human.
71
- ```bash
72
- kiroo post /api/user -d "name=Yash email=yash@kiroo.io role=admin"
73
- ```
74
-
75
- ---
76
-
77
- ## πŸš€ Quick Start
78
-
79
- ### 1. Installation
80
- ```bash
81
- npm install -g kiroo
82
- ```
83
-
84
- ### 2. Initialization
85
- ```bash
86
- kiroo init
87
- ```
88
-
89
- ### 3. Record Your First Request
90
- ```bash
91
- kiroo get https://api.github.com/users/yash-pouranik
92
- ```
93
-
94
- ---
95
-
96
- ## πŸ“š Full Command Documentation
97
-
98
- ### `kiroo init`
99
- Initialize Kiroo in your current project.
100
- - **Description**: Creates the `.kiroo/` directory structure and a default `env.json`.
101
- - **Prerequisites**: None. Run once per project.
102
- - **Example**:
103
- ```bash
104
- kiroo init
105
- ```
106
-
107
- ### `kiroo get/post/put/delete <url>`
108
- Execute and record an API interaction.
109
- - **Description**: Performs an HTTP request, displays the response, and saves it to history.
110
- - **Prerequisites**: Access to the URL (or a `baseUrl` set in the environment).
111
- - **Arguments**:
112
- - `url`: The endpoint (Absolute URL or relative path if `baseUrl` exists).
113
- - **Options**:
114
- - `-H, --header <key:value>`: Add custom headers.
115
- - `-d, --data <data>`: Request body (JSON or shorthand `key=val`).
116
- - `-s, --save <key=path>`: Save response data to environment variables.
117
- - **Example**:
118
- ```bash
119
- kiroo post /api/auth/login -d "email=user@test.com password=123" --save token=data.token
120
- ```
121
-
122
- ### `kiroo list`
123
- View your interaction history.
124
- - **Description**: Displays a paginated list of all recorded requests.
125
- - **Arguments**: None.
126
- - **Options**:
127
- - `-n, --limit <number>`: How many records to show (Default: 10).
128
- - `-o, --offset <number>`: How many records to skip (Default: 0).
129
- - **Example**:
130
- ```bash
131
- kiroo list -n 20
132
- ```
133
-
134
- ### `kiroo replay <id>`
135
- Re-run a specific interaction.
136
- - **Description**: Fetches the original request from history and executes it again.
137
- - **Arguments**:
138
- - `id`: The timestamp ID of the interaction (found via `kiroo list`).
139
- - **Example**:
140
- ```bash
141
- kiroo replay 2026-03-10T14-30-05-123Z
142
- ```
143
-
144
- ### `kiroo check <url>`
145
- Zero-Code Testing engine.
146
- - **Description**: Executes a request and runs assertions on the response. Exits with code 1 on failure.
147
- - **Prerequisites**: Access to the URL.
148
- - **Arguments**:
149
- - `url`: The endpoint.
150
- - **Options**:
151
- - `-m, --method <method>`: HTTP method (GET, POST, etc. Default: GET).
152
- - `-H, --header <key:value>`: Add custom headers.
153
- - `-d, --data <data>`: Request body.
154
- - `--status <numbers>`: Expected HTTP status code.
155
- - `--has <fields>`: Comma-separated list of expected fields in JSON.
156
- - `--match <key=val>`: Exact value matching for JSON fields.
157
- - **Example**:
158
- ```bash
159
- # Check if login is successful
160
- kiroo check /api/login -m POST -d "user=yash pass=123" --status 200 --has token
161
- ```
162
-
163
- ### `kiroo bench <url>`
164
- Local load testing and benchmarking.
165
- - **Description**: Sends multiple concurrent HTTP requests to measure endpoint performance (Latency, RPS, Error Rate).
166
- - **Prerequisites**: Access to the URL.
167
- - **Arguments**:
168
- - `url`: The endpoint (supports Auto-BaseURL).
169
- - **Options**:
170
- - `-m, --method <method>`: HTTP method (GET, POST, etc. Default: GET).
171
- - `-n, --number <number>`: Total requests to send (Default: 10).
172
- - `-c, --concurrent <number>`: Concurrent workers (Default: 1).
173
- - `-v, --verbose`: Show the HTTP status, response time, and truncated response body for every individual request instead of a single progress spinner.
174
- - `-H, --header <key:value>`: Add custom headers.
175
- - `-d, --data <data>`: Request body.
176
- - **Example**:
177
- ```bash
178
- # Send 100 requests in batches of 10
179
- kiroo bench /api/projects -n 100 -c 10
180
- ```
181
-
182
- ### `kiroo graph`
183
- Visualize API dependencies.
184
- - **Description**: Generates a tree view showing how data flows between endpoints via saved/used variables.
185
- - **Prerequisites**: Recorded interactions that use `--save` and `{{variable}}`.
186
- - **Example**:
187
- ```bash
188
- kiroo graph
189
- ```
190
-
191
- ### `kiroo stats`
192
- Analytics dashboard.
193
- - **Description**: Shows performance metrics, success rates, and identify slow endpoints.
194
- - **Example**:
195
- ```bash
196
- kiroo stats
197
- ```
198
-
199
- ### `kiroo import`
200
- Import from cURL.
201
- - **Description**: Converts a cURL command into a Kiroo interaction. Opens an interactive editor if no argument is provided.
202
- - **Arguments**:
203
- - `curl`: (Optional) The raw cURL string in quotes.
204
- - **Example**:
205
- ```bash
206
- kiroo import "curl https://api.exa.com -H 'Auth: 123'"
207
- ```
208
-
209
- ### `kiroo snapshot`
210
- Snapshot management.
211
- - **Commands**:
212
- - `save <tag>`: Save current history as a versioned state.
213
- - `list`: List all saved snapshots.
214
- - `compare <tag1> <tag2>`: Detect breaking changes between two states.
215
- - **Example**:
216
- ```bash
217
- kiroo snapshot compare v1.stable current
218
- ```
219
-
220
- ### `kiroo env`
221
- Environment & Variable management.
222
- - **Commands**:
223
- - `list`: View all environments and their variables.
224
- - `use <name>`: Switch active environment (e.g., `prod`, `local`).
225
- - `set <key> <value>`: Set a variable in the active environment.
226
- - `rm <key>`: Remove a variable.
227
- - **Example**:
228
- ```bash
229
- kiroo env set baseUrl https://api.myapp.com
230
- ```
231
-
232
- ### `kiroo clear`
233
- Wipe history.
234
- - **Description**: Deletes all recorded interactions to start fresh.
235
- - **Options**:
236
- - `-f, --force`: Clear without a confirmation prompt.
237
- - **Example**:
238
- ```bash
239
- kiroo clear --force
240
- ```
241
-
242
- ---
243
-
244
- ## 🀝 Contributing
245
-
246
- Kiroo is an open-source project and we love contributions! Check out our [Contribution Guidelines](CONTRIBUTING.md).
247
-
248
- ---
249
-
250
- ## πŸ“œ License
251
-
252
- Distributed under the MIT License. See `LICENSE` for more information.
253
-
254
- ---
255
-
256
- <div align="center">
257
- Built with ❀️ for Developers
258
- </div>
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
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18-green.svg)](https://nodejs.org/)
9
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](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>