Skip to content

Lu-Jiejie/flowmit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

53 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

flowmit

npm version install size jsdocs license

English | ็ฎ€ไฝ“ไธญๆ–‡

git commit -m "๐Ÿฆ„"

Commit like the flow in Git. ๐ŸŒŠ

This is a CLI tool that helps you stage changes, generate the commit message in a flow, and commit them in one go.

Installation

npm install -g flowmit

// or install in your project:
npm install -D flowmit

Usage

Just run the alias fm in your terminal, then follow the instructions and you're good to go!

fm

If you installed it in your project, you can run it with:

npx flowmit

Or add it to your package.json scripts:

{
  "scripts": {
    "commit": "flowmit"
  }
}

Options

--dry

If you only want to see the commit message without committing it, you can use the --dry option.

fm --dry

Configuration

You can configure flowmit by adding a flowmit.config.ts/flowmit.config.js file in the root of everywhere within your project. It means that, if you are in a monorepo, you can have multiple flowmit.config.ts/flowmit.config.js files in different packages to customize the commit message for each package.

// flowmit.config.ts
import { defineConfig } from './src/config'

export default defineConfig({
  // the types of commit messages you can choose from
  types: [
    { title: 'feat', value: 'feat', description: 'new features' },
    { title: 'fix', value: 'fix', description: 'fix a bug' },
  ],
  // the scopes of the commit messages you can choose from
  scopes: [
    'core',
    'cli',
  ],
  // like --dry option
  dry: true,
})

Why flowmit?

flow + commit = flowmit

A simple equation names a tool! ๐Ÿ˜Ž