CLI Built-in Assertions

CLI v1.0.0May 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 code
  • response_time — wall-clock response time in milliseconds
  • header <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:

ShortLongDescription
eqequalsExact match
neqnot_equalsNot equal
gtgreater_thanNumeric greater than
ltless_thanNumeric less than
containsString contains
existsValue present (not null)
is_typeJSON type check (string, number, array, ...)
matches_regexRegex 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.