Documentation as code

Kest Flow

Transform your API documentation into executable test suites. The most natural way to test complex business scenarios.

Core Philosophy

Documentation that
actually executes.

Traditional API testing requires jumping between tools, maintaining separate scripts, and keeping documentation in sync. Kest Flow eliminates this friction.

Chain Testing

Link multiple API calls into a single business flow with variable chaining.

Live Variables

Capture response data, inject with {{var}}, and use built-in {{$randomInt}}.

Markdown Native

Write tests in .flow.md files — the format you already use for docs.

Logical Asserts

exists, !exists, duration < 500ms — assertions that read like English.

Exec Steps

Run shell commands with @type exec for HMAC signing, token generation, or any pre-processing.

Flow Graph

New ```step / ```edge blocks for complete flow graphs with Mermaid preview.

user_auth.flow.md
# User Registration Flow
```step
@id register
@name Register User
POST /api/v1/register
Content-Type: application/json
{
"username": "user_{{$randomInt}}",
"password": "secure123"
}
[Captures]
user_id = data.id
username = data.username
[Asserts]
status == 201
body.data.password !exists
```
```step
@id login
@name Login
@retry 2
POST /api/v1/login
{
"username": "{{username}}",
"password": "secure123"
}
[Captures]
token = data.access_token
[Asserts]
status == 200
duration < 500
```
```edge
@from register
@to login
@on success
```

How It Works

Three simple steps to automate your entire API ecosystem.

1

Write Markdown

Create a .flow.md file. Add steps using kest code blocks. Describe your API calls naturally.

2

Capture & Assert

Define [Captures] to store response data and [Asserts] to verify business logic.

3

Run Anywhere

Run kest run flow.md locally, or execute on Kest Cloud with real-time SSE streaming and team-shared reports.

Example Scenario

Notice how project_id is captured in Step 2 and injected into the URL in Step 3 using {{project_id}} syntax.

Dynamic variable propagation
Built-in variables ({{$randomInt}} and more)
Duration & existence assertions
Exec steps for shell commands and HMAC signing
full_flow.md
# 🌊 Auth & Workspace Flow

## 1. User Login

```kest
POST /api/v1/auth/login
{
  "username": "admin",
  "password": "password123"
}

[Captures]
token: data.access_token
user_id: data.user.id

[Asserts]
status == 200
body.data.access_token exists
body.data.password !exists
```

## 2. Create Project

```kest
POST /api/v1/projects
Authorization: Bearer {{token}}
{
  "name": "New Analytics Engine",
  "slug": "analytics-{{$randomInt}}",
  "description": "Built with Kest Flow"
}

[Captures]
project_id: data.id

[Asserts]
status == 201
duration < 1000ms
```

## 3. Verify Project

```kest
GET /api/v1/projects/{{project_id}}
Authorization: Bearer {{token}}

[Asserts]
status == 200
body.name == "New Analytics Engine"
```

Engineered for Production

Exec Steps

Run shell commands as flow steps with @type exec. Generate HMAC signatures, tokens, or any dynamic data inline.

Flow Graph & Edges

Define step dependencies with ```edge blocks. Visualize flow graphs with Mermaid preview in verbose mode.

High Performance

Written in Go. Executes complex assertions with sub-millisecond overhead. Parallel execution across cores.

JSON Explorer

Extract data from nested JSON arrays and objects using dot notation or GJSON syntax.

Testing Skills

Master the art of API testing with Kest Flow's core capabilities.

The Soul of Testing: Assertions

Assertions are more than just "checking for OK". They verify that your API is delivering the exact business value expected. In Kest, assertions are lightweight yet powerful.

[Asserts]
status == 200
body.data.access_token exists
body.data.password !exists
body.data.username != ""
duration < 500ms

* A test without assertions is just a ping.

Visibility: The Debugging Skill

When a flow fails, you need to see exactly what happened under the hood. Kest provides deep visibility without cluttering your tests.

# Run flow with raw request & response details
$kest run auth.flow.md--verbose

Combine Assertions for continuous verification and Verbose Logging for rapid troubleshooting.

Stop Testing APIs.
Start Following Flows.

Experience the future of API testing and documentation. Open-source, local-first, AI-ready.