$ apifire init --name demo --url https://api.example.com $ cp .env.example .env $ apifire validate $ apifire run --parallel
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.
On this page
Documentation path
One route for the full file-first workflow.
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 sectionInitialize
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 sectionAuthentication
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 sectionEnvironment
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 sectionRequests
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 sectionValidation
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 sectionVariables
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 sectionRun 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 sectionInstall
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
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.
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.
project/ ├── .apifire/ │ ├── config.yaml │ ├── auth.yaml │ └── requests/ │ └── example.yaml └── .env.example
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.
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.
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: 3600Environment
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.
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.
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.
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"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.
exists / not_exists
equals / not_equals
contains / matches
greater_than / less_than / greater_than_or_equal / less_than_or_equal
validate:
status: 200
body:
- path: "data.id"
operator: exists
- path: "data.name"
operator: equals
value: "test"
- path: "data.count"
operator: greater_than
value: 10Variables
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.
headers:
Authorization: "Bearer {{env.API_TOKEN}}"
body:
username: "{{env.USERNAME}}"
base_url: "{{config.base_url}}"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.
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 --parallel
Keep exploring
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.