# release-it

> Generic CLI for automating releases: version bumps, git commit/tag/push, changelogs, GitHub/GitLab releases, and npm publishing, with hooks and plugins.

Stars: 9.1k · Language: JavaScript · License: MIT · Categories: Dev Tools

- Repository: https://github.com/release-it/release-it
- Page: https://www.trmn.sh/tools/release-it

## Install

- Homebrew: `brew install release-it`
- npm (global): `npm install -g release-it`

## Overview

release-it is a release automation CLI that handles versioning and publishing tasks from the root of a project. It bumps the version (for example in package.json), stages, commits, tags and pushes to a Git remote, generates a changelog, creates GitHub or GitLab releases, and publishes to npm. Although it is generic, most users run it on npm packages. When a package.json exists, the latest version comes from it; otherwise the latest Git tag is used, falling back to 0.0.0.

By default it runs interactively, prompting you to confirm each task and pick the new version. With `--ci` (activated automatically in CI environments) it runs without prompts, and `--only-version` prompts only for the version. Other flags include `--dry-run` to show the commands it would execute, `--release-version` to print the next version, `--changelog` to print the changelog without releasing, and `--no-increment` to update or re-run a release for an existing tag, for instance retrying a failed Git push with `--no-npm`.

Behavior is configured through `.release-it.json` or a `release-it` property in package.json. Script hooks in the form `before:` or `after:` plus an optional plugin and a lifecycle step (such as `before:init` or `after:git:release`) run shell commands for linting, tests or builds, with template variables like `${version}` and `${changelog}`. Plugins extend it, for example @release-it/bumper, @release-it/conventional-changelog and release-it-calver-plugin. The changelog defaults to `git log` output and can be overridden. npm Trusted Publishing (OIDC) is supported from GitHub and GitLab CI, and a containerized version is available for environments without Node. It suits maintainers of npm packages and other projects who want repeatable release scripts locally or in CI.

### Installation

```bash
# via Homebrew
brew install release-it
```

```bash
# via npm (global)
npm install -g release-it
```

## Alternatives

- [np](https://www.trmn.sh/tools/np.md): Interactive release tool for npm packages that checks the working tree, runs tests, bumps versions, creates tags, publishes, and pushes to Git. (JavaScript, 7.7k stars)
- [Plop](https://www.trmn.sh/tools/plop.md): Micro-generator framework that runs inquirer prompts and Handlebars templates from a plopfile to create consistent files from the terminal. (JavaScript, 7.7k stars)
- [mermaid-cli](https://www.trmn.sh/tools/mermaid-cli.md): Command-line tool (mmdc) that renders Mermaid diagram definitions and Markdown files with Mermaid code blocks to SVG, PNG, or PDF. (JavaScript, 5.2k stars)
- [DocToc](https://www.trmn.sh/tools/doctoc.md): Node.js CLI that generates and updates tables of contents in Markdown files, with anchor links compatible with GitHub, GitLab, Bitbucket, Ghost and nodejs.org. (JavaScript, 4.5k stars)
- [terminalizer](https://www.trmn.sh/tools/terminalizer.md): Terminal session recorder that generates animated GIF images from command-line sessions (JavaScript, 16.2k stars)

---

Canonical: https://www.trmn.sh/tools/release-it
