{"id":50671324,"url":"https://github.com/michaelnisi/refuse","last_synced_at":"2026-06-08T11:05:59.820Z","repository":{"id":358059935,"uuid":"1239766148","full_name":"michaelnisi/refuse","owner":"michaelnisi","description":"CLI tool that finds unused visual assets in Xcode projects 🛠️🗑️ ","archived":false,"fork":false,"pushed_at":"2026-05-15T13:31:51.000Z","size":32,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-15T15:15:06.304Z","etag":null,"topics":["xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaelnisi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-05-15T12:20:53.000Z","updated_at":"2026-05-15T13:37:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/michaelnisi/refuse","commit_stats":null,"previous_names":["michaelnisi/refuse"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/michaelnisi/refuse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelnisi%2Frefuse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelnisi%2Frefuse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelnisi%2Frefuse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelnisi%2Frefuse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelnisi","download_url":"https://codeload.github.com/michaelnisi/refuse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelnisi%2Frefuse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34059240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["xcode"],"created_at":"2026-06-08T11:05:59.205Z","updated_at":"2026-06-08T11:05:59.812Z","avatar_url":"https://github.com/michaelnisi.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# refuse\n\nA Swift CLI tool that finds unused visual assets in Xcode projects.\n\n## What it does\n\n`refuse` scans an Xcode project or workspace for `.xcassets` catalogs, collects all image, color, and symbol assets, then parses Swift source files to find which assets are never referenced anywhere. It understands both string literal references (`UIImage(named: \"my_icon\")`) and generated resource identifier references (`Image(.myIcon)`).\n\nBuilt for large multi-target apps — the Swift source corpus is parsed concurrently.\n\n## Installation\n\n```sh\ngit clone https://github.com/michaelnisi/refuse\ncd refuse\nswift build -c release\nsudo cp .build/release/refuse /usr/local/bin/refuse\n```\n\n## Usage\n\nRun from your project root:\n\n```sh\nrefuse\n```\n\nOr pass a path explicitly:\n\n```sh\nrefuse /path/to/MyApp\n```\n\nTo delete unused assets after confirmation:\n\n```sh\nrefuse -d\n```\n\n## Output\n\nProgress is written to stderr, results to stdout:\n\n```\nFound 1247 assets across 8 catalogs\nScanning 342 Swift files...\n\nColors.xcassets (1)\n  deprecated_red    colorset\n\nIcons.xcassets (2)\n  another_unused    imageset\n  unused_symbol     symbolset\n\n3 unused assets across 2 catalogs\n```\n\n## CI\n\n`refuse` exits with code `1` when unused assets are found, `0` when the project is clean. Use `-s` to suppress progress output while keeping error messages visible:\n\n```sh\nrefuse -s\n```\n\n## Limitations\n\n- Only Swift source files are scanned. Objective-C and Interface Builder files are not.\n- Font assets (`.fontset`) are not supported — fonts are referenced by PostScript name, not asset name.\n- Assets referenced via computed strings or loaded from remote config will be reported as unused.\n- Generated resource identifiers (e.g. `.myIcon`) are only recognised when passed directly as a call argument. Assets accessed via a variable or intermediate expression will be reported as unused.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelnisi%2Frefuse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelnisi%2Frefuse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelnisi%2Frefuse/lists"}