{"id":29460865,"url":"https://github.com/egel/bns","last_synced_at":"2026-05-17T08:32:46.101Z","repository":{"id":276648065,"uuid":"929869385","full_name":"egel/bns","owner":"egel","description":"Branch Name Sanitizer - A simple program that normalize given text to git branch name","archived":false,"fork":false,"pushed_at":"2025-05-26T06:16:00.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-14T09:50:17.361Z","etag":null,"topics":["branch-names","git","git-branch","golang","normalization","sanitizer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egel.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-02-09T15:43:09.000Z","updated_at":"2025-05-26T11:06:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"0e610b26-2e61-4903-9af2-305a4e10149a","html_url":"https://github.com/egel/bns","commit_stats":null,"previous_names":["egel/cbn","egel/bns"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/egel/bns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egel%2Fbns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egel%2Fbns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egel%2Fbns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egel%2Fbns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egel","download_url":"https://codeload.github.com/egel/bns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egel%2Fbns/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265233753,"owners_count":23731825,"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":["branch-names","git","git-branch","golang","normalization","sanitizer"],"created_at":"2025-07-14T02:38:32.320Z","updated_at":"2026-05-17T08:32:41.075Z","avatar_url":"https://github.com/egel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Branch Name Sanitizer\n\nBranch Name Sanitizer - simple program that savely cleans text inputs focusing on comply with [Git repository naming conventions][weblink-git-scm-check-ref-format].\n\n## Features\n\n- Gently clean all accent characters from input, e.g: `é` =\u003e `e`, `ă` =\u003e `a`, etc.\n- Persist characters meaning conversion, e.g. `ö` =\u003e `ou`, `\u0026` =\u003e `-and-`, etc.\n- Customization of strings connector\n- Option to allow only ASCII characters\n- Option to keep original case\n\n## Install\n\n```sh\ngo install github.com/egel/bns/cmd/bns@latest\n```\n\n### Git configuration\n\nAdd new gitconfig alias name e.g.: `cob` (acronym of `checkout -b`), `brn` (branch new), or anything else that suite your preferences.\n\n```\n# file ~/.gitconfig\n\n[alias]\n\tcob = !sh -c 'git checkout -b $(bns $@)' -\n```\n\nthen you can automatically checkout to a new, clean branch using command like following:\n\n```sh\ngit cob \"fancy name of your new branch\"\n```\n\n## Usage\n\n### Default\n\n```sh\nbns \"Introduce new dashboard UI\" # =\u003e introduce-new-dashboard-ui\n```\n\n### Customize string connector\n\nflag: `-c`, `--connector`\n\n```sh\nbns -c \"_\" \"Develop AI-powered bug reporter\" # =\u003e develop_ai_powered_bug_reporter\n```\n\n### Keep original case\n\nflag: `-o`, `--original-case`\n\n```sh\nbns -o \"Task: Implement Login Feature\" # =\u003e Task-Implement-Login-Feature\n```\n\n### Completly remove all Non-ASCII chars\n\nflag: `-f`, `--force-ascii`.\n\nIf you need a strict non-ASCII complience.\n\n```sh\n# Arabic\nbns -f \"تحسين: amélioration du dashboard de l'utilisateur\" # =\u003e amlioration-du-dashboard-de-l-utilisateur\n\n# Chinese (mandarin)\nbns -f \"BUG：搜索功能不工作\" # =\u003e bug\n```\n\n### Allow multiple string arguments\n\n\u003e [!NOTE]\n\u003e When passing multiple strings as arguments to your tool, make sure to enclose each one in quotes to ensure they are treated as input values rather than flags or options.\n\n```sh\n# hey! I also works as arg list!\nbns This is fancy new feature!  # =\u003e this-is-fancy-new-feature\n```\n\n## Upgrade\n\nTo upgrade to the latest version use:\n\n```sh\nGONOPROXY=github.com/egel go install github.com/egel/bns/cmd/bns@latest\n```\n\n## Uninstall\n\n1.  remove the binary from system\n\n    ```sh\n    rm $(command -v bns)\n    ```\n\n1.  remove the alias from your `~/.gitconfig`\n\n## License\n\nApache-2.0 license\n\n[weblink-git-scm-check-ref-format]: https://git-scm.com/docs/git-check-ref-format\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegel%2Fbns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegel%2Fbns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegel%2Fbns/lists"}