{"id":29089991,"url":"https://github.com/kochik/clesset","last_synced_at":"2025-06-28T04:06:30.825Z","repository":{"id":300575301,"uuid":"1006486479","full_name":"KochIK/Clesset","owner":"KochIK","description":"A cli tool for detecting unused image assets in iOS projects. Supports multiple search strategies including Swift, Objective-C, and R.swift.","archived":false,"fork":false,"pushed_at":"2025-06-22T13:39:21.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-22T14:25:40.943Z","etag":null,"topics":["clenup","images","resources","swift","unused","unused-resources","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/KochIK.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2025-06-22T11:36:40.000Z","updated_at":"2025-06-22T13:39:24.000Z","dependencies_parsed_at":"2025-06-22T14:26:45.759Z","dependency_job_id":"f8eb584a-82f0-448d-b9f5-7ac07db183d4","html_url":"https://github.com/KochIK/Clesset","commit_stats":null,"previous_names":["kochik/clesset"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/KochIK/Clesset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KochIK%2FClesset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KochIK%2FClesset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KochIK%2FClesset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KochIK%2FClesset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KochIK","download_url":"https://codeload.github.com/KochIK/Clesset/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KochIK%2FClesset/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262371698,"owners_count":23300599,"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":["clenup","images","resources","swift","unused","unused-resources","xcode"],"created_at":"2025-06-28T04:06:29.325Z","updated_at":"2025-06-28T04:06:30.786Z","avatar_url":"https://github.com/KochIK.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clesset\nA cli tool for detecting unused image assets in iOS projects.\\\nClesset supports multiple built-in search strategies, including `Swift`, `Objective-C`, and `R.swift`.\\\nNotice that this project doesn't use complex filters or regular expressions.\\\nThe idea is simple — it should work right away, without any extra setup or confusion.\n\n\n\u003e [!NOTE]\n\u003e The current version of the project has no tests and contains some rough edges.\n\u003e I plan to fix this soon.\n\n## Motivation\nThere are many tools on GitHub that try to find unused image assets, but none of them worked well on really big iOS projects.  \nSo I decided to build my own.\n\n## How It Works\nClesset parses `.imageset` resources and searches for their usage in `*.m` and `*.swift` files using several strategies.\n#### Strategies:\n* Search in `*.m` files using the pattern `\"\u003cresource_name\u003e\"`\n* Search in `*.swift` files using the pattern `\"\u003cresource_name\u003e\"`\n* Search in `*.swift` files using the pattern `R.image.\u003crswift_resource_name\u003e`\n* Search in `*.swift` files using the pattern `.\u003crswift_resource_name\u003e`. Used for specific formatting cases. (`R\\n.image\\n.someImage`)\n## Installation\n```shell\n\u003e mint install kochik/clesset\n\u003e clesset -h\n```\n## Usage\n#### Commands\n```shell\n\u003e clesset -summary \u003cproject-path\u003e \u003cresources-path\u003e\n\u003e clesset -clear \u003cproject-path\u003e \u003cresources-path\u003e\n```\n#### Options\n```\n--excPaths, -ep \u003cexcPaths\u003e Ignore specific file or folder paths during the search.\nFor example: `*.generated.swift`, `*/Generated/*`\n\n--excStrategies, -es \u003cexcStrategies\u003e Exclude specific search strategies from analysis.\n  Available values:\n  * `objc` – search .m files for `\"\u003cname\u003e\"`\n  * `swift` – search .swift files for `\"\u003cname\u003e\"`\n  * `rSwift` – search .swift files for `R.image.\u003crswift_name\u003e`\n  * `rSwiftSimple` – search .swift for `.\u003crswift_name\u003e` (extra R.swift coverage)\n```\n#### Example usage\n```shell\n\u003e clesset -summary /Users/user/project /Users/user/project/resources -ep \"*.generated.swift\" \"*/Generated/*\"\n\nRun with config:\nProject path: /Users/user/project\nResources path: /Users/user/project/resources\nExcluded paths: [\"*.generated.swift\", \"*/Generated/*\"]\nExcluded strategies: []\n\nDetected 8 resources.\n\nSummary\nUsed:\n┌──────────┬─────────────┬───────────────────┐\n| Resource | Size(bytes) | Found at          |\n├──────────┼─────────────┼───────────────────┤\n| image_1  | 610304      | ContentView.swift |\n├──────────┼─────────────┼───────────────────┤\n| image_2  | 770048      | ContentView.swift |\n└──────────┴─────────────┴───────────────────┘\nUnused:\n┌──────────┬─────────────┬──────────┐\n| Resource | Size(bytes) | Found at |\n├──────────┼─────────────┼──────────┤\n| image_5  | 1425408     | None     |\n├──────────┼─────────────┼──────────┤\n| image_4  | 253952      | None     |\n├──────────┼─────────────┼──────────┤\n| image_6  | 1437696     | None     |\n├──────────┼─────────────┼──────────┤\n| image#_3 | 253952      | None     |\n├──────────┼─────────────┼──────────┤\n| image_7  | 1564672     | None     |\n├──────────┼─────────────┼──────────┤\n| image_8  | 8192        | None     |\n└──────────┴─────────────┴──────────┘\n\nTotal resources: 8 = 6324224 bytes\nUsed resources: 2 = 1380352 bytes\nUnused resources: 6 = 4943872 bytes\nTotal time: 0.008440017700195312\n```\n## License and Information\nClesset is open-sourced under the MIT license.\n\nIf you find a bug or have a suggestion, feel free to open [an issue](https://github.com/kochik/clesset/issues/new)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkochik%2Fclesset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkochik%2Fclesset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkochik%2Fclesset/lists"}