flakiness
v0.290.0
Published
Downloads
3,241
Readme
Flakiness CLI
A command-line interface for interacting with flakiness.io service.
Installation
npm install -g flakinessOr run directly with npx:
npx flakiness <command>Commands
Authentication
# Login to flakiness.io (opens browser for authentication)
flakiness auth login
# Show current logged-in user
flakiness auth status
# Logout from current session
flakiness auth logoutUpload Reports
Upload Flakiness report files to the service:
# Upload with access token
flakiness upload ./flakiness-report/report.json --access-token <token>
# Upload via CI OIDC (no token needed if report contains flakinessProject)
flakiness upload ./flakiness-report/report.json
# Upload with custom endpoint
flakiness upload ./report.json --endpoint https://custom.flakiness.ioThe CLI authenticates without an access token when CI can mint an OIDC token for it and the report contains a flakinessProject field. Reporters set flakinessProject automatically. Two providers are supported:
- GitHub Actions — grant the job
id-token: writepermission. - GitLab CI/CD (gitlab.com only) — declare a
FLAKINESS_ID_TOKENentry underid_tokens:in.gitlab-ci.yml, withaudset to yourorg/project.
Options:
-t, --access-token <token>— Read-write access token (env:FLAKINESS_ACCESS_TOKEN)-e, --endpoint <url>— Service endpoint (env:FLAKINESS_ENDPOINT)
Download Reports
Download reports from a flakiness.io project:
# Download all reports since a date
flakiness download --project myorg/myproject --since 2024-01-01
# Download a specific run
flakiness download --project myorg/myproject --run-id 123
# Download with parallel jobs
flakiness download --project myorg/myproject --since 2024-01-01 -j 4View Reports
Open a local Flakiness report in the browser:
# Show report from default directory (flakiness-report)
flakiness show
# Show report from specific path
flakiness show ./path/to/reportConvert JUnit XML
Deprecated.
flakiness convert-junitis deprecated and will be removed in a future release. Use@flakiness/junit-xmlinstead — it converts JUnit XML and uploads it to flakiness.io in a single step:npx @flakiness/junit-xml --flakiness-project myorg/myproject ./test-results
Environment Variables
| Variable | Description |
|----------|-------------|
| FLAKINESS_ACCESS_TOKEN | Read-write access token for authentication |
| FLAKINESS_PROJECT | Flakiness.io project in org/project format (for OIDC uploads) |
| FLAKINESS_ID_TOKEN | GitLab CI/CD ID token, set by an id_tokens: entry in .gitlab-ci.yml |
| FLAKINESS_ENDPOINT | Custom service endpoint URL |
License
Fair Source 100
