git-cx

command module
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: BSD-2-Clause-Views Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

A conventional commits tool

Go Report Card MIT License

Install

GitHub Releases

You can download binaries from GitHub Releases Page.

go install

go install github.com/shu-go/git-cx@latest

Put git-cx to PATH

Usage

Basic

git cx

Customize commit types and rules

First, generate a rule file.

git cx gen

# The default name is .cx.yaml.

# You can give it a name
git cx gen myrule.yaml

Then, edit the file.

headerformat: '{{.type}}{{.scope_with_parens}}{{.bang}}: {{.emoji_unicode}}{{.description}}'
headerformathint: .type, .scope, .scope_with_parens, .bang(if BREAKING CHANGE), .emoji, .emoji_unicode, .description
types:
    '# comment1':
        desc: 'comment starts with #'
        emoji: ""
    feat:
        desc: A new feature
        emoji: ':sparkles:'
    fix:
        desc: A bug fix
        emoji: ':bug:'
    :
  },
denyemptytype: false
denyadlibtype: false
usebreakingchange: false

Record and complete scope history

Edit your gitconfig (I recommend to use shu-go/git-konfig)

[cx]
  scopes = myscopes.yaml

An example

git cx --debug

Type: feat
Scope: hoge
Description: new feature hoge!
Body: (Enter 2 empty lines to finish)
dummy text

----------
feat(hoge): ✨new feature hoge!

dummy text

The search order

  1. gitconfig ([cx] rule={PATH})
  2. current worktree root
  3. config directory
  4. exe dir
    • .cx.yaml
    • Place the yaml in the same location as the executable.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址