Skip to main content

Crate commit_wizard

Crate commit_wizard 

Source
Expand description

§Commit Wizard

A lightweight Rust library for Conventional Commits, semantic versioning, and changelog automation.

This crate provides the core functionality for validating commits, managing versions, generating changelogs, and managing Git tags according to semantic versioning principles. It can be used programmatically via the library interface or through the cw CLI binary.

§Modules

  • cli: Command-line interface implementation (public commands and arguments)
  • core: Core application logic including bootstrap, context management, and use cases
  • engine: Business logic layer with traits, models, capabilities, and configuration
  • infra: Infrastructure layer for Git operations, UI interactions, and file system access

§Example Usage

ⓘ
use commit_wizard::core::Context;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create application context
    let context = Context::new().await?;

    // Use context to access capabilities and operations
    Ok(())
}

§Conventional Commits

This library enforces Conventional Commits format:

<type>(<scope>): <description>

<body>

<footer>

Supported types: feat, fix, docs, style, refactor, perf, test, chore, ci, build

§Semantic Versioning

Version bumping follows Semantic Versioning principles:

  • MAJOR: Breaking changes (feat! or BREAKING CHANGE)
  • MINOR: New features (feat)
  • PATCH: Bug fixes (fix)

Modules§

cli
Command-line interface for Commit Wizard.
core
Core application logic and context management.
engine
Business logic layer with traits, models, and capabilities.
infra
Infrastructure layer providing implementations for external integrations.

Macros§

string_vec_map
strings
A macro to create a vector of strings from a list of string literals.