# @workablehr/oneflow

> OneFlow cli tool

Latest version **1.6.0** (published 2021-09-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @workablehr/oneflow
pnpm add @workablehr/oneflow
yarn add @workablehr/oneflow
bun add @workablehr/oneflow
```

Provides the command `oneflow`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.6.0 |
| Published | 2021-09-08 |
| First published | 2018-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.0.0 |
| Dependencies | 10 |
| Unpacked size | 134.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Nikos Kostoulas |
| Maintainers | nikostoulas, kzacharakis, nikosd23, soleas, klesgidis, klouvas, elchetz, manoskouvarakis, antonakos, gerbessiotis |

## Links

- npm: https://www.npmjs.com/package/@workablehr/oneflow
- Repository: https://github.com/Workable/oneflow
- Homepage: https://github.com/Workable/oneflow#readme
- Issues: https://github.com/Workable/oneflow/issues
- npm.io page: https://npm.io/package/@workablehr/oneflow

## Dependencies (10)

- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [figlet](https://npm.io/package/figlet.md) 1.2.3
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [semver](https://npm.io/package/semver.md) ^6.1.1
- [inquirer](https://npm.io/package/inquirer.md) 6.3.1
- [commander](https://npm.io/package/commander.md) ^2.20.0
- [typescript](https://npm.io/package/typescript.md) ^3.5.2
- [home-config](https://npm.io/package/home-config.md) ^0.1.0
- [tsconfig-paths](https://npm.io/package/tsconfig-paths.md) ^3.8.0
- [commander-tabtab](https://npm.io/package/commander-tabtab.md) ^0.1.0

## Recent versions

- 1.6.0 (latest) — 2021-09-08
- 1.5.2 — 2020-09-21
- 1.5.1 — 2020-01-08
- 1.5.0 — 2018-11-08
- 1.4.2 — 2018-09-03
- 1.4.1 — 2018-08-28
- 1.4.0 — 2018-06-22
- 1.3.2 — 2018-06-14
- 1.3.1 — 2018-06-14
- 1.3.0 — 2018-06-14

## README

# one-flow

CLI tool to support Adam Ruka's branching model [oneflow](http://endoflineblog.com/oneflow-a-git-branching-model-and-workflow)

## Installing one-flow

1.  Run `npm install -g @workablehr/oneflow`

## Initialization

---

Before using `one-flow` a configuration wizard should be run in order to setup some basic settings. The result of this wizard is saved in `~/.oneflowrc` file. For project specific settings add and commit a `.oneflowrc` file in the root folder of your project.

The table below summarizes the supported settings:

| Setting                               | Usage                                                                                                              | Default |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------- |
| `BASE_BRANCH`                         | base branch to close features, hotfixes, releases                                                                  | master  |
| `MERGE_FF`                            | merge branches during feature-close using --ff-only?                                                               | true    |
| `FEATURE_CLOSE_REWRITE_COMMITS`       | Rewrite commits during feature-close to have as a prefix the feature-name                                          | true    |
| `RUN_CMD_AFTER_TAG_CREATION`          | Run a command after creating a tag                                                                                 |         |
| `CHANGE_VERSIONS_WHEN_TAGGING`        | Change versions when creating a tag (hotfix-close, release-close) currently supporting nodejs, java, ruby          | true    |
| `HOTFIX_CLOSE_REBASE_TO_LATEST_TAG`   | Rebase branch to latest tag during hotfix-close?                                                                   | true    |
| `PUSH_CHANGES_TO_REMOTE`              | Push changes to remote when possible?                                                                              | true    |
| `MERGE_INTERACTIVE`                   | Merge interactively during feature-close, hotfix-close?                                                            | false   |
| `FEATURE_CLOSE_SQUASH`                | Squash commits during feature close to one commit?                                                                 | false   |
| `RELEASE_CREATE_AND_CLOSE`            | Release create will also close it immediately updating versions and creating tags?                                 | false   |
| `RELEASE_CLOSE_MERGES_TO_BASE_BRANCH` | Release close will merge changes to base branch. Choose no if you want to merge manually (eg. to run tests first). | true    |
| `DEBUG`                               | Show debug information.                                                                                            | false   |

> To add autocomplete support use:
> `oneflow completion >> ~/.bashrc`

## Branching models and Workflow

---

### Feature branches

---

- To create a [feature branch](http://endoflineblog.com/oneflow-a-git-branching-model-and-workflow#feature-branches), use:

```
oneflow feature-create [options] [feature-name]
```

This command will create locally a feature branch from latest master.

Available options:

```
  -P, --no-push-flag  Will not push local changes to remote
  -h, --help          output usage information
```

- To close a feature branch, use:

```
oneflow feature-close [options] [feature-name]
```

This command will close the specified feature branch to master

Available options:

```
  -P, --no-push-flag  Will not push local changes to remote
  -i, --interactive   Interactive rebase
  -r, --rewrite       Will rewrite commit messages with feature as prefix.
  -f, --ff            Will run merge with ff-only
  -s, --squash        Will squash commits into 1
  -h, --help          output usage information
```

### Hotfix branches

---

- To create a [hotfix branch](http://endoflineblog.com/oneflow-a-git-branching-model-and-workflow#hotfix-branches), use:

```
oneflow hotfix-create [options] [hotfix-name] [base-tag]
```

This command will create locally a hotfix branch from the provided tag. `one-flow` will find and propose the latest tag if no other is provided.

Available options:

```
  -P, --no-push-flag  Will not push local changes to remote
  -h, --help          output usage information
```

- To close a hotfix branch use:

```
oneflow hotfix-close [options] [hotfix-name] [tag]
```

This command will close a hotfix branch to master creating a tag

Available options:

```
  -i, --interactive     Interactive rebase
  -R, --no-rebase-flag  Will not rebase to latest hotfix
  -P, --no-push-flag    Will not push local changes to remote
  -h, --help            output usage information
```

### Release branches

---

- To create a [release branch](http://endoflineblog.com/oneflow-a-git-branching-model-and-workflow#release-branches), use:

```
oneflow release-create [options] [commit] [tag]
```

This command will create a release branch from a specific commit or from master if no commit is provided

Available options:

```
  -P, --no-push-flag   Will not push local changes to remote
  -c, --close          Opens and closes the release creating a tag
  -M, --no-merge-flag  Will not merge after creating tag if called with -c
  -h, --help           output usage information
```

- To close a release branch use:

```
oneflow release-close [options] [tag]
```

This command will tag and merge a release branch to master

Available options:

```
  -P, --no-push-flag   Will not push local changes to remote
  -M, --no-merge-flag  Will not merge after creating tag
  -h, --help           output usage information
```

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