# Introduction

> What bump is, what it does and does not do, its main ideas, and the runtime that it needs.

bump releases the packages of a git repository. It finds the packages that changed since their last release and computes their next versions. It writes the new versions into the manifests. Then it makes one release commit, with one annotated tag per released unit.

It works with `package.json` and `Cargo.toml` packages, also mixed in one repository.

This example uses [independent mode](/modes/#independent):

```console
$ bump minor
BUMP @acme/core 1.2.0 → 1.3.0  (changed)
BUMP @acme/cli 0.4.1 → 0.4.2  (dependent)
EDIT @acme/cli dependencies["@acme/core"] ^1.2.0 → ^1.3.0
EDIT @acme/docs devDependencies["@acme/core"] ^1.2.0 → ^1.3.0
DONE Committed 0394e49 release: @acme/core@1.3.0, @acme/cli@0.4.2
     Tagged @acme/core@1.3.0, @acme/cli@0.4.2
```

Here `@acme/core` changed, so it gets the `minor` release. `@acme/cli` depends on `@acme/core`, so it gets a patch release. Each range that names `@acme/core` gets the new version.

## What bump does

- It finds your packages from your workspace files, or from `packages` in `bump.json`. See [How it works](/how-it-works/#packages).
- It finds the changes since the last release of each package, by its tag.
- It computes each next version from a type (`major`, `minor`, `patch`, `premajor`, `preminor`, `prepatch`, `prerelease`) or from an exact version.
- It releases the packages that depend on a released package. See [Lockstep and independent](/modes/#dependents).
- It edits only the versions and the dependency ranges. Your comments, key order, and whitespace stay the same.
- It updates `Cargo.lock` and npm lockfiles in the same commit. See [Lockfiles](/lockfiles/).
- It undoes the files, the commit, and the tags when a step fails.

## What bump does not do

- **Publish.** You run `npm publish` or `cargo publish`. The [JSON result](/json/) tells you which packages were released, and which ones are publishable.
- **Push.** You run `git push --follow-tags`. See [Quick start](/quick-start/#push-the-release).
- **Changelogs.** bump writes no changelog and no release notes.

## Main ideas

### Versions come from the manifests

The version in each manifest is the current version. bump reads no version from tags or from its config.

### Tags mark the last release

The tag of the current version, such as `v1.2.0` or `@acme/core@1.2.0`, marks the last release commit. bump compares HEAD with that commit to find changes. The manifest and the tag must agree. If they do not, bump stops and tells you why. See [Anchors](/how-it-works/#anchors).

### Units

bump releases **units**, not single packages. A unit is a set of packages that always release together, with one version and one tag.

- In **lockstep** mode, the default, all versioned packages are one unit.
- In **independent** mode, each [group](/groups/) is a unit, and each versioned package outside a group is a unit.

See [Lockstep and independent](/modes/).

### One commit, one tag per unit

A release is one commit with all the edits. Each released unit gets one annotated tag on that commit.

### Undo on failure

bump does all checks before it writes a file. If a later step fails, for example a commit hook or a tag signature, bump undoes the release. See [Undo](/how-it-works/#undo).

## Runtime

bump runs on [Bun](https://bun.sh) 1.4 or later. It needs `git` on your `PATH`. See [Install](/install/).

## Next steps

- [Install](/install/): add bump to your project.
- [Quick start](/quick-start/): make your first release.
- [How it works](/how-it-works/): learn each step of a release.
