# On your laptop (https://unmissed.dev/docs/cli)

The `unmissed` CLI sends every new webhook a source receives to the app on your machine. Your other destinations still get theirs, so production isn't touched.

## Install it [#install-it]

On macOS or Linux, with Homebrew:

```sh
brew install unmissed/tap/unmissed
```

Or with the install script:

```sh
curl -fsSL https://github.com/unmissed/unmissed/releases/latest/download/unmissed-cli-installer.sh | sh
```

The script puts `unmissed` in `~/.local/bin` and adds that to your `PATH` in your shell profile. Builds for each release are also on the [releases page](https://github.com/unmissed/unmissed/releases). There is no Windows build yet.

To upgrade, run `brew upgrade unmissed`, or run the install script again.

## Listen [#listen]

Create a token on the **CLI** page of your Unmissed. Viewers can't use the CLI. Ask an admin to make you a member. Then:

```sh
export UNMISSED_URL=https://hooks.example.com
export UNMISSED_TOKEN=unm_...   # from the CLI page
unmissed listen Stripe --forward http://localhost:3000/webhooks
```

If you have only one source, you can leave its name out. Use the source's name, in any case, or its number. `unmissed sources` lists them.

Only webhooks that arrive after you start listening are sent. Rejected and duplicate webhooks are skipped.

If the connection drops, it reconnects and picks up where it left off. If your token is revoked, or an admin makes you a viewer, it stops within about 15 seconds.

| Flag | Environment | What it is |
| --- | --- | --- |
| `--server` | `UNMISSED_URL` | The address of your Unmissed |
| `--token` | `UNMISSED_TOKEN` | Your token from the CLI page, starting `unm_` |
| `--forward`, `-f` | | Where to send webhooks on your machine |

Run `unmissed --help` for every option.

The CLI is [MIT](https://github.com/unmissed/unmissed/blob/main/cli/LICENSE), so you can build it into anything. To build it yourself, run `cargo install --path cli` in a clone of the repo.