The API testing CLIthat
Diagnose failures, suggest next calls, generate flows — powered by your local history.
$kest whycurl -fsSL https://kest.dev/install.sh | shWrite Markdown. Run Tests.
Define API flows in .flow.md files. Kest executes them with assertions and variable chaining.
# Auth & Profile Flow
## 1. Login
```kest
POST /api/v1/login
{
"username": "admin",
"password": "secret"
}
[Captures]
token: data.access_token
user_id: data.user.id
[Asserts]
status == 200
body.data.access_token exists
body.data.password !exists
duration < 500ms
```
## 2. Get Profile
```kest
GET /api/v1/users/{{user_id}}
Authorization: Bearer {{token}}
[Asserts]
status == 200
body.data.username != ""
```Every request logged.
AI-ready.
Kest automatically generates structured session logs for every command. Feed the log path to Cursor or Windsurf — your AI agent gets full request/response context for instant debugging.
[2025-02-08 11:02:34] Flow: auth.flow.md
[2025-02-08 11:02:34] Step 1: POST /api/v1/login
→ Request:
POST http://localhost:8080/api/v1/login
Content-Type: application/json
{"username":"admin","password":"secret"}
← Response: 200 OK (127ms)
{"code":0,"data":{"access_token":"eyJhbG...","user":{"id":42,"username":"admin"}}}
✅ status == 200
✅ body.data.access_token exists
✅ body.data.password !exists
✅ duration < 500ms (actual: 127ms)
📌 Captured: token = eyJhbGciOi...
📌 Captured: user_id = 42
[2025-02-08 11:02:34] Step 2: GET /api/v1/users/42
→ Request:
GET http://localhost:8080/api/v1/users/42
Authorization: Bearer eyJhbGciOi...
← Response: 200 OK (43ms)
{"code":0,"data":{"id":42,"username":"admin","email":"admin@kest.dev"}}
✅ status == 200
✅ body.data.username != ""
[2025-02-08 11:02:34] Summary: 6/6 passed, 0 failedMore than just requests.
Debug, replay, diff, and manage environments — all from the CLI.
kest run auth.flow.mdExecute multi-step flow files with assertions and variable chaining
kest whyAI diagnoses why your last request failed using local history context
kest replay last --diffRe-run the last request and diff the response to detect regressions
kest mock --port 8080Zero-config mock server that serves recorded responses from history
kest snap /api/users --verifySave and verify API response snapshots — like Jest, but for APIs
kest watch login.flow.mdAuto-rerun flow files on save — TDD workflow for API testing
kest historyBrowse all previous requests stored in local SQLite database
kest gen "test user flow"AI generates a complete .flow.md from a natural language description
kest env use stagingSwitch API base URL between local, staging, and production
Why Kest?
Built for engineers who ship fast and test harder.
AI-Powered
kest why diagnoses failures, kest suggest recommends next calls, kest gen creates flows from text.
Flow Files
Chain multi-step API tests in Markdown. Variables propagate automatically.
Mock Server
Zero-config mock server from your request history. kest mock --port 8080.
Snapshot Testing
Save and verify API snapshots. Detect field changes like Jest for APIs.
Variable Chaining
Capture response data with -c and inject with {{var}} across requests.
Replay & Diff
Re-run any previous request and diff responses to catch regressions.
Multi-Environment
Switch between dev/staging/prod with kest env. Credentials stay safe.
Git-Native
Flow files live in your repo. Version tests alongside your code.