# Quick start

> A quick start with bump. Make a first release of a new package, release a later change, preview a release with --dryrun, and push the tags.

This page releases one package two times: a first release, then a patch release after a change. The examples type `bump`. In your project, type `bunx bump` or use your [package.json script](/install/#run-bump).

## Start at 0.0.0

Give a new package the version `0.0.0`. bump reads it as a package that was never released:

```json [package.json]
{
  "name": "app",
  "version": "0.0.0",
  "type": "module",
  "devDependencies": {
    "bump": "^1.0.0"
  }
}
```

Add a file, and commit your files. bump works only on committed history, and a release needs a clean tree:

```sh
echo 'export const hello = () => "hello";' > index.js
git add -A
git commit -m "feat: hello"
```

## Preview the release

Add `--dryrun` to see the release. bump does every check and writes nothing:

```console
$ bump minor --dryrun
BUMP 0.0.0 → 0.1.0  (first)
DONE Dry run; no files were written
```

The `BUMP` line shows the old version, the new version, and the reason. The reason is `first`, because the version is `0.0.0` and there is no tag for it.

## Make the first release

Run the same command without `--dryrun`:

```console
$ bump minor
BUMP 0.0.0 → 0.1.0  (first)
DONE Committed 0dfd458 v0.1.0
     Tagged v0.1.0
```

bump wrote `0.1.0` into `package.json`. It made the commit `0dfd458` with the message `v0.1.0`, and added the annotated tag `v0.1.0` on it.

The tag `v0.1.0` is now the **anchor**: the next release looks for changes after it.

<bongo:note>
For a first release of `1.0.0`, run `bump major`. To pick any version, give it: `bump 1.0.0`.
</bongo:note>

## Release a change

With no new commits, there is nothing to release:

```console
$ bump patch
DONE Nothing to release
```

Change a file and commit it:

```sh
echo 'export const bye = () => "bye";' >> index.js
git commit -am "feat: add bye"
```

Preview, then release:

```console
$ bump patch --dryrun
BUMP 0.1.0 → 0.1.1  (changed)
DONE Dry run; no files were written
$ bump patch
BUMP 0.1.0 → 0.1.1  (changed)
DONE Committed a50da2a v0.1.1
     Tagged v0.1.1
```

The reason is now `changed`: a file of the package changed since the `v0.1.0` tag.

## Push the release

bump does not push. Push the commit and its tags yourself:

```sh
git push --follow-tags
```

`--follow-tags` pushes the annotated tags that point to the pushed commits. bump makes only annotated tags, so each release tag goes with its commit.

Then publish, if you want to:

```sh
npm publish
```

## Next steps

- [How it works](/how-it-works/): learn how bump finds packages, anchors, and changes.
- [Lockstep and independent](/modes/): release a repository with several packages.
- [Prereleases](/prereleases/): make `1.0.0-next.0` and similar versions.
