---
title: "Install"
description: "npm, pnpm, Bun or Yarn, or no install at all with npx."
url: "https://openemail.uk/docs/cli/install"
area: "CLI"
category: "Getting started"
---

# Install

npm, pnpm, Bun or Yarn, or no install at all with npx.

## Install

> The current release is `0.0.1`. It needs Node.js 20.12 or later.

**Install**

_npm_

```text
npm install -g @openemail/cli
```

_pnpm_

```text
pnpm add -g @openemail/cli
```

_bun_

```text
bun add -g @openemail/cli
```

_yarn_

```text
yarn global add @openemail/cli
```

The package is one bundled file with no dependencies, and it puts one command on your `PATH`: `openemail`. The SDK it calls the API with is built in, so the CLI always runs with the SDK it was tested against. `openemail version` prints the version of both, and of the runtime.

**Check it**

```
openemail --version
openemail --help
```

## Run it without installing

`npx` fetches the package into a cache and runs it, which suits a one-off command, a CI job, or an MCP client that starts the local bridge.

**Terminal**

```
npx @openemail/cli --help
npx -y @openemail/cli@0.0.1 whoami
npx -y @openemail/cli mcp serve
```

> Pin the version in CI, as in `npx -y @openemail/cli@0.0.1`, so a new release never changes a pipeline under you.

## Updates

The CLI never updates itself. It remembers for a day what the npm registry said about the latest release. When that is older, it asks again in the background while your command runs, and once the command is done it waits a fifth of a second at most for the answer. When a newer release exists, it prints a notice on stderr after your command has finished:

**Update notice**

```
Update available! 0.0.1 → 0.0.2
Changelog: https://openemail.uk/docs/cli/changelog
Run `npm i -g @openemail/cli@latest` to update.

Disable this notice with OPENEMAIL_NO_UPDATE_CHECK=1
```

- The install command in the notice matches the package manager you installed with.
- There is no notice with `--help`, `--version` or `--json`, for `help`, `version`, `update` or `completion`, when stdout or stderr is not a terminal, or in CI.
- Set `OPENEMAIL_NO_UPDATE_CHECK=1` to turn it off everywhere. `OPENEMAIL_DISABLE_UPDATE_NOTICE=1` does the same.
- The only request goes to the npm registry, and its answer is kept in `~/.openemail/update-check.json` for a day.

`openemail update` checks straight away, ignoring the daily cache, and prints either the command to run or that you are on the latest version.

**Update**

_npm_

```text
npm i -g @openemail/cli@latest
```

_pnpm_

```text
pnpm add -g @openemail/cli@latest
```

_bun_

```text
bun add -g @openemail/cli@latest
```

_yarn_

```text
yarn global add @openemail/cli@latest
```

## Shell completion

`openemail completion <shell>` prints a completion script for bash, zsh or fish, built from every command, subcommand and flag of the version you have. Run it again after an update.

**Completion**

_bash_

```bash
echo 'eval "$(openemail completion bash)"' >> ~/.bashrc
```

_zsh_

```bash
openemail completion zsh > "${fpath[1]}/_openemail"
```

_fish_

```bash
openemail completion fish > ~/.config/fish/completions/openemail.fish
```

## Uninstall

Sign out first, so every browser sign-in is revoked on the server, then remove the package and the folder the CLI keeps its sign-ins in.

**Terminal**

```
openemail logout --all
npm uninstall -g @openemail/cli
rm -rf ~/.openemail
```
