Open Source · Written in Go · v0.7.0

The API testing CLIthat

Diagnose failures, suggest next calls, generate flows — powered by your local history.

$kest why
curl -fsSL https://kest.dev/install.sh | sh
terminal — kest replaces curl
# Replace curl with readable commands
$ kest get /api/users
200 OK (34ms) — 12 items
# POST with JSON, capture token, assert status
$ kest post /api/login -d '{"user":"admin","pass":"123"}' -c "token=data.token" -a "status==200"
✅ status == 200 (89ms)
↳ Captured: token = eyJhbGciOi...
# Use captured variables in next request
$ kest get /api/me -H "Authorization: Bearer {{token}}"
200 OK (27ms) — user: admin
# Or run a full flow file
$ kest run auth.flow.md
✨ 6/6 assertions passed, 2 captures
# Every command generates AI-ready session logs
$ cat .kest/logs/session_20250208.log
[11:02:34] POST /api/login → 200 OK (89ms)
[11:02:34] Request: {"user":"admin","pass":"123"}
[11:02:34] Response: {"token":"eyJhbG...","user_id":42}
[11:02:34] ✅ status == 200 | 📌 Captured: token
→ Feed this log to Cursor / Windsurf for AI-powered debugging

Write Markdown. Run Tests.

Define API flows in .flow.md files. Kest executes them with assertions and variable chaining.

auth.flow.md
# 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 != ""
```
kest run auth.flow.md
🚀 Running Flow: Auth & Profile Flow
--- Step 1: POST /api/v1/login ---
✅ status == 200
✅ body.data.access_token exists
✅ body.data.password !exists
✅ duration < 500ms (127ms)
↳ Captured: token = eyJhbGciOi...
↳ Captured: user_id = 42
--- Step 2: GET /api/v1/users/42 ---
✅ status == 200
✅ body.data.username != ""
✨ All steps passed!6/6 assertions, 2 captures
📄 Session log: .kest/logs/session_20250208_001.log
Session Logs

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.

Full request headers, body, and timing
Complete response with status and JSON body
Assertion results with expected vs actual
Variable capture trail across steps
.kest/logs/session_20250208_001.log
[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 failed

More than just requests.

Debug, replay, diff, and manage environments — all from the CLI.

Flow
kest run auth.flow.md

Execute multi-step flow files with assertions and variable chaining

AI
kest why

AI diagnoses why your last request failed using local history context

Verify
kest replay last --diff

Re-run the last request and diff the response to detect regressions

Mock
kest mock --port 8080

Zero-config mock server that serves recorded responses from history

Snap
kest snap /api/users --verify

Save and verify API response snapshots — like Jest, but for APIs

Watch
kest watch login.flow.md

Auto-rerun flow files on save — TDD workflow for API testing

History
kest history

Browse all previous requests stored in local SQLite database

AI
kest gen "test user flow"

AI generates a complete .flow.md from a natural language description

Env
kest env use staging

Switch 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.

Start testing in 10 seconds.

One command to install. One command to test.

curl -fsSL https://kest.dev/install.sh | sh