> ## Documentation Index
> Fetch the complete documentation index at: https://www.lettercamp.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Install and update the CLI

> Install Lettercamp locally or globally, check Node.js requirements, compare versions, and update your CLI.

Use a project-local Lettercamp CLI for a new publication, or install the command
globally to run it from any publication folder.

## Prerequisites

* [Node.js](https://nodejs.org/) **22.23.4 or newer**.
* npm, included with Node.js, or pnpm.
* An internet connection to install packages and check for updates. The starter is bundled with the CLI.

Check your Node.js version:

```bash theme={null}
node --version
```

## Project-local installation

The [setup command](https://www.lettercamp.com/docs/cli/new.md) installs the CLI automatically:

```bash theme={null}
npm create lettercamp@latest my-publication
```

Inside that project, use `npm run dev` or `npx lettercamp dev`. When cloning an
existing project with a CLI dependency in `package.json`, run `npm install` first.

## Global installation

```bash npm theme={null}
npm install -g lettercamp
```

```bash pnpm theme={null}
pnpm add -g lettercamp
```

Verify the installation:

```bash theme={null}
lettercamp --version
```

The CLI is published as the [`lettercamp`](https://www.npmjs.com/package/lettercamp)
package. You can also run it without a global installation:

```bash theme={null}
npx lettercamp@latest --help
```

## Check your version

For a project-local installation, prefix the following version commands with `npx`,
for example `npx lettercamp --version`.

Show the installed CLI version without a network request:

```bash theme={null}
lettercamp --version
```

`lettercamp -v` is equivalent. To compare your installed version with the latest
published release on npm, run:

```bash theme={null}
lettercamp version
```

## Update the CLI

For a project-local installation, run this from the publication directory:

```bash theme={null}
npx lettercamp update
```

The command updates the project's CLI with its existing package manager and
keeps an exact version pin. It supports npm, pnpm, Yarn, and Bun. For those other
package managers, run `pnpm exec lettercamp update`, `yarn lettercamp update`, or
`bun run lettercamp update` respectively.

Restart your preview after updating. Review and commit the updated `package.json`
and lockfile if you track your project in Git. Your published site changes only
when you deploy again.

For a global npm installation:

```bash theme={null}
lettercamp update --global
```

This updates only the global installation. Outside a project, `lettercamp update`
also works when you run the global npm copy. Neither command updates other
projects' local installations. For a global installation managed by pnpm, use
pnpm instead. You can also install the latest release directly:

```bash npm theme={null}
npm install -g lettercamp@latest
```

```bash pnpm theme={null}
pnpm add -g lettercamp@latest
```

### Breaking changes

Upgrades across a potentially breaking version boundary stop before installing
and link to the [release notes](https://github.com/lettercamp/lettercamp/releases).
After reviewing them, opt in explicitly:

```bash theme={null}
npx lettercamp update --allow-breaking
```

For global npm updates, combine `--global` with `--allow-breaking`. This check
applies to major releases, minor releases before 1.0, and patch releases before
0.1. If the new release needs a newer Node.js version, update Node.js first.

### Update notices

Interactive commands check for updates in the background at most once every
24 hours. A notice can appear on a later invocation, at most once daily, with
the command to update your installation. Lettercamp never installs an update
automatically. An offline check does not delay or fail your command.

Background checks and notices are skipped in CI, redirected output, JSON output,
and help or version flags. To disable them in your shell, set
`LETTERCAMP_NO_UPDATE_NOTIFIER=1`. `NO_UPDATE_NOTIFIER=1` is also supported.
The explicit `lettercamp version` and `lettercamp update` commands still check
when requested.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.