{"id":37192291,"url":"https://github.com/phillippbertram/go-xc-strings","last_synced_at":"2026-01-14T22:18:33.456Z","repository":{"id":239000268,"uuid":"789759835","full_name":"phillippbertram/go-xc-strings","owner":"phillippbertram","description":"CLI Tool to cleanup Xcode Localizable.strings","archived":false,"fork":false,"pushed_at":"2024-05-21T10:14:52.000Z","size":52,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-22T09:34:39.508Z","etag":null,"topics":["cli","go","golang","localizable-strings","swift","translation","xcode"],"latest_commit_sha":null,"homepage":"","language":"Go","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/phillippbertram.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}},"created_at":"2024-04-21T13:38:46.000Z","updated_at":"2024-05-21T09:56:21.000Z","dependencies_parsed_at":"2024-05-16T13:27:24.812Z","dependency_job_id":"b7330602-4424-4bb6-8a74-9ba1ea27ee36","html_url":"https://github.com/phillippbertram/go-xc-strings","commit_stats":null,"previous_names":["phillippbertram/go-xc-strings"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/phillippbertram/go-xc-strings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillippbertram%2Fgo-xc-strings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillippbertram%2Fgo-xc-strings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillippbertram%2Fgo-xc-strings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillippbertram%2Fgo-xc-strings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phillippbertram","download_url":"https://codeload.github.com/phillippbertram/go-xc-strings/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillippbertram%2Fgo-xc-strings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["cli","go","golang","localizable-strings","swift","translation","xcode"],"created_at":"2026-01-14T22:18:32.914Z","updated_at":"2026-01-14T22:18:33.451Z","avatar_url":"https://github.com/phillippbertram.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xc-strings\n\n`xc-strings` is a command-line tool designed to help Swift developers manage and optimize their localization files. \nIt provides functionalities to find unused localization keys, clean them from `.strings` files, and optionally sort the keys in these files for better organization.\n\n## Features\n\n- **Find Unused Keys**: Scans Swift files to detect any localization keys that are no longer used.\n- **Find Duplicate Keys**: Scans `.strings` files to detect any duplicate keys within the same file.\n- **Sort `.strings` Files**: Sorts keys in `.strings` files to maintain a consistent order.\n\n## Installation\n\n### Prerequisites\n\n- Go 1.15 or later\n\n### Building from Source\n\nClone the repository and build the executable:\n\n```bash\ngit clone git@github.com:phillippbertram/go-xc-strings.git\ncd go-xc-strings\n\n# run directly\ngo run main.go help\n\n# build and run the executable (macOS)\nmake build\n./dist/go-xc-strings_darwin_arm64/xcs help\n```\n\n### Setup Development Environment\n\n- Install [Go](https://golang.org/doc/install)\n- Optional: Install golangci-lint: `brew install golangci-lint`\n- Optional: Install goreleaser: `brew install goreleaser`\n\n## Usage\n\n```bash\n# get help and list all available commands\nxcs help\n\n# list unused localization keys\n# -b: path to the base localization file\n# args: path to the directory containing the Swift files\n# --strings: path to the directory containing the .strings files\n# -i: optional glob pattern to exclude files (useful to ignore R.string generated files)\nxcs unused -b path/to/Localizable.strings -d path/to/swift/files -i \"*.generated.swift\" App/Resources --remove\n\n# sort strings files\nxcs sort App/Resources\n\n# find and remove specific keys from all strings files that are not used in the Swift files\nxcs keys \"this_is_a_key\" \"another_key\" App/Resources --remove\n\n# find missing translations\nxcs missing App/Resources -b App/Resources/en.lproj/Localizable.strings\n\n# open github repository or release page\nxcs gh [--releases]\n```\n\n## Configuration\n\nNo additional configuration is needed to run `xc-strings`.\n\n## Publish New Release (DRAFT)\n\n1. Make sure you are on the `main` branch\n2. Make sure the version in `version.go` is correctly set during goreleaser build\n3. Create a tag: `git tag -a v0.1.0 -m \"Release v0.1.0\"` and push it: `git push origin v0.1.0`\n4. Run `make release/local` to create a new release\n5. Publish Draft [Release](https://github.com/phillippbertram/go-xc-strings/releases) \n\n## Contributing\n\nContributions are welcome! Please fork the repository and submit pull requests with any enhancements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nFor support, you can open an issue in the GitHub issue tracker.\n\n## Authors\n\n- **Phillipp Bertram** - *Initial work* - [phillippbertram](https://github.com/phillippbertram)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphillippbertram%2Fgo-xc-strings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphillippbertram%2Fgo-xc-strings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphillippbertram%2Fgo-xc-strings/lists"}