# balm-git-flow

> The best practices for front-end git flow

Latest version **1.1.2** (published 2026-01-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install balm-git-flow
pnpm add balm-git-flow
yarn add balm-git-flow
bun add balm-git-flow
```

Provides the commands `balm-git`, `balm-git-dev`, `balm-git-prod`, `balm-git-doctor`.

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2026-01-06 |
| First published | 2023-03-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=18 |
| Dependencies | 3 |
| Unpacked size | 22.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Elf-mousE |
| Maintainers | elf-mouse |
| Keywords | frontend, git, github, gitlab, flow, workflow |

## Links

- npm: https://www.npmjs.com/package/balm-git-flow
- Repository: https://github.com/balmjs/balm-git-flow
- Homepage: https://github.com/balmjs/balm-git-flow#readme
- Issues: https://github.com/balmjs/balm-git-flow/issues
- npm.io page: https://npm.io/package/balm-git-flow

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^5.6.0
- [inquirer](https://npm.io/package/inquirer.md) ^12.0.0
- [commander](https://npm.io/package/commander.md) ^13.0.0

## Recent versions

- 1.1.2 (latest) — 2026-01-06
- 1.0.1-legacy (legacy) — 2025-12-03
- 1.1.1 — 2025-12-03
- 1.1.0 — 2024-02-04
- 1.0.0-legacy — 2023-08-29
- 1.0.0 — 2023-08-29
- 0.10.4-legacy — 2023-05-16
- 0.9.4 — 2023-05-16
- 0.10.3-legacy — 2023-05-16
- 0.9.3 — 2023-05-16
- 0.10.2-legacy — 2023-05-16
- 0.9.2 — 2023-05-16
- 0.10.1-legacy — 2023-05-16
- 0.9.1 — 2023-05-16
- 0.10.0-legacy — 2023-05-15
- … 47 more at https://npm.io/package/balm-git-flow/versions

## README

# Balm Git Flow

> The best practices for front-end git flow

## Features

- One install, unified development process for all git projects
- Relatively simple release initialization
- Easy to configure and publish multiple environment branches
- Support for publishing independent repositories

## Workflow

1. main(source code) -> dev(feat, fix...) -> prod(test, pre-production...)
2. main(source code) -> prod(production)

## Requirements

1. [Node.js](https://nodejs.org/) >=18 (>=14.18.0 on Windows)
2. [Git](https://git-scm.com/) 2.6.0+

## Installation

```sh
npm install -g balm-git-flow
```

> ⚠️ NOTE: For Windows users, use `npm install -g balm-git-flow@legacy`

## Configuration

First, create a **`balm.env.js`** file in your project root directory (use `balm-git doctor`)

| Variable Name                    | Type              | Default              | Description                                                                                        |
| -------------------------------- | ----------------- | -------------------- | -------------------------------------------------------------------------------------------------- |
| BALM_GIT_FLOW_MAIN               | `string`          | `'main'`             | main branch (source code)                                                                          |
| BALM_GIT_FLOW_RELEASE            | `string`, `array` | `'release'`          | production release branch(es)                                                                      |
| BALM_GIT_FLOW_RELEASES           | `array`           | `['release']`        | all release branches                                                                               |
| BALM_GIT_FLOW_SCRIPTS            | `array`           | `['build']`          | all build scripts corresponding to the release branches ( the keys of `scripts` in `package.json`) |
| BALM_GIT_FLOW_RELEASE_SCRIPTS    | `string`          | `JSON.stringify({})` | associated scripts and release branches (`{ [script: string]: [releases: string[]] }`)             |
| BALM_GIT_FLOW_BUILD_DIR          | `string`          | `'dist'`             | build out dir (by `npm-run-script`)                                                                |
| BALM_GIT_FLOW_IGNORE_UNCOMMITTED | `boolean`         | `false`              | ignore uncommitted for workflow                                                                    |
| BALM_GIT_FLOW_USE_CUSTOM_MESSAGE | `boolean`         | `false`              | use custom log message                                                                             |
| BALM_GIT_FLOW_REPOSITORIES       | `array`           |                      | independent repositories                                                                           |
| BALM_GIT_FLOW_SITE               | `string`          |                      | production release branch for independent repositories                                             |

- release scripts settings

  - Method 1:

    ```ini
    BALM_GIT_FLOW_RELEASES = ['test', 'release'];
    BALM_GIT_FLOW_SCRIPTS = ['build:test', 'build:release'];
    ```

  - Method 2:

    ```js
    BALM_GIT_FLOW_RELEASE_SCRIPTS = JSON.stringify({
      'build:test': ['test-a', 'test-b'],
      'build:release': ['release']
    });
    ```

## Usage

- `balm-git doctor`: check the project environment
- `balm-git dev <new-branch> [<start-point>]`: create new branch for development from origin main branch
- `balm-git prod`: release process

> ⚠️ NOTE: For Windows users, use `balm-git-doctor`, `balm-git-dev` and `balm-git-prod`

---
_Source: https://npm.io/package/balm-git-flow · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
