Declarative API testing for CI/CD pipelines. Define requests in YAML, assert responses, run anywhere.
No accounts. No dashboards. No proprietary formats. Single binary, plain YAML, Git-native.
# Install
curl -sSfL https://raw.githubusercontent.com/aalvaropc/lynix/main/install.sh | sh
# Initialize workspace
cd your-project && lynix init --path .
# Run your first collection
lynix run -c demo -e devschema_version: 1
name: Auth Flow
vars:
base_url: "https://api.example.com"
requests:
- name: login
method: POST
url: "{{base_url}}/auth/login"
headers:
Content-Type: "application/json"
json:
username: "{{username}}"
password: "{{password}}"
assert:
status: 200
max_ms: 500
jsonpath:
"$.token":
exists: true
extract:
auth_token: "$.token"
- name: list-users
method: GET
url: "{{base_url}}/v1/users"
headers:
Authorization: "Bearer {{auth_token}}"
assert:
status: 200
schema: "schemas/user-list.json"
jsonpath:
"$.total":
gt: 0- uses: aalvaropc/lynix@v1
with:
collection: smoke-tests
environment: prod- name: Run API tests
run: lynix run -c smoke-tests -e prod --no-save --report junit --report-path results.xml
- name: Publish test report
uses: dorny/test-reporter@v1
if: always()
with:
name: API Tests
path: results.xml
reporter: java-junitExit codes: 0 all passed · 1 assertion failures · 2 usage/config error · 3 execution error (network, timeout).
| Method | Command |
|---|---|
| Quick install | curl -sSfL https://raw.githubusercontent.com/aalvaropc/lynix/main/install.sh | sh |
| Homebrew | brew install aalvaropc/tap/lynix |
| Go install | go install github.com/aalvaropc/lynix/cmd/lynix@latest |
| Manual | Download from Releases |
| Source | git clone && make build |
See Getting Started for detailed installation instructions and workspace setup.
- Headless CI mode --
lynix runwith JSON or JUnit XML output and differentiated exit codes (1assert failures,2config errors,3network errors) - Assertions -- status (single or list), latency, raw body (any content type), JSONPath (12 operators incl.
len,gte,not_matches), JSON Schema (Draft 7 & 2020-12) - Variable chaining -- extract values from responses, inject into later requests, and assert against them (
eq: "{{created_id}}") - CI secrets without files --
{{$env.API_TOKEN}}reads the process environment;--var key=valueoverrides anything - Secret redaction by default -- headers, bodies, query strings, error messages, and assertion output are scrubbed before artifacts or reports are written;
fail_on_detected_secretgates the save - Run history --
lynix runs list|show|diffcompares stored runs: status changes, latency deltas, assertion regressions - Parallel execution -- dependency-graph scheduling of independent requests (
--parallel) - Git-friendly -- collections, environments, and artifacts are plain text you can diff and review
- Import from curl & Postman -- convert existing API definitions to Lynix YAML
- Single binary -- one Go executable, no runtime dependencies
See the CHANGELOG and ROADMAP.
The examples/ directory contains runnable examples -- no API keys required:
| Example | What it shows |
|---|---|
| health-check | Single GET with status, latency, and JSONPath assertions |
| rest-crud | Full CRUD lifecycle with JSON Schema validation |
| auth-chain | Login, extract token, chain into authenticated requests |
lynix run -c examples/health-check/collection.yaml -e examples/health-check/env.yaml --no-save| Topic | Link |
|---|---|
| Getting Started | docs/getting-started.md |
| Collection Format | docs/collections.md |
| Environments & Config | docs/environments.md |
| CLI Reference | docs/cli-reference.md |
| CI/CD Integration | docs/ci-cd.md |
| Run Artifacts | docs/run-artifacts.md |
| Importing (curl/Postman) | docs/importing.md |
| Architecture & Development | docs/architecture.md |
| Editor Integration | docs/editor-integration.md |
| Error Handling | docs/error-handling.md |
MIT