{"id":45034677,"url":"https://github.com/karldreher/cfpages-prune","last_synced_at":"2026-02-19T06:12:50.615Z","repository":{"id":45184868,"uuid":"419946730","full_name":"karldreher/cfpages-prune","owner":"karldreher","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-05T04:03:29.000Z","size":118,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-07T08:32:06.182Z","etag":null,"topics":["cloudflare","cloudflare-pages"],"latest_commit_sha":null,"homepage":"","language":"Python","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/karldreher.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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":"2021-10-22T02:55:58.000Z","updated_at":"2024-09-05T04:03:31.000Z","dependencies_parsed_at":"2023-11-14T04:28:24.919Z","dependency_job_id":"33a1603b-3976-47a3-8a43-3a54738c7a57","html_url":"https://github.com/karldreher/cfpages-prune","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/karldreher/cfpages-prune","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karldreher%2Fcfpages-prune","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karldreher%2Fcfpages-prune/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karldreher%2Fcfpages-prune/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karldreher%2Fcfpages-prune/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karldreher","download_url":"https://codeload.github.com/karldreher/cfpages-prune/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karldreher%2Fcfpages-prune/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29604552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T05:11:50.834Z","status":"ssl_error","status_checked_at":"2026-02-19T05:11:38.921Z","response_time":117,"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":["cloudflare","cloudflare-pages"],"created_at":"2026-02-19T06:12:50.543Z","updated_at":"2026-02-19T06:12:50.595Z","avatar_url":"https://github.com/karldreher.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cfpages-prune\n\nThis project contains a Python script for deleting preview deployments of **any** (up to and including all) Cloudflare Pages projects within an account.  It is intended to be run as a scheduled job, e.g. with Github Actions.\n\n## Build\n\nThe project uses Poetry to conduct builds.  When building locally, ensure Poetry is installed:\n```bash\npip --install poetry\npoetry install\n```\n\nIf developing locally, it's reccomended that you install the `dev` poetry group:\n```bash\npoetry install --with=dev\n```\n\n## Usage\n\nThis tool is designed with CI/CD in mind, and is appropriate for automated, scheduled use.\n\nThis tool is easiest to install using Pipx, after which it can be run using a convenient name:\n```bash\npipx install git+https://github.com/karldreher/cfpages-prune.git\ncfpages-prune\n\n```\n\nThe tool assumes that the following environment variables are set:\n\n`CF_ACCOUNT_ID` - This corresponds to your Cloudflare Account ID.\n\n`CF_AUTH_EMAIL` - The email address with access to this Cloudflare account.\n\n`CF_API_KEY` - This **MUST** be a Global API key.  This is not a limitation of this tool, but one of the Cloudflare API.  (Pages projects **read** access currently requires this.)\n\n\n### Options\nOther options which can manipulate usage can be described succinctly using `--help`:\n\n```\n\u003e cfpages-prune --help\nusage: cfpages-prune [-h] [--list-projects] [--projects PROJECTS] [--projectids PROJECTIDS] [--redact] [--force] [--whatif]\n\noptions:\n  -h, --help            show this help message and exit\n  --list-projects       List all projects and exit. Ignores other arguments.\n  --projects PROJECTS, --project PROJECTS\n                        Comma-delimited list of project names where revisions should be deleted. Default: All projects\n  --projectids PROJECTIDS, --projectid PROJECTIDS\n                        Comma-delimited list of project IDs where revisions should be deleted. Default: All projects\n  --redact              When \"--redact\" is used, project names will be replaced with IDs in log output. Cannot be used in\n                        conjunction with --projects.\n  --force               Force deletion of all revisions, including those in production environments. Use with extreme\n                        caution.\n  --whatif, --dry-run   When \"--whatif\" or \"--dry-run\" is used, delete action will be skipped.\n```\n\n### Safety\nThis tool is designed with **safety** and **privacy** in mind.\nAs explained by `--help`, the options `--redact` and `--whatif` are designed for DevOps engineers to mask output in a way that can be used in a multitude of environments and secure scenarios, as well as safely test.\n\n### Usage Examples\n\nDelete only projects in `my-cool-project` and `the-awesome-project`:\n```\ncfpages-prune --projects my-cool-project,the-awesome-project\n```\n\nSafely see what operations will be performed on Cloudflare project IDs 206509b1-db55-4674-8a67-ad5089cf81fc and ab2d7740-ebd2-4701-b2ff-dfb3dcbc8d29:\n```\ncfpages-prune --projectids 206509b1-db55-4674-8a67-ad5089cf81fc,ab2d7740-ebd2-4701-b2ff-dfb3dcbc8d29 --whatif\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarldreher%2Fcfpages-prune","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarldreher%2Fcfpages-prune","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarldreher%2Fcfpages-prune/lists"}