# cz-relax

> A better commitizen practice

Latest version **0.2.1** (published 2022-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install cz-relax
pnpm add cz-relax
yarn add cz-relax
bun add cz-relax
```

Provides the command `cz-relax`.

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2022-06-16 |
| First published | 2022-05-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 5 |
| Unpacked size | 25.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | chenfangxu |
| Maintainers | cfangxu |
| Keywords | commitizen, cz-cli |

## Links

- npm: https://www.npmjs.com/package/cz-relax
- Repository: https://github.com/qiqihaobenben/commitizen-relax
- Homepage: https://github.com/qiqihaobenben/commitizen-relax#readme
- Issues: https://github.com/qiqihaobenben/commitizen-relax/issues
- npm.io page: https://npm.io/package/cz-relax

## Dependencies (5)

- [ora](https://npm.io/package/ora.md) ^5.4.1
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.1.0
- [commander](https://npm.io/package/commander.md) ^9.2.0
- [commitizen](https://npm.io/package/commitizen.md) ^4.2.4

## Recent versions

- 0.2.1 (latest) — 2022-06-16
- 0.2.0 — 2022-06-09
- 0.1.3 — 2022-05-15
- 0.1.2 — 2022-05-15
- 0.1.1 — 2022-05-13
- 0.1.0 — 2022-05-13
- 0.0.2 — 2022-05-07
- 0.0.1 — 2022-05-07

## README

<h1 align="center">cz-relax</h1>

<p align="center">
  <a target="_blank" href="http://commitizen.github.io/cz-cli/">
      <img style="display:inline-block;margin:0.2em;" alt="commitizen-friendly" src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?logo=github">
    </a>
</p>

<h4 align="center">A better commitizen practice And one-click to configured commitizen.</h4>
<h4 align="center"><a target="_blank" href="https://github.com/qiqihaobenben/commitizen-relax/blob/release/docs/zh.md">中文文档</a></h4>

## Introduction

It takes several steps to configure [commitizen](https://github.com/commitizen/cz-cli) before，for example, commitizen needs to be initialized first and choice commitizen adapter，then you need to install commitlint，finally, you may need husky to configure git hooks。

Now, it only takes two steps to finish the above work and make everything easier.

## Getting started

### 1. Install cz-relax in the workspace

```sh
npm install cz-relax --save-dev
// or
yarn add cz-relax --dev
```

### 2. Initialize

```sh
npx cz-relax init
```

If you are using chinese：

```sh
npx cz-relax init --language zh
```

If you are using yarn：

```sh
npx cz-relax init --yarn
```

It's simple,then you can perform normal `git commit`.At this time, commitizen takes effect.

## Usage

Usage: `cz-relax [options]`

### Options:

- `-V, --version`: output the version number
- `-f, --force`: For commitizen while a previous adapter and husky is already configured. Use --force to override
- `--yarn`: use yarn manage package
- `-l, --language <type>`: need to set a profile type (choices: "zh", "en", default: "zh")
- `-a, --adapter <npmName>`: need to set a adapter npm name (default: "cz-git")
- `-h, --help`: display help for command

### Example

Example call:

```sh
  $ cz-relax init
  $ cz-relax init --force
  $ cz-relax init --yarn
  $ cz-relax init --language zh
  $ cz-relax init --language en --force
  $ cz-relax init --language zh --force --adapter cz-conventional-changelog
```

## FAQ

### Why is it prompted to use `--force` during initialize?

For commitizen while a previous adapter and husky is already configured. Use --force to override. For example:

```
npx cz-relax init --force
```

### Why report an error: `Error: no test specified` ?

Because, husky initialized by `husky-init`, it add pre-commit sample: `set('.husky/pre-commit', 'npm test')`. If you have a `test` command in `package.json`，please check how `test` work.


### What commitizen adapter is used default for initialization?

The cz-relax default adapter used fro initialize is [cz-git](https://github.com/Zhengqbbb/cz-git).

You can also use other adapters, for example, `cz-conventional-changelog`. However, you need to create your own configuration file for commitizen. I will improve it in the furture.

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