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

# Qovery CLI

> Manage your Qovery infrastructure from the command line

## Overview

The Qovery CLI (Command Line Interface) enables you to interact with Qovery directly from your terminal. Deploy applications, manage environments, stream logs, and more - all without leaving your command line.

## Installation

<Tabs>
  <Tab title="Linux">
    <Tabs>
      <Tab title="*nix">
        To download and install Qovery CLI on any Linux distribution:

        ```bash theme={null}
        curl -s https://get.qovery.com | bash
        ```

        <Warning>
          The install script does not verify the binary's integrity. For security-sensitive environments, use the **Manual** tab to download a pinned release and verify its checksum against the official [checksums.txt](https://github.com/Qovery/qovery-cli/releases) published with each release.
        </Warning>
      </Tab>

      <Tab title="Arch Linux">
        Qovery is part of [AUR](https://aur.archlinux.org/packages) packages, so you can install it with [yay](https://github.com/Jguer/yay):

        ```bash theme={null}
        yay qovery-cli
        ```
      </Tab>

      <Tab title="Manual">
        Install the Qovery CLI on Linux manually from a [pinned release](https://github.com/Qovery/qovery-cli/releases) to ensure you control what version is installed.

        Replace `X.Y.Z` with the version you want to install:

        ```bash theme={null}
        VERSION=1.48.0  # version number without the 'v' prefix
        ARCH=amd64      # use arm64 for ARM64
        ARCHIVE="qovery-cli_${VERSION}_linux_${ARCH}.tar.gz"

        # Download the binary and checksums for your platform
        curl -sL "https://github.com/Qovery/qovery-cli/releases/download/v${VERSION}/${ARCHIVE}" -o "${ARCHIVE}"
        curl -sL "https://github.com/Qovery/qovery-cli/releases/download/v${VERSION}/checksums.txt" -o checksums.txt

        # Verify the checksum of the downloaded file only (fails if tampered)
        grep "${ARCHIVE}" checksums.txt | sha256sum --check

        # Extract and install
        tar -xzf "${ARCHIVE}"
        mv qovery /usr/local/bin/qovery
        chmod +x /usr/local/bin/qovery
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="MacOS">
    <Tabs>
      <Tab title="Homebrew">
        The common solution to install a command line binary on the MacOS is to use [Homebrew](https://brew.sh).

        ```bash theme={null}
        # Add Qovery brew repository
        brew tap Qovery/qovery-cli

        # Install the CLI
        brew install qovery-cli
        ```
      </Tab>

      <Tab title="Script">
        To download and install Qovery CLI from the command line:

        ```bash theme={null}
        curl -s https://get.qovery.com | bash
        ```

        <Warning>
          The install script does not verify the binary's integrity. For security-sensitive environments, use the **Manual** tab to download a pinned release and verify its checksum against the official [checksums.txt](https://github.com/Qovery/qovery-cli/releases) published with each release.
        </Warning>
      </Tab>

      <Tab title="Manual">
        Install the Qovery CLI on macOS manually from a [pinned release](https://github.com/Qovery/qovery-cli/releases) to ensure you control what version is installed.

        Replace `X.Y.Z` with the version you want to install:

        ```bash theme={null}
        VERSION=1.48.0  # version number without the 'v' prefix
        ARCH=amd64      # use arm64 for Apple Silicon (M1/M2/M3)
        ARCHIVE="qovery-cli_${VERSION}_darwin_${ARCH}.tar.gz"

        # Download the binary and checksums for your platform
        curl -sL "https://github.com/Qovery/qovery-cli/releases/download/v${VERSION}/${ARCHIVE}" -o "${ARCHIVE}"
        curl -sL "https://github.com/Qovery/qovery-cli/releases/download/v${VERSION}/checksums.txt" -o checksums.txt

        # Verify the checksum of the downloaded file only (fails if tampered)
        grep "${ARCHIVE}" checksums.txt | shasum -a 256 --check

        # Extract and install
        tar -xzf "${ARCHIVE}"
        mv qovery /usr/local/bin/qovery
        chmod +x /usr/local/bin/qovery
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="Windows">
    <Tabs>
      <Tab title="Scoop">
        The classic way to install binaries on Windows is to use [Scoop](https://scoop.sh).

        ```bash theme={null}
        # Add Qovery bucket
        scoop bucket add qovery https://github.com/Qovery/scoop-qovery-cli

        # Install the CLI
        scoop install qovery-cli
        ```
      </Tab>

      <Tab title="Manual">
        Install the Qovery CLI on Windows manually by downloading the [latest release](https://github.com/Qovery/qovery-cli/releases), and uncompress its content to `C:\Windows`.
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="Docker">
    Install Docker on your local machine and run the following command:

    ```bash theme={null}
    # Pull and Run the latest Qovery CLI
    docker run ghcr.io/qovery/qovery-cli:latest help
    ```

    Change `latest` by the version you want to use. For example, to use the version 0.58.4, run:

    ```bash theme={null}
    docker run ghcr.io/qovery/qovery-cli:0.58.4 help
    ```

    <Info>
      `ghcr.io` is the [GitHub Container Registry](https://github.com/Qovery/qovery-cli/pkgs/container/qovery-cli).
    </Info>
  </Tab>
</Tabs>

### Verify Installation

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

## Authentication

Before using the CLI, you need to authenticate:

```bash theme={null}
qovery auth
```

This will open a browser window for authentication. Once completed, you'll be ready to use the CLI.

### API Token Authentication

You can also authenticate using an API token:

```bash theme={null}
export QOVERY_CLI_ACCESS_TOKEN="your-api-token"
qovery auth
```

Generate an API token from the [Qovery Console](https://console.qovery.com/platform/organization/api-tokens).

## Configuration

The CLI stores configuration in `~/.qovery/context.json`. You can manage multiple contexts for different organizations or clusters.

### Set Default Context

```bash theme={null}
qovery context set
```

### List Contexts

```bash theme={null}
qovery context list
```

## Key Features

<CardGroup cols={2}>
  <Card title="Deploy Applications" icon="rocket" href="/cli/overview">
    Deploy and redeploy applications instantly from the terminal
  </Card>

  <Card title="Environment Management" icon="layer-group" href="/cli/overview">
    Create, update, and manage environments
  </Card>

  <Card title="Live Logs" icon="terminal" href="/cli/overview">
    Stream real-time logs from your applications
  </Card>

  <Card title="Shell Access" icon="code" href="/cli/overview">
    Execute commands directly in running containers
  </Card>
</CardGroup>

## Quick Start

### List Projects

```bash theme={null}
qovery project list
```

### List Environments

```bash theme={null}
qovery environment list
```

### Deploy an Application

```bash theme={null}
qovery application deploy
```

### View Logs

```bash theme={null}
qovery log
```

## Next Steps

<Card title="CLI Commands" icon="terminal" href="/cli/commands/overview">
  Explore all available commands and examples
</Card>
