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

> ## Agent Instructions
> These are the docs for Sevalla, a platform for deploying applications, databases, static sites, object storage and load balancers. The dashboard is at https://app.sevalla.com.
> Bold text in steps is an exact dashboard label.
> To act on a Sevalla account, prefer the Sevalla MCP server (https://mcp.sevalla.com/mcp, see https://docs.sevalla.com/ai-agents/overview.md), then the Sevalla CLI (https://docs.sevalla.com/developer-tools/cli.md), then the REST API (https://api-docs.sevalla.com, OpenAPI spec at https://api.sevalla.com/v3/openapi.json).
> Every page index is at https://docs.sevalla.com/llms.txt.

# Sevalla CLI

> Install the sevalla command-line tool, sign in from the browser or with an API key in CI, and deploy, read logs and manage services with JSON output.

The Sevalla CLI, `sevalla`, manages your Sevalla services from a terminal or a CI job. It covers the [Sevalla API](/developer-tools/api): applications, deployments, processes, domains, environment variables, logs, metrics, databases, static sites, load balancers, object storage, pipelines, projects, webhooks and API keys. The current version is 1.10.1. This page covers installing, signing in and the commands you use most; the [CLI reference](https://api-docs.sevalla.com/v3/cli) lists every command.

## Install the CLI

<Tabs>
  <Tab title="Homebrew">
    ```bash theme={"theme":{"light":"github-dark-default","dark":"github-dark-default"}}
    brew install sevalla-hosting/tap/sevalla
    ```
  </Tab>

  <Tab title="npm">
    Requires Node.js 24 or later.

    ```bash theme={"theme":{"light":"github-dark-default","dark":"github-dark-default"}}
    npm install -g @sevalla/cli
    ```
  </Tab>

  <Tab title="Shell script">
    Installs the binary for macOS or Linux (x64 or arm64) to `/usr/local/bin/sevalla`:

    ```bash theme={"theme":{"light":"github-dark-default","dark":"github-dark-default"}}
    bash <(curl -fsSL https://raw.githubusercontent.com/sevalla-hosting/cli/main/install.sh)
    ```
  </Tab>

  <Tab title="Windows">
    Download `sevalla-windows-x64.exe` from the [latest release](https://github.com/sevalla-hosting/cli/releases/latest) and put it on your `PATH`.
  </Tab>
</Tabs>

Run `sevalla --version` to check the installed version. The Homebrew, shell script and Windows installs print the version number; an npm install prints `0.0.0-dev`, so check it with `npm ls -g @sevalla/cli`.

## Sign in

`sevalla login` signs you in through the browser, with no token to copy:

<Steps>
  <Step title="Start the sign-in">
    Run `sevalla login`. The CLI prints a device code and opens `https://app.sevalla.com/authorize` in your browser. If the browser doesn't open, visit the URL it prints.
  </Step>

  <Step title="Authorize the CLI">
    In the dashboard, check that the device code matches. If you belong to more than one company, select the company. Under **Set permissions**, choose a **Predefined role** or **Custom capabilities**, then click **Authorize**.
  </Step>
</Steps>

The CLI prints `Successfully logged in!`. Run `sevalla auth status` to check: it shows `Authenticated (source: credentials_file)`. The code expires after 5 minutes; if it does, run `sevalla login` again.

Signing in creates an [API key](/developer-tools/api-keys#keys-that-sevalla-creates-for-you) in the company you picked, with the permissions you chose and no expiration. The CLI stores it in `~/.config/sevalla/credentials.json`, readable only by you (`0600`). `sevalla logout` deletes that file, but not the key: to revoke the key, delete it under **Tools** > **API keys**.

## Use an API key in CI

In CI and other places without a browser, [create an API key](/developer-tools/api-keys#create-an-api-key) with only the permissions the job needs, and pass it in `SEVALLA_API_TOKEN`. The variable takes priority over the stored credentials.

```bash theme={"theme":{"light":"github-dark-default","dark":"github-dark-default"}}
export SEVALLA_API_TOKEN="svl_..."
sevalla apps list
```

`sevalla auth status` then shows `Authenticated (source: environment)`. Store the key in your CI provider's secrets, never in the repository.

| Environment variable | What it does |
| - | - |
| `SEVALLA_API_TOKEN` | The API key to use. Overrides the credentials from `sevalla login`. |
| `SEVALLA_API_URL` | Another API base URL (default `https://api.sevalla.com/v3`). |

## Common commands

IDs are UUIDs. `sevalla apps list`, `sevalla static-sites list` and `sevalla databases list` show them, and the dashboard shows them on a service's **Settings** tab.

| Task | Command |
| - | - |
| List applications | `sevalla apps list` |
| Show an application | `sevalla apps get <app-id>` |
| Deploy an application | `sevalla apps deployments trigger <app-id> --branch main` |
| Check a deployment | `sevalla apps deployments get <deployment-id> --app-id <app-id>` |
| Read a deployment's build log | `sevalla apps deployments logs <deployment-id> --app-id <app-id>` |
| Roll back to the last successful deployment | `sevalla apps deployments rollback <app-id>` |
| Cancel a deployment | `sevalla apps deployments cancel <deployment-id> --app-id <app-id>` |
| Read runtime logs | `sevalla apps logs runtime <app-id>` |
| Read access logs | `sevalla apps logs access <app-id>` |
| Add an environment variable | `sevalla apps env-vars create <app-id> --key LOG_LEVEL --value debug` |
| Scale a process | `sevalla apps processes update <process-id> --app-id <app-id> --instances 3` |
| Deploy a static site | `sevalla static-sites deployments trigger <site-id> --branch main` |
| Promote in a pipeline | `sevalla pipelines promote <pipeline-id> --source-app-id <app-id> --target-app-ids <app-id>` |
| List locations and sizes | `sevalla resources clusters`, `sevalla resources process-types`, `sevalla resources db-types` |

Run `sevalla <command> --help` for a command's arguments and options.

## Common options

| Option | What it does |
| - | - |
| `--json` | Prints JSON. The CLI prints JSON whenever its output isn't a terminal: a pipe, a file or a CI log. In 1.10.1 the flag on its own doesn't switch a terminal to JSON, so pipe the output (to `jq`, for example) to read JSON in a terminal. |
| `--api-url <url>` | Uses another API base URL. In 1.10.1 only `sevalla login` reads it; for other commands, set `SEVALLA_API_URL`. |
| `--page <number>`, `--per-page <number>` | Pages through list commands (defaults `1` and `25`) |
| `--dry-run` | On create, update, delete and action commands, prints what would be sent and calls nothing |
| `--data <json>` | On create and update commands that support it, sends this raw JSON body instead of the flags |
| `--confirm` | Required by every delete and remove command. Without it, the command stops with `Use --confirm to confirm deletion.` |

## Use JSON output in scripts

List commands print the array of items, other commands the object the API returns. Errors go to stderr (as JSON in JSON mode), and the command exits with a non-zero status. Parse JSON with `jq`:

```bash theme={"theme":{"light":"github-dark-default","dark":"github-dark-default"}}
APP_ID=$(sevalla apps list --json | jq -r '.[] | select(.display_name == "storefront") | .id')
sevalla apps get "$APP_ID" --json | jq '.status'
```

To deploy from a CI job and wait for the result:

```bash deploy.sh theme={"theme":{"light":"github-dark-default","dark":"github-dark-default"}}
DEPLOYMENT_ID=$(sevalla apps deployments trigger "$APP_ID" --branch main --json | jq -r '.id')

while true; do
  STATUS=$(sevalla apps deployments get "$DEPLOYMENT_ID" --app-id "$APP_ID" --json | jq -r '.status')
  echo "Deployment status: $STATUS"
  case "$STATUS" in
    success) exit 0 ;;
    failed|cancelled|skipped) exit 1 ;;
  esac
  sleep 10
done
```

For GitHub, the [Sevalla GitHub Action](/developer-tools/github-actions) does the same in one step.

## Use the CLI from an AI agent

The CLI is built to be driven by agents as well as people:

* `sevalla schema` prints the whole command tree as JSON (arguments, options, descriptions and defaults), and `sevalla schema apps.create` prints one command.
* Authenticate with `SEVALLA_API_TOKEN` rather than `sevalla login`, which needs a browser.
* Use `--dry-run` to check a mutation before running it.

For agents that speak MCP, the [Sevalla MCP server](/ai-agents/overview) is usually the better fit.

## Shell completion

| Shell | Add this line to |
| - | - |
| Bash | `eval "$(sevalla completion bash)"` in `~/.bashrc` |
| Zsh | `eval "$(sevalla completion zsh)"` in `~/.zshrc` |
| Fish | `sevalla completion fish \| source` in `~/.config/fish/config.fish` |

## Update or uninstall

| Installed with | Update | Uninstall |
| - | - | - |
| Homebrew | `brew upgrade sevalla` | `brew uninstall sevalla` |
| npm | `npm install -g @sevalla/cli@latest` | `npm uninstall -g @sevalla/cli` |
| Shell script | Run the install command again | `bash <(curl -fsSL https://raw.githubusercontent.com/sevalla-hosting/cli/main/install.sh) -r` |

Uninstalling doesn't delete `~/.config/sevalla/credentials.json` or the API key behind it. Run `sevalla logout` first, then delete the key under **Tools** > **API keys**.

The source code and release notes are on [GitHub](https://github.com/sevalla-hosting/cli).


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