# npm

Source: https://zshot-cli.com/reference/npm/
Markdown: https://zshot-cli.com/reference/npm/index.md
Section: [Reference](https://zshot-cli.com/reference/)

```sh
npm install -g @zshot/cli
```

Installs ZShot for Linux x86_64 and arm64 with glibc 2.35 or newer directly from the npm registry. For macOS and other packages, see [Download](/download).

## Cloud workspaces and containers

Pass `--container` on each run:

```sh
zshot --container https://zshot-cli.com/example_assets/hello_zshot/ -f shot.png
```

To use an existing license, run [`zshot --license-lease`](/reference/flags/common/license-lease) in the workspace and confirm the code on a licensed machine.

ZShot loads pages from the workspace's own network. Give the workspace full network access, or allow each site it loads and `zshot-licensing.com`.

Workspaces often default to UTC and the `C` locale. Set `TZ` and `LANG`, or pass [`--emulate-timezone`](/reference/flags/browser/emulate-timezone) and [`--accept-language`](/reference/flags/browser/accept-language) per run.

## System libraries

On Debian and Ubuntu:

```sh
apt-get install -y libasound2 libdbus-1-3 libexpat1 libnspr4 libnss3 fontconfig-config dbus
```

See `DEPENDENCIES.txt` in `@zshot/linux-x64` or `@zshot/linux-arm64` for other distributions. ZShot reports any missing libraries on startup failure.

## Packages

| Package | Contents |
|---|---|
| `@zshot/cli` | The `zshot` CLI launcher |
| `@zshot/linux-x64`, `@zshot/linux-arm64` | Binary, FFmpeg, fonts, and resources |
| `@zshot/cef-linux-x64`, `@zshot/cef-linux-arm64` | Chromium Embedded Framework library |

npm installs the two packages for the host architecture as optional dependencies of `@zshot/cli`, so `--omit=optional` leaves the launcher without a binary. No install scripts run.

## Cache

Each version links its files into `$XDG_CACHE_HOME/zshot/npm/` on first run, defaulting to `~/.cache/zshot/npm/`. Set `ZSHOT_NPM_CACHE` to override the directory.

## Navigation

- [Examples](https://zshot-cli.com/examples/)
- [Download](https://zshot-cli.com/download/)
- [Purchase](https://zshot-cli.com/purchase/)
- [Reference](https://zshot-cli.com/reference/)
  - [Formats](https://zshot-cli.com/reference/formats/)
  - [Flags](https://zshot-cli.com/reference/flags/)
  - [Agents](https://zshot-cli.com/reference/agents/)
  - [Configuration](https://zshot-cli.com/reference/configuration/)
  - [Crawling](https://zshot-cli.com/reference/crawling/)
  - [Devices](https://zshot-cli.com/reference/devices/)
  - [Docker](https://zshot-cli.com/reference/docker/)
  - [Exit Codes](https://zshot-cli.com/reference/exit_codes/)
  - [Linux](https://zshot-cli.com/reference/linux/)
  - [LLM Connections](https://zshot-cli.com/reference/llm_connections/)
  - **npm**
  - [LLM Formatting](https://zshot-cli.com/reference/llm_formatting/)
  - [Local Inputs](https://zshot-cli.com/reference/inputs/)
  - [Navigator](https://zshot-cli.com/reference/navigator/)
  - [Security](https://zshot-cli.com/reference/security/)
  - [Server](https://zshot-cli.com/reference/server/)
  - [Shell completions](https://zshot-cli.com/reference/shell_completions/)
  - [Storage](https://zshot-cli.com/reference/storage/)
  - [Timeouts](https://zshot-cli.com/reference/timeouts/)
  - [Web Bot Auth](https://zshot-cli.com/reference/web_bot_auth/)
- [Support](https://zshot-cli.com/support/)
- [Changelog](https://zshot-cli.com/changelog/)

Site index: https://zshot-cli.com/llms.txt

