# Zuplo CLI

The Zuplo CLI provides convenient tooling for common tasks that you might want
to automate. You can use it to deploy Zuplo projects through CI/CD, create and
update environment variables, manage your tunnels, and more! It's powered by the
[Zuplo Developer API](https://dev.zuplo.com/docs), which you can also call
directly, if you want to create your own tooling.

## Installing

The Zuplo CLI is built using Node.js. It requires a minimum version of Node.js
20.0.0 (Node.js 22 is recommended).

1. Install Node.js 20.0.0 or later. You can download it from
   [nodejs.org](https://nodejs.org/en/download/).
1. Install the Zuplo CLI globally by running the following command:

   ```bash
   npm install -g zuplo
   ```

1. After installing the CLI, you can use the `zuplo` command to interact with
   Zuplo.

### Verifying Installation

Run the following command to confirm the CLI is installed correctly:

```bash
zuplo --version
```

### Updating

To update the Zuplo CLI to the latest version, run the same install command:

```bash
npm install -g zuplo@latest
```

## Quick Start

After installing the CLI, log in to your Zuplo account and deploy a project:

```bash
zuplo login
zuplo deploy --project my-project
```

For details on authentication options, including API key usage for CI/CD
pipelines, see [Authentication](./authentication.mdx).

## Commands

| Command | Description |
| --- | --- |
| [`deploy`](./deploy.mdx) | Deploy a Zuplo project to an environment |
| [`dev`](./dev.mdx) | Start a local development server |
| [`test`](./test.mdx) | Run API tests against a deployment |
| [`init`](./init.mdx) | Initialize a new Zuplo project in the current directory |
| [`link`](./link.mdx) | Link a local directory to an existing Zuplo project |
| [`list`](./list.mdx) | List available Zuplo projects |
| [`delete`](./delete.mdx) | Delete a Zuplo project or environment |
| [`login`](./authentication.mdx) | Authenticate with your Zuplo account via OAuth |
| [`variable-create`](./variable-create.mdx) | Create an environment variable |
| [`variable-update`](./variable-update.mdx) | Update an environment variable |
| [`tunnel-create`](./tunnel-create.mdx) | Create a new tunnel |
| [`tunnel-list`](./tunnel-list.mdx) | List tunnels for a project |
| [`tunnel-delete`](./tunnel-delete.mdx) | Delete a tunnel |

For a complete list of commands and flags, run `zuplo --help` or see
[Global Options](./global-options.mdx).

To scaffold a new project without installing the CLI, see
[create-zuplo-api](./create-zuplo-api.mdx).
