{"id":31283040,"url":"https://github.com/tatsh/cz-path","last_synced_at":"2026-04-01T22:12:42.568Z","repository":{"id":304579809,"uuid":"1019220372","full_name":"Tatsh/cz-path","owner":"Tatsh","description":"Commitizen plugin that prefixes commit messages with the common path or prefix of staged files.","archived":false,"fork":false,"pushed_at":"2025-09-22T23:28:54.000Z","size":2426,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-23T01:14:18.596Z","etag":null,"topics":["commit-messages","commitizen","git","version-control"],"latest_commit_sha":null,"homepage":"https://tatsh.github.io/cz-path/","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/Tatsh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":"CODEOWNERS","security":"SECURITY.md","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},"funding":{"github":"Tatsh","ko_fi":"tatsh2","liberapay":"tatsh2","patreon":"tatsh2"}},"created_at":"2025-07-14T01:52:54.000Z","updated_at":"2025-09-22T23:28:57.000Z","dependencies_parsed_at":"2025-07-14T03:02:14.097Z","dependency_job_id":"ebcf8d6f-5264-4ea5-a793-da823878e188","html_url":"https://github.com/Tatsh/cz-path","commit_stats":null,"previous_names":["tatsh/cz-path"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Tatsh/cz-path","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatsh%2Fcz-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatsh%2Fcz-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatsh%2Fcz-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatsh%2Fcz-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tatsh","download_url":"https://codeload.github.com/Tatsh/cz-path/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tatsh%2Fcz-path/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276689034,"owners_count":25686613,"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","status":"online","status_checked_at":"2025-09-24T02:00:09.776Z","response_time":97,"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":["commit-messages","commitizen","git","version-control"],"created_at":"2025-09-24T04:05:12.141Z","updated_at":"2026-04-01T22:12:42.542Z","avatar_url":"https://github.com/Tatsh.png","language":"Python","readme":"# cz-path\n\n[![Python versions](https://img.shields.io/pypi/pyversions/cz-path.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://www.python.org/)\n[![PyPI - Version](https://img.shields.io/pypi/v/cz-path)](https://pypi.org/project/cz-path/)\n[![GitHub tag (with filter)](https://img.shields.io/github/v/tag/Tatsh/cz-path)](https://github.com/Tatsh/cz-path/tags)\n[![License](https://img.shields.io/github/license/Tatsh/cz-path)](https://github.com/Tatsh/cz-path/blob/master/LICENSE.txt)\n[![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/Tatsh/cz-path/v0.0.6/master)](https://github.com/Tatsh/cz-path/compare/v0.0.6...master)\n[![CodeQL](https://github.com/Tatsh/cz-path/actions/workflows/codeql.yml/badge.svg)](https://github.com/Tatsh/cz-path/actions/workflows/codeql.yml)\n[![QA](https://github.com/Tatsh/cz-path/actions/workflows/qa.yml/badge.svg)](https://github.com/Tatsh/cz-path/actions/workflows/qa.yml)\n[![Tests](https://github.com/Tatsh/cz-path/actions/workflows/tests.yml/badge.svg)](https://github.com/Tatsh/cz-path/actions/workflows/tests.yml)\n[![Coverage Status](https://coveralls.io/repos/github/Tatsh/cz-path/badge.svg?branch=master)](https://coveralls.io/github/Tatsh/cz-path?branch=master)\n[![Dependabot](https://img.shields.io/badge/Dependabot-enabled-blue?logo=dependabot)](https://github.com/dependabot)\n[![Documentation Status](https://readthedocs.org/projects/cz-path/badge/?version=latest)](https://cz-path.readthedocs.org/?badge=latest)\n[![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)\n[![uv](https://img.shields.io/badge/uv-261230?logo=astral)](https://docs.astral.sh/uv/)\n[![pydocstyle](https://img.shields.io/badge/pydocstyle-enabled-AD4CD3?logo=pydocstyle)](https://www.pydocstyle.org/)\n[![pytest](https://img.shields.io/badge/pytest-enabled-CFB97D?logo=pytest)](https://docs.pytest.org)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![Downloads](https://static.pepy.tech/badge/cz-path/month)](https://pepy.tech/project/cz-path)\n[![Stargazers](https://img.shields.io/github/stars/Tatsh/cz-path?logo=github\u0026style=flat)](https://github.com/Tatsh/cz-path/stargazers)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://pre-commit.com/)\n[![Prettier](https://img.shields.io/badge/Prettier-enabled-black?logo=prettier)](https://prettier.io/)\n\n[![@Tatsh](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fpublic.api.bsky.app%2Fxrpc%2Fapp.bsky.actor.getProfile%2F%3Factor=did%3Aplc%3Auq42idtvuccnmtl57nsucz72\u0026query=%24.followersCount\u0026label=Follow+%40Tatsh\u0026logo=bluesky\u0026style=social)](https://bsky.app/profile/Tatsh.bsky.social)\n[![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Tatsh-black?logo=buymeacoffee)](https://buymeacoffee.com/Tatsh)\n[![Libera.Chat](https://img.shields.io/badge/Libera.Chat-Tatsh-black?logo=liberadotchat)](irc://irc.libera.chat/Tatsh)\n[![Mastodon Follow](https://img.shields.io/mastodon/follow/109370961877277568?domain=hostux.social\u0026style=social)](https://hostux.social/@Tatsh)\n[![Patreon](https://img.shields.io/badge/Patreon-Tatsh2-F96854?logo=patreon)](https://www.patreon.com/Tatsh2)\n\nCommitizen plugin that prefixes commit messages with the common path or prefix of staged files.\n\n## Installation\n\n```shell\npip install cz-path\n```\n\n## Usage\n\nPass `-n cz_path` to `cz` or add it to your configuration file.\n\nBy default, `src/` will be removed from any determined prefix. This can be customised by setting\n`remove_path_prefixes` to `[]`. You also may want to add other locations such as a module name.\nAdding `/` is not required.\n\n### `pyproject.toml`\n\n```toml\n[tool.commitizen]\nname = \"cz_path\"\nremove_path_prefixes = [\"src\", \"module_name\"]\n```\n\n### `.cz.json`\n\n```json\n{\n  \"commitizen\": {\n    \"name\": \"cz_path\",\n    \"remove_path_prefixes\": [\"src\", \"module_name\"]\n  }\n}\n```\n\n### Scenarios\n\n| Staged files           | Path prefix | String prefix |\n| ---------------------- | ----------- | ------------- |\n| `src/a.c`, `src/b.c`   | `src`       | `src/`        |\n| `src/a1.c`, `src/a2.c` | `src`       | `src/a`       |\n| `a.c`, `b.c`           | (no option) | (no option)   |\n\nIf no prefix is found amongst the staged files, only the choices `project` and empty will be given.\n","funding_links":["https://github.com/sponsors/Tatsh","https://ko-fi.com/tatsh2","https://liberapay.com/tatsh2","https://patreon.com/tatsh2","https://buymeacoffee.com/Tatsh","https://www.patreon.com/Tatsh2"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftatsh%2Fcz-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftatsh%2Fcz-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftatsh%2Fcz-path/lists"}