Docs

Learn the full apifire workflow from install to repeatable API checks.

Use this page as the documentation hub for apifire. It connects installation, project scaffolding, authentication, request YAML structure, validation rules, variable usage, and the normal run flow into one file-first guide.

Core apifire flow
$ apifire init --name demo --url https://api.example.com
$ cp .env.example .env
$ apifire validate
$ apifire run --parallel

One route for the full file-first workflow.

01

Install

Start by getting the CLI onto your machine.

If apifire is not installed yet, use the download page for platform-specific binaries and setup paths. Once the binary is available, verify it before creating a project.

Jump to section
02

Initialize

Bootstrap a project with real files instead of starting from scratch.

apifire creates a small working structure under .apifire/ so your configuration, auth flow, and request definitions live in versioned files from the first command.

Jump to section
03

Authentication

Define authentication once and let the CLI reuse it across requests.

The auth file supports bearer_token, oauth2, api_key, and jwt setups. A common bearer-token flow posts credentials, extracts a token from the response, and attaches it to later requests.

Jump to section
04

Environment

Keep credentials in env files and feed them into YAML with template values.

Copy .env.example to .env, fill in credentials locally, and reference those values from auth and request files. This keeps sensitive values out of committed request definitions.

Jump to section
05

Requests

Describe each API check in a readable request YAML file.

Request files define the HTTP call, optional auth behavior, and the validation rules that decide whether a check passes. They are designed to stay small, explicit, and easy to review in a repo.

Jump to section
06

Validation

Use built-in operators to turn responses into repeatable checks.

Validation rules can assert status codes, existence checks, equality, comparisons, containment, and regex matches. Keep the expected outcome close to the request so failures are obvious in local runs and CI.

Jump to section
07

Variables

Reference env and config values directly in your YAML files.

Template variables let you keep request files flexible without rewriting the same values in multiple places. Use env-backed values for secrets and config-backed values for shared project settings.

Jump to section
08

Run and CI

Validate first, then run the suite locally or inside automation.

The normal loop is to validate the project files, run the suite, and use parallel execution when requests are independent. The same sequence fits CI because the workflow stays file-first and scriptable.

Jump to section
01

Start by getting the CLI onto your machine.

If apifire is not installed yet, use the download page for platform-specific binaries and setup paths. Once the binary is available, verify it before creating a project.

$ apifire --version $ apifire --help
Verify the install
$ apifire --version
$ apifire --help
02

Bootstrap a project with real files instead of starting from scratch.

apifire creates a small working structure under .apifire/ so your configuration, auth flow, and request definitions live in versioned files from the first command.

Scaffolds .apifire/config.yaml for base URL, headers, and timeout settings.

Creates .apifire/auth.yaml for login and token extraction.

Creates .apifire/requests/example.yaml as a request template.

Adds .env.example so credentials stay out of request files.

$ apifire init --name my-api-project --url https://api.example.com
Generated project structure
project/
├── .apifire/
│   ├── config.yaml
│   ├── auth.yaml
│   └── requests/
│       └── example.yaml
└── .env.example
03

Define authentication once and let the CLI reuse it across requests.

The auth file supports bearer_token, oauth2, api_key, and jwt setups. A common bearer-token flow posts credentials, extracts a token from the response, and attaches it to later requests.

Use endpoint and method to describe the login request.

Use body values with env-backed placeholders for secrets.

Use token_path to extract the token from the response body.

Use header_name and header_prefix to control how the token is sent.

$ apifire auth --token-only
Example auth.yaml
type: bearer_token
login:
  endpoint: /auth/login
  method: POST
  body:
    username: "{{env.USERNAME}}"
    password: "{{env.PASSWORD}}"
  token_path: "data.token"
  header_name: Authorization
  header_prefix: Bearer
  expires_in: 3600
04

Keep credentials in env files and feed them into YAML with template values.

Copy .env.example to .env, fill in credentials locally, and reference those values from auth and request files. This keeps sensitive values out of committed request definitions.

Create .env from .env.example before the first real run.

apifire reads from the project .env file and system environment variables.

Config values can also provide shared data for request templates.

$ cp .env.example .env
05

Describe each API check in a readable request YAML file.

Request files define the HTTP call, optional auth behavior, and the validation rules that decide whether a check passes. They are designed to stay small, explicit, and easy to review in a repo.

Use name, method, and endpoint for the core request definition.

Add headers, query, or body when the request needs more context.

Set auth to required, skip, or optional depending on the request.

Use validate, extract, and depends_on to turn requests into reusable workflows.

Example request file
name: Get User Info
method: GET
endpoint: /user/profile
auth: required
validate:
  status: 200
  body:
    - path: "data.id"
      operator: exists
    - path: "data.name"
      operator: equals
      value: "test"
extract:
  - name: user_id
    path: "data.id"
06

Use built-in operators to turn responses into repeatable checks.

Validation rules can assert status codes, existence checks, equality, comparisons, containment, and regex matches. Keep the expected outcome close to the request so failures are obvious in local runs and CI.

exists / not_exists

equals / not_equals

contains / matches

greater_than / less_than / greater_than_or_equal / less_than_or_equal

Validation block
validate:
  status: 200
  body:
    - path: "data.id"
      operator: exists
    - path: "data.name"
      operator: equals
      value: "test"
    - path: "data.count"
      operator: greater_than
      value: 10
07

Reference env and config values directly in your YAML files.

Template variables let you keep request files flexible without rewriting the same values in multiple places. Use env-backed values for secrets and config-backed values for shared project settings.

Use {{env.VARIABLE_NAME}} for environment variables.

Use {{config.VARIABLE_NAME}} for values defined in config.yaml.

Use extracted response values to feed later requests in the same workflow.

Template variable examples
headers:
  Authorization: "Bearer {{env.API_TOKEN}}"
body:
  username: "{{env.USERNAME}}"
  base_url: "{{config.base_url}}"
08

Validate first, then run the suite locally or inside automation.

The normal loop is to validate the project files, run the suite, and use parallel execution when requests are independent. The same sequence fits CI because the workflow stays file-first and scriptable.

Run validate before longer test runs to catch YAML and setup mistakes early.

Use run --parallel when requests do not depend on one another.

Use auth --token-only when a script only needs the token output.

$ apifire validate $ apifire run $ apifire run --skip-auth $ apifire -v run
CI-friendly command sequence
$ apifire validate
$ apifire run --parallel

Use the specialized pages when you want more detail.

Download

Use the install page for binaries, platform setup, and the first verification commands.

Quick Start

Follow the shortest path from installed CLI to scaffolded project and first run.

Commands

Jump into the focused command reference for init, run, auth, and validate.

Examples

Inspect the scaffolded YAML files and request examples as versioned assets.

Skills

See how Claude Code can translate natural-language apifire requests into verified commands.