{"id":20137084,"url":"https://github.com/ctrf-io/ctrf-cli","last_synced_at":"2026-02-08T17:18:45.158Z","repository":{"id":243553487,"uuid":"812742746","full_name":"ctrf-io/ctrf-cli","owner":"ctrf-io","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-11T19:47:46.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T20:31:09.738Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctrf-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-09T18:47:23.000Z","updated_at":"2025-01-11T19:47:49.000Z","dependencies_parsed_at":"2025-01-11T20:28:58.588Z","dependency_job_id":"b8628255-197b-43e7-a839-c04b4cb9d86c","html_url":"https://github.com/ctrf-io/ctrf-cli","commit_stats":null,"previous_names":["ctrf-io/ctrf-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrf-io%2Fctrf-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrf-io%2Fctrf-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrf-io%2Fctrf-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrf-io%2Fctrf-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctrf-io","download_url":"https://codeload.github.com/ctrf-io/ctrf-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233723207,"owners_count":18720107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T21:25:06.575Z","updated_at":"2025-09-21T06:32:28.332Z","avatar_url":"https://github.com/ctrf-io.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CTRF CLI\n\nVarious CTRF utilities available from the command line\n\n\u003cdiv align=\"center\"\u003e\n\u003cdiv style=\"padding: 1.5rem; border-radius: 8px; margin: 1rem 0; border: 1px solid #30363d;\"\u003e\n\u003cspan style=\"font-size: 23px;\"\u003e💚\u003c/span\u003e\n\u003ch3 style=\"margin: 1rem 0;\"\u003eCTRF tooling is open source and free to use\u003c/h3\u003e\n\u003cp style=\"font-size: 16px;\"\u003eYou can support the project with a follow and a star\u003c/p\u003e\n\n\u003cdiv style=\"margin-top: 1.5rem;\"\u003e\n\u003ca href=\"https://github.com/ctrf-io/ctrf-cli\"\u003e\n\u003cimg src=\"https://img.shields.io/github/stars/ctrf-io/ctrf-cli?style=for-the-badge\u0026color=2ea043\" alt=\"GitHub stars\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/ctrf-io\"\u003e\n\u003cimg src=\"https://img.shields.io/github/followers/ctrf-io?style=for-the-badge\u0026color=2ea043\" alt=\"GitHub followers\"\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\n\u003cp style=\"font-size: 14px; margin: 1rem 0;\"\u003e\nMaintained by \u003ca href=\"https://github.com/ma11hewthomas\"\u003eMatthew Thomas\u003c/a\u003e\u003cbr/\u003e\nContributions are very welcome! \u003cbr/\u003e\nExplore more \u003ca href=\"https://www.ctrf.io/integrations\"\u003eintegrations\u003c/a\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\n## Command Line Utilities\n\n| Name         |Details                                                                              |\n| ------------ | ----------------------------------------------------------------------------------- |\n| `merge`      | Merge multiple CTRF reports into a single report.                                   |\n| `flaky`      | Output flaky test name and retries.                                                 |\n\n## Merge\n\nThis might be useful if you need a single report, but your chosen reporter generates multiple reports through design, parallelisation or otherwise.\n\nTo merge CTRF reports in a specified directory, use the following command:\n\n```sh\nnpx ctrf-cli merge \u003cdirectory\u003e\n```\n\nReplace `directory` with the path to the directory containing the CTRF reports you want to merge.\n\n### Options\n\n-o, --output `filename`: Output file name for the merged report. Default is ctrf-report.json.\n\n```sh\nnpx ctrf-cli merge \u003cdirectory\u003e --output my-merged-report.json\n```\n\n-d, --output-dir `directory`: Output directory for the merged report. Default is the same directory as the input reports.\n\n```sh\nnpx ctrf-cli merge \u003cdirectory\u003e --output-dir /path/to/output\n```\n\n-k, --keep-reports: Keep existing reports after merging. By default, the original reports will be deleted after merging.\n\n```sh\nnpx ctrf-cli merge \u003cdirectory\u003e --keep-reports\n```\n\n## Flaky\n\nThe flaky command is useful for identifying tests marked as flaky in your CTRF report. Flaky tests are tests that pass or fail inconsistently and may require special attention or retries to determine their reliability.\n\nUsage\nTo output flaky tests, use the following command:\n\n```sh\nnpx ctrf-cli flaky \u003cfile-path\u003e\n```\n\nReplace \u003cfile-path\u003e with the path to the CTRF report file you want to analyze.\n\n### Output\n\nThe command will output the names of the flaky tests and the number of retries each test has undergone. For example:\n\n```zsh\nProcessing report: reports/sample-report.json\nFound 1 flaky test(s) in reports/sample-report.json:\n- Test Name: Test 1, Retries: 2\n```\n\n## What is CTRF?\n\nCTRF is a universal JSON test report schema that addresses the lack of a standardized format for JSON test reports.\n\n**Consistency Across Tools:** Different testing tools and frameworks often produce reports in varied formats. CTRF ensures a uniform structure, making it easier to understand and compare reports, regardless of the testing tool used.\n\n**Language and Framework Agnostic:** It provides a universal reporting schema that works seamlessly with any programming language and testing framework.\n\n**Facilitates Better Analysis:** With a standardized format, programatically analyzing test outcomes across multiple platforms becomes more straightforward.\n\n## Support Us\n\nIf you find this project useful, consider giving it a GitHub star ⭐ It means a lot to us.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrf-io%2Fctrf-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctrf-io%2Fctrf-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrf-io%2Fctrf-cli/lists"}