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.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for zendev_commit-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9716f52af689c9e0d9ae34ca60325fe0833af3b2e49573fb5252379783dfdd03
MD5 3e9cd08667e24de4de550f514269c82c
BLAKE2b-256 e713c6b8f5e3dcf616307ddf587002b68138ec0b30e121eafdc4d7fdb37aff87

See more details on using hashes here.

Provenance

The following attestation bundles were made for zendev_commit-0.2.1-py3-none-any.whl:

Publisher: cd-release.yml on zendev-lab/zendev

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.0

1 file

0.3.0

1 file

0.2.2

1 file

This release

0.2.1 This release

1 file

0.2.0

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