Skip to content
CAI
Software that uses CAICheck a score

commitizen/cz-cli

50.5

Adequate · 1 October 2026

1k

lines of production code

JavaScript

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a command-line interface tool that facilitates structured Git commit messages through an interactive workflow. It manages configuration loading, adapter resolution for various commit conventions, and argument parsing to bridge standard Git operations with customizable commitizen strategies. The tool supports multiple package managers and integrates with Git hooks, providing a modular architecture for generating and executing commit commands.

Features

New git utility module with commit hook support

This change introduces a new set of git utility functions (add, commit, init, log, whatChanged) in the src/git directory. The commit function now supports a --hook option that allows writing commit messages directly to the COMMIT\_EDITMSG file instead of spawning a git process, enabling integration with git hooks. It also includes improved error handling for Windows compatibility and specific warnings for git exit code 128 (missing user configuration).

src/git · high confidence

New utility module for common helper functions

A new utility module has been added to the common source directory, providing helper functions for file system operations and type checking. This includes utilities to read and parse JSON files, specifically targeting package.json retrieval, and a robust isFunction check that correctly identifies both standard functions and async functions. It also provides a helper to detect if the current execution context is a test environment.

src/common · high confidence

Behavioural changes

Commitizen library API restructured and refactored

The internal structure of the Commitizen library has been significantly refactored to improve modularity and maintainability. The main entry point now exports a cleaner set of modules including adapter, cache, commit, configLoader, init, and staging. The configuration loading logic has been split into separate files for findup, getContent, getNormalizedConfig, and loader. Additionally, Git operations are now encapsulated in a dedicated git module. The old app.js and cz.js files have been removed, and the configLoader module has been simplified to use the new modular structure.

src · high confidence

Introduce dedicated git-cz and raw git commit strategies

The CLI now uses a strategy-based architecture for commit operations, introducing two distinct handlers in src/cli/strategies. The new git-cz strategy manages the interactive commitizen workflow, handling argument parsing, adapter resolution, staging checks, and specific modes like --retry and --hook, while the new git strategy acts as a fallback that directly invokes the native git command for raw commits. This separates the interactive commitizen logic from standard git operations, allowing the CLI to route commit requests to the appropriate handler based on configuration and arguments.

src/cli/strategies · high confidence

New CLI argument parsers for commitizen and git-cz

Added new parser modules in src/cli/parsers to handle command-line argument processing. The commitizen parser now uses the minimist library to parse raw Git arguments into a structured object, replacing previous inline logic. The git-cz parser implements custom regex-based logic to strip message declarations (both short -m and long --message formats) from Git arguments, ensuring clean argument passing to the underlying commit process.

src/cli/parsers · high confidence

Replaced binary logo assets with SVG sources and generation script

The logo directory now uses vector SVG files (\commitizen-logo-color.svg\ and \commitizen-logo-mono.svg\) as the single source of truth, replacing previous binary formats. A new \generate.sh\ script automates the creation of PNG variants (16px to 1024px) for black, blue, white, and color themes using \cairosvg\. This approach reduces repository size and mitigates security risks associated with storing binary image files directly.

logo · high confidence

Rewrite CLI entry points to use precompiled distribution bundles

The CLI entry points (bin/commitizen, bin/git-cz, bin/git-cz-debug) have been rewritten to load the application from the precompiled distribution directory (dist/cli/) instead of the source directory (src/). This change aligns with the 'perf(compile): Precompile ES6 code' commit, ensuring the CLI runs against optimized output. Additionally, the git-cz entry point now includes explicit error handling for uncaught exceptions and SIGINT signals, improving stability by preventing raw stack traces and ensuring correct exit codes on interruption.

bin · high confidence

Rewritten CLI entry points and argument parsing

The CLI implementation in src/cli has been completely rewritten to use ES modules and a new modular structure. The main entry point (commitizen.js) now handles the 'init' command by delegating to a central init function and provides updated help text for the 'cz' and 'git-cz' commands. A new git-cz.js entry point manages the commit workflow by loading adapter configuration and selecting between standard git and commitizen strategies. Argument parsing is now handled by dedicated parsers (parsers.js) and execution logic is abstracted into strategies (strategies.js), separating concerns for git-only and commitizen-enabled modes.

src/cli · high confidence

Rewritten adapter and initialization logic with multi-package-manager support

The commitizen adapter and initialization modules have been completely rewritten to support npm, Yarn, and pnpm. The new adapter logic correctly detects indentation in package.json and preserves trailing newlines when writing configuration. Initialization now generates the appropriate install command (install vs add) and flags (--save, --save-dev, --save-prod, etc.) based on the selected package manager. The adapter resolution also supports ES6 modules with default exports and scoped adapter names.

src/commitizen · high confidence

Fixes

Refactored config loader to remove external dependencies and improve error handling

The configuration loading logic in src/configLoader has been rewritten to remove the dependency on the 'findup-sync' package, replacing it with a custom findup implementation that supports filtering. The new loader now explicitly validates that configuration files are UTF-8 encoded, throwing a clear error if an invalid charset is detected, and provides more descriptive error messages when JSON parsing fails. Additionally, the loader now supports loading configuration from the user's home directory (e.g., \~/.czrc) if no local config is found, and normalizes config objects to prefer the 'config.commitizen' key in package.json while deprecating the legacy 'czConfig' key.

src/configLoader · high confidence

Test coverage

Added test infrastructure and configuration files; Added test suite for adapter resolution, CLI bootstrap, commit handling, and config loading; Added test utility modules for cleanup, file writing, and repository setup.

Dependencies

Major dependency overhaul and Node.js 18+ requirement

This release updates the project's dependency tree and runtime requirements. The minimum supported Node.js version is now 18, enforced via the engines field. Production dependencies have been significantly modernized: inquirer is upgraded to v8, lodash to 4.18.1, and cz-conventional-changelog to 3.3.0, while older packages like gulp, gulp-git, chalk, and systemjs have been removed. Development dependencies have also been updated, including semantic-release to v25, mocha to v9, and the Babel toolchain to v7.29.7. The main entry point has changed from index.js to dist/index.js, reflecting a new build step using Babel.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 47 → 51 (+3.2)
  • Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 68 → 68 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 49 → 49 (+0.0)
  • Readiness 59 → 45 (-14.5)
  • Security 38 → 58 (+20.8)

Resolved (4)

  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no pnpm-resolved versions to grade)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)

New (10)

  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • Outdated (npm): dedent
  • Outdated (npm): detect-indent
  • Outdated (npm): fs-extra
  • Outdated (npm): glob
  • Outdated (npm): inquirer
  • Outdated (npm): strip-bom
  • Outdated (npm): strip-json-comments

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

commitizen/cz-cli was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 1a8c49c02c9d52d1b4ef8cdabefb538088ddea03 — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.