Skip to content

A delightful CLI tool for building complex commit messages

Notifications You must be signed in to change notification settings

danieldelcore/commitpal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Script Palette

CommitPal

A delightful CLI tool for building commit messages which conform to your project's specific commit message format.

Demo

Install ⬇️

Install globally

npm install -g commitpal

Get started 🏁

commitpal

Usage with npx

npx commitpal

API 🤖

  • --config, -c Custom configuration file
  • --preset, -p Select an inbuilt preset. Options: 'angular', 'emoji', 'jira'
  • --nowelcome, -n Omit welcome message
  • --help Helpme
  • --version, -v Version number

Examples

  • $ commitpal --config ../commitpal.config.json
  • $ commitpal --nowelcome
  • $ commitpal --preset emoji
  • $ npx commitpal

Presets

CommitPal is loaded with the following collection of preset configurations:

Don't like these presets, or want to provide your own? Raise a Pull Request 🙏

Configuration

If you're not using one of the predefined commit message formats, CommitPal will attempt to search for a commitpal.config.json.

Which can be configured like so:

{
  "name": "Angular commit message format",
  "steps": [
    {
      "type": "option",
      "message": "What type of change?",
      "options": [
        { "value": "feat", "description": "feature" },
        { "value": "fix", "description": "bug fix" },
        { "value": "docs", "description": "documentation" },
        {
          "value": "style",
          "description": "formatting, missing semi colons, …"
        },
        { "value": "test", "description": "tests" },
        { "value": "chore", "description": "adhoc maintenance" }
      ]
    },
    {
      "type": "option",
      "message": "What scope of the project is affected?",
      "before": "(",
      "after": "):",
      "options": [
        { "value": "authentication", "description": "Authentication modules" },
        { "value": "users", "description": "User profiles" },
        { "value": "settings", "description": "Settings" },
        { "value": "payments", "description": "Payments modules" },
        { "value": "shipping", "description": "Shipping modules" },
        { "value": "build system", "description": "Build system" },
        { "value": "CI", "description": "Continuous integration" }
      ]
    },
    {
      "type": "text",
      "message": "Summarise this change..."
    },
    {
      "type": "text",
      "before": "\n\n",
      "message": "Describe this change..."
    },
    {
      "type": "text",
      "before": "\n\n",
      "message": "Describe any breaking changes..."
    }
  ]
}

You might also like...

  • ScriptPal: A simple npm script palette for lazy people
  • Enquirer: Stylish, intuitive and user-friendly prompts

About

A delightful CLI tool for building complex commit messages

Resources

Stars

Watchers

Forks

Packages

No packages published