Getting Started
Install the CLI
Section titled “Install the CLI”curl -fsSL https://app.gaffer.sh/install.sh | shThis installs the gaffer binary to ~/.local/bin. The script detects your OS and architecture automatically.
Initialize your project
Section titled “Initialize your project”Run gaffer init in your project root:
gaffer initThe setup wizard will:
- Detect your test frameworks — Vitest, Playwright, Jest, pytest, Go, RSpec
- Show reporter setup instructions — so your framework outputs a format Gaffer can parse (JUnit XML, CTRF, or native)
- Authenticate via browser (optional) — creates an API token for syncing results to the dashboard
- Write
.gaffer/config.toml— stores your token and report patterns - Add
.gaffer/to.gitignore
Run your tests
Section titled “Run your tests”Wrap your existing test command with gaffer test:
gaffer test -- npm testGaffer runs your command, parses the results, and prints an enriched summary:
gaffer 40 passed 2 failed 3 skipped 12.4sHealth: 87 (good) ^ Slow: p95 245.3msFlaky: 2 tests src/auth.test.ts > login — 40% flip rate (4/10 runs) src/api.test.ts > timeout handler — 20% flip rate (2/10 runs)Coverage: 78.5% lines (1234/1572)Synced: 1 run uploadedWorks with any test command — pytest, go test ./..., cargo test, pnpm test, etc.
Sync to the dashboard
Section titled “Sync to the dashboard”If you authenticated during gaffer init, results sync automatically after each run. If you skipped that step:
- Sign up and create a project
- Copy the API token from your project settings
- Add it to your config:
gaffer init # re-run to authenticate via browserOr set the token directly:
[project]token = "gaf_..."Once synced, your team can view test history, trends, and analytics in the dashboard.
Add to CI
Section titled “Add to CI”Install the CLI and set GAFFER_TOKEN as a secret. Example for GitHub Actions (see the full GitHub Actions guide for more options):
- name: Install Gaffer CLI run: curl -fsSL https://app.gaffer.sh/install.sh | sh
- name: Run tests run: gaffer test -- npm test env: GAFFER_TOKEN: ${{ secrets.GAFFER_TOKEN }}Next steps
Section titled “Next steps” CLI Reference All commands, flags, and configuration options.
MCP Server Give AI coding agents structured access to your test data.
CI Providers Setup guides for GitHub Actions, GitLab CI, CircleCI, and more.
Upload API Upload reports directly via HTTP without the CLI.