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

# SabaothCloud CLI

> Manage PostgreSQL services, backups and organizations from your terminal

The `sabaoth` command-line interface lets you work with SabaothCloud from a terminal, a script or a CI pipeline. With it you can:

* Sign in with an API key and switch between organizations
* List, inspect, create and delete PostgreSQL services
* Follow a service's logs live
* Take on-demand backups and list existing ones

Every command can print machine-readable JSON, so the CLI works just as well in automation as it does interactively.

> [!NOTE]
>
> A **service** is a managed PostgreSQL instance, the same as in the dashboard. Service IDs start with `clu_`, and error codes use the API's name for a service, **cluster**, as in `CLUSTER_NOT_FOUND`.

## Get started

> [card] [Install the CLI](https://docs.sabaothcloud.com/cli/installation.md)
>
> Install with npm and check that it works.

> [card] [Sign in](https://docs.sabaothcloud.com/cli/authentication.md)
>
> Log in with an API key, or use an environment variable in CI.

> [card] [Quickstart](https://docs.sabaothcloud.com/cli/quickstart.md)
>
> Create a service, follow its logs and back it up, end to end.

> [card] [Organizations](https://docs.sabaothcloud.com/cli/organizations.md)
>
> Choose which organization each command acts in.

## Commands

| Command | What it does |
| - | - |
| [`sabaoth login`](https://docs.sabaothcloud.com/cli/commands/login) | Sign in with an API key and select its organization |
| [`sabaoth logout`](https://docs.sabaothcloud.com/cli/commands/logout) | Remove locally stored credentials |
| [`sabaoth config`](https://docs.sabaothcloud.com/cli/commands/config) | Show the local context a command would use |
| [`sabaoth org list`](https://docs.sabaothcloud.com/cli/commands/org-list) | List the organizations you can act in |
| [`sabaoth org use`](https://docs.sabaothcloud.com/cli/commands/org-use) | Select an organization |
| [`sabaoth postgres list`](https://docs.sabaothcloud.com/cli/commands/postgres-list) | List PostgreSQL services |
| [`sabaoth postgres get`](https://docs.sabaothcloud.com/cli/commands/postgres-get) | Show one service, including connection details |
| [`sabaoth postgres create`](https://docs.sabaothcloud.com/cli/commands/postgres-create) | Create a service |
| [`sabaoth postgres delete`](https://docs.sabaothcloud.com/cli/commands/postgres-delete) | Permanently delete a service |
| [`sabaoth postgres logs`](https://docs.sabaothcloud.com/cli/commands/postgres-logs) | Follow a service's logs |
| [`sabaoth backup create`](https://docs.sabaothcloud.com/cli/commands/backup-create) | Request an on-demand backup |
| [`sabaoth backup list`](https://docs.sabaothcloud.com/cli/commands/backup-list) | List a service's backups |

Run `sabaoth --help` for the full list, or `sabaoth <command> --help` for any one command's flags and examples.

## Built to be safe by default

* **Your API key stays in the OS keychain.** It is never written to a plain-text file, and no command prints it.
* **Billable or destructive actions ask first.** Creating a service and taking a backup ask for confirmation. Deleting a service asks you to type its ID.
* **No silent retries of changes.** If a create, delete or backup request gets no response, the CLI tells you to check, instead of trying again and risking a duplicate.
* **Output you can trust.** Names and log lines from the server are cleaned before they are printed, so they cannot move your cursor or fake extra output.

## Reference

> [card] [Scripting and CI](https://docs.sabaothcloud.com/cli/scripting.md)
>
> JSON output, exit codes and pipelines.

> [card] [Error codes](https://docs.sabaothcloud.com/cli/errors.md)
>
> Every error code and what to do about it.

> [card] [Troubleshooting](https://docs.sabaothcloud.com/cli/troubleshooting.md)
>
> Fixes for common problems.


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