Skip to main content

zendev-commit

zendev-commit owns commit profiles, Conventional Commits and Gitmoji validation, the interactive commit flow, and its vendored data. It can be installed and used without the complete zendev toolkit.

$ uv add --dev zendev-commit
$ uvx --from zendev-commit zendev-commit --help
$ uvx --from zendev-commit zendev-commit-msg --help

zendev-commit-msg validates complete commit messages. zendev-commit interactively builds a message and invokes git commit.

Python API

from zendev.commit import CommitProfile, validate_commit_message

result = validate_commit_message(
    "feat(parser): accept empty input",
    profile=CommitProfile.CONVENTIONAL,
)
assert result.valid

Profiles

Configure the default profile in the consuming repository:

[tool.zendev.commit]
profile = "conventional"

The --profile option overrides repository configuration. auto reads the nearest pyproject.toml and falls back to zendev.

Profile Contract
zendev A Gitmoji emoji or shortcode paired with its canonical commit type.
conventional Conventional Commits 1.0.0, including scopes, breaking changes, bodies, and footers.
gitmoji The Gitmoji title shape with Unicode or shortcode intentions and optional scope/body.

Examples accepted by the default profile:

🎉 init: begin a project
✨ feat: add export
🐛 fix(parser): handle null token
:memo: docs: update README
🚀 deploy: publish the package

Git-generated Merge, Revert, fixup!, squash!, amend!, and reword! messages are accepted.

Commit hook

With .pre-commit-config.yaml:

repos:
  - repo: https://github.com/zendev-lab/zendev
    rev: v0.1.0
    hooks:
      - id: zendev-commit-msg

With prek.toml:

[[repos]]
repo = "https://github.com/zendev-lab/zendev"
rev = "v0.1.0"
hooks = [
  { id = "zendev-commit-msg" },
]

Install the Git hook:

$ uvx prek install --hook-type commit-msg

An explicit command is also available:

$ uvx --from zendev-commit zendev-commit-msg --profile conventional .git/COMMIT_EDITMSG

Gitmoji data

The default profile uses the vendored catalog in src/zendev/data/gitmojis.json and the reviewable pairing table in src/zendev/data/emoji-conventions.toml. Validation is deterministic and does not access the network.

The retained upstream license is in src/zendev/data/LICENSE.gitmoji. Maintainers should follow the vendored-data procedure when refreshing the catalog.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zendev_commit-0.2.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file zendev_commit-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: zendev_commit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.13

File hashes

Hashes for zendev_commit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3867769a12d1a34abbddc277a4d56edade678b9d8be9bddfc767019f1caf219
MD5 728e2135bcc08b213e0ba48d8fd5d4c6
BLAKE2b-256 380c7c17167095424b64214ba21949e0f8d95521df215c5f86e1b49a2f29ab50

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

1 file

0.3.0

1 file

0.2.2

1 file

0.2.1

1 file

This release

0.2.0 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page