Rust CLI for uploading test output to Trunk Flaky Tests. Please follow the instructions to start uploading or check out our docs. This is downloaded automatically using the Trunk launcher and when using the analytics-uploader GitHub Action.
--token / TRUNK_API_TOKEN takes a v2 API key (trunk_v2_...). Create one at https://app.trunk.io/settings/developer/api-tokens, and give it the Upload test results (upload_test_results) permission.
With the trunk CLI, store the key once with trunk auth api-key set, and trunk flakytests passes a credential for you. It may pass a short-lived Trunk token instead of the key; you don't need to manage it.
analytics-cli 1.0.0 refuses any other token, the organization token included, before it calls Trunk. Pin analytics-cli 0.17.x to keep using the organization token until December 1, 2027. To upgrade from 0.17.x, see UPGRADING.md.
If Trunk answers 403 because the key lacks the Upload test results permission, edit the key on the API Keys screen to add it.
--allow-forked-pr-uploads uploads with no token, only from a GitHub Actions run of a pull request from a fork. The job needs GITHUB_TOKEN in its environment.
For more information about how to build and run the Rust CLI, please see CONTRIBUTING.md.