CLI Built-in Assertions
CLI v1.0.0•May 14, 2026
atra cli ships with first-class assertion support — status, headers, body, JSON path, and response time — with proper exit codes for CI/CD pipelines.
What you can assert
atra GET https://api.example.com/users \
-a "status eq 200" \
-a "$.users[0].id exists" \
-a "header content-type contains json" \
-a "response_time lt 500" \
-a "body contains success"
Targets:
status— HTTP status coderesponse_time— wall-clock response time in millisecondsheader <name>— response header value (case-insensitive)body— full response body as string$.path— JSON path with dot notation and array indexing ($.users[0].name)
Operators
Each operator has a short and long form — use whichever reads naturally:
| Short | Long | Description |
|---|---|---|
eq | equals | Exact match |
neq | not_equals | Not equal |
gt | greater_than | Numeric greater than |
lt | less_than | Numeric less than |
contains | String contains | |
exists | Value present (not null) | |
is_type | JSON type check (string, number, array, ...) | |
matches_regex | Regex pattern match |
Exit codes
0 on full pass, 1 on any failure. That's all CI needs. Add atra to a GitHub Action and you have a smoke test in three lines:
- run: curl -sSL https://cli.atrahasis.dev | sh
- run: atra GET https://api.example.com/health -a "status eq 200" -a "response_time lt 500"
Or skip the install entirely with npx --yes @atrahasis/cli.