JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1535
  • Score
    100M100P100Q102536F
  • License ISC

A simple tool for enforcing Git branch naming conventions

Package Exports

  • cnb
  • cnb/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cnb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CI status npm downloads npm license version


🚀 Create New Branch

cnb is a simple and customizable CLI tool that helps you create Git branches following naming conventions. No more manual typing! Just select options, add a description, and you're good to go!

📦 Installation

Install the package as a dev dependency:

npm i -D cnb

or if you're using pnpm:

pnpm add -D cnb

🛠️ Usage

  1. Add the following alias to your .gitconfig:

[alias] cnb = "!cnb"

  1. Run the following command to create a new branch with naming conventions:
git cnb

This will prompt you with a set of options to choose from (e.g., feat, bugfix, chore, etc.). You'll also provide a short description that will be formatted into kebab-case.

Example:

  • Selected type: feat
  • Description: configure notifications

The branch created will be: feat/configure-notifications.

If your configuration requires a ticket ID (based on your config file), the flow will prompt you to enter that first.

👥 Authors

📄 License

MIT