TheDocumentation Index
Fetch the complete documentation index at: https://docs.compartment.dev/llms.txt
Use this file to discover all available pages before exploring further.
compartment CLI is the primary way to interact with a Compartment deployment. You use it to install the platform, authenticate, deploy projects, manage environments, inspect running services, and administer your organization — all from a single binary.
Installation
You can install the CLI in two ways.Global options
Every command accepts the following options.| Option | Values | Description |
|---|---|---|
--output | text, json | Output format. Defaults to text. |
--help | — | Print help for the command or subcommand. |
JSON output mode
Pass--output json to any command to receive machine-readable output. This is useful in CI/CD pipelines, shell scripts, or any tooling that needs to parse command results.
Command groups
Runcompartment --help to see all top-level commands.
Subcommands are organized into groups. Run
compartment <command> --help to see the subcommands and options available within each group. For example, compartment variable --help lists all variable subcommands.Command reference
Authentication
Log in, log out, switch organizations, and activate new accounts.
deploy
Build and deploy the current project from your working directory.
status
Check the deployment status of your project’s environments.
logs
Stream or tail logs for a running service environment.
inspect
Inspect the runtime state of a deployed service.
variable
Get, set, and import environment variables for your services.
promote
Promote a deployment from one environment to another.
rollback
Roll back a service to a previous successful deployment.