{"id":47803820,"url":"https://github.com/mpecan/codecov-query","last_synced_at":"2026-04-03T17:21:10.775Z","repository":{"id":342562210,"uuid":"1174440162","full_name":"mpecan/codecov-query","owner":"mpecan","description":"CLI tool to query the Codecov API v2 — coverage totals, commits, branches, PRs, comparisons, and more","archived":false,"fork":false,"pushed_at":"2026-03-06T13:02:09.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-06T15:32:13.862Z","etag":null,"topics":["api","cli","codecov","coverage","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/mpecan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-06T12:51:55.000Z","updated_at":"2026-03-06T13:02:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mpecan/codecov-query","commit_stats":null,"previous_names":["mpecan/codecov-query"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mpecan/codecov-query","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpecan%2Fcodecov-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpecan%2Fcodecov-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpecan%2Fcodecov-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpecan%2Fcodecov-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpecan","download_url":"https://codeload.github.com/mpecan/codecov-query/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpecan%2Fcodecov-query/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31365640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:13:05.644Z","status":"ssl_error","status_checked_at":"2026-04-03T17:13:04.413Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","cli","codecov","coverage","rust"],"created_at":"2026-04-03T17:21:10.099Z","updated_at":"2026-04-03T17:21:10.769Z","avatar_url":"https://github.com/mpecan.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codecov-query\n\nA CLI tool to query the [Codecov API v2](https://docs.codecov.com/reference). Designed for both human users and LLM-driven workflows.\n\nUnlike the official [codecov-cli](https://github.com/codecov/codecov-cli) (which focuses on *uploading* coverage reports), `codecov-query` is a **read-only** tool for retrieving coverage data — totals, commits, branches, pull requests, comparisons, file reports, flags, and components.\n\n## Installation\n\n### From crates.io\n\n```sh\ncargo install codecov-query\n```\n\n### From source\n\n```sh\ngit clone https://github.com/mpecan/codecov-query\ncd codecov-query\ncargo install --path .\n```\n\n### Pre-built binaries\n\nDownload from [GitHub Releases](https://github.com/mpecan/codecov-query/releases).\n\n## Authentication\n\nA Codecov API token is required. Provide it via:\n\n- `--token \u003cTOKEN\u003e` flag, or\n- `CODECOV_TOKEN` environment variable\n\nGenerate a token at [codecov.io/account](https://app.codecov.io/account).\n\n## Usage\n\n### Auto-detection\n\nWhen run inside a git repository, `codecov-query` automatically detects the owner and repo from the `origin` remote. You can override with `--owner` / `--repo`.\n\n### Output formats\n\n- `--format text` (default) — human-readable summary, compact and agent-friendly\n- `--format json` — structured JSON, ideal for piping to `jq` or feeding to LLMs\n\n### Examples\n\n```sh\n# Coverage totals (auto-detect repo from git remote)\ncodecov-query totals\ncodecov-query totals --branch main --format text\n\n# Explicit owner/repo\ncodecov-query --owner mpecan --repo myproject totals\n\n# List repositories\ncodecov-query --owner mpecan repos --active true\n\n# List commits\ncodecov-query commits --branch main --page-size 5\n\n# Get a specific commit\ncodecov-query commit abc123def\n\n# Branches\ncodecov-query branches\ncodecov-query branch main\n\n# Pull requests\ncodecov-query pulls --state open\ncodecov-query pull 42\n\n# Compare coverage\ncodecov-query compare --pullid 42\ncodecov-query compare --pullid 42 --summary   # filtered to changed files only\ncodecov-query compare --base abc123 --head def456\n\n# PR coverage summary (combines pull + compare into one view)\ncodecov-query pr-summary 42\n\n# File-level coverage\ncodecov-query file-report src/main.rs --branch main\n\n# Flags and components\ncodecov-query flags\ncodecov-query components\n\n# Pipe to jq (use --format json for structured output)\ncodecov-query totals --format json | jq '.totals.coverage'\n```\n\n## Subcommands\n\n| Subcommand | Description | Key arguments |\n|---|---|---|\n| `repos` | List repositories for an owner | `--active`, `--search`, `--names` |\n| `repo` | Get repository details | — |\n| `totals` | Coverage totals | `--sha`, `--branch`, `--path`, `--flag`, `--component-id` |\n| `commits` | List commits | `--branch` |\n| `commit` | Get a specific commit | positional `commitid` |\n| `branches` | List branches | — |\n| `branch` | Get a specific branch | positional `name` |\n| `pulls` | List pull requests | `--state`, `--start-date`, `--ordering` |\n| `pull` | Get a specific PR | positional `pullid` |\n| `compare` | Compare coverage | `--base` + `--head` OR `--pullid`, `--summary` |\n| `pr-summary` | PR coverage summary with uncovered line ranges | positional `pullid` |\n| `file-report` | File-level coverage | positional `path`, `--sha`, `--branch` |\n| `flags` | List flags | — |\n| `components` | List components | — |\n\nAll list subcommands support `--page` and `--page-size` for pagination.\n\n## Global options\n\n| Option | Description | Default |\n|---|---|---|\n| `--token` | Codecov API token (or `CODECOV_TOKEN` env) | required |\n| `--service` | Git hosting service | `github` |\n| `--owner` / `-o` | Repository owner | auto-detected |\n| `--repo` / `-r` | Repository name | auto-detected |\n| `--format` | Output format (`json` or `text`) | `text` |\n\nSupported services: `github`, `gitlab`, `bitbucket`, `github-enterprise`, `gitlab-enterprise`, `bitbucket-server`.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpecan%2Fcodecov-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpecan%2Fcodecov-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpecan%2Fcodecov-query/lists"}