@hyperfrontend/versioning/bin

CLIs — cz and cl

@hyperfrontend/versioning ships two command-line entries that are wired to the npm bin field. Install the package and they become available as npx cz and npx cl <file> in any consuming project.

BinPurpose
czInteractive conventional-commit authoring session
clConventional-commit message validator (usable from a commit-msg hook)

Both read their configuration from a commit.config.{js,mjs,cjs} file discovered upward from the current working directory (or pointed at via --config).

cz — author a commit

npx cz [--config <path>] [--cwd <path>]
FlagPurpose
--config <path>Explicit commit.config.{js,mjs,cjs} override
--cwd <path>Working directory for config discovery, git ops, scope resolve

Walks through type → scope → subject → body → breaking → issues → preview, writes the formatted message, and runs git commit with it. The staged files drive the scope choices; run git add first.

Exit codes:

CodeMeaning
0Session committed successfully
1Argv error, config failure, empty staging, or git commit failure
130User cancelled the session (SIGINT / Ctrl-C)

cl — validate a commit message

npx cl <commit-msg-path> [--config <path>] [--cwd <path>]

Reads the raw message from the given path, validates it against the configured ruleset, and prints errors () and warnings () to stderr. Typical use is as a commit-msg hook:

# lefthook.yml
commit-msg:
  commands:
    commitlint:
      run: npx cl {1}

The ruleset comes from commit.config.* (validateRuleset) when one is loaded, otherwise the built-in conventional preset.

Exit codes:

CodeMeaning
0Every error-level rule passed (warnings do not block)
1At least one error-level rule failed, or the bin could not run
API reference for bin is not available yet — rebuild docs to regenerate.