qc env
Manage environments within the active application. This is the largest command group in the Cloud CLI — it covers selection, creation, observability (logs, metrics), and state control (start, stop, redeploy).
Subcommands
Section titled “Subcommands”| Command | Description |
|---|---|
qc env list |
List environments for the active application. |
qc env select |
Switch to a different environment. |
qc env current |
Show the active environment. |
qc env create |
Create a new environment, optionally cloning from an existing one. |
qc env logs |
View or tail environment logs. |
qc env metrics |
Open a live metrics dashboard. |
qc env state stop |
Stop an environment. |
qc env state start |
Start an environment. |
qc env state redeploy |
Redeploy an environment. |
qc env vars |
List, get, set and unset environment variables (0.7.0 or later). |
qc env list
Section titled “qc env list”List environments for the active application.
Synopsis
Section titled “Synopsis”qc env list [options]Options
Section titled “Options”| Flag | Description |
|---|---|
--org <org> |
Override the active organization. |
--app <app> |
Override the active application. |
Example
Section titled “Example”qc env listqc env select
Section titled “qc env select”Switch the active environment.
Synopsis
Section titled “Synopsis”qc env select [envId] [options]Arguments
Section titled “Arguments”| Name | Description |
|---|---|
envId |
Environment name to select. Omit for interactive selection. |
Options
Section titled “Options”| Flag | Description |
|---|---|
--org <org> |
Override the active organization. |
--app <app> |
Override the active application. |
Examples
Section titled “Examples”# Interactiveqc env select
# Directqc env select productionqc env current
Section titled “qc env current”Show the current active environment.
Synopsis
Section titled “Synopsis”qc env currentqc env create
Section titled “qc env create”Create a new environment, optionally cloning configuration from an existing one.
Synopsis
Section titled “Synopsis”qc env create [envName] [options]Arguments
Section titled “Arguments”| Name | Description |
|---|---|
envName |
Name for the new environment. |
Options
Section titled “Options”| Flag | Description | Default |
|---|---|---|
--clone-from <envName> |
Existing environment to clone configuration from. | — |
--min-capacity <number> |
Minimum instance capacity. | 1 |
--max-capacity <number> |
Maximum instance capacity. | 10 |
--org <org> |
Override the active organization. | — |
--app <app> |
Override the active application. | — |
Examples
Section titled “Examples”# Create a new environment from scratchqc env create staging
# Clone from productionqc env create staging --clone-from production
# Create with custom scaling boundsqc env create staging --min-capacity 2 --max-capacity 20qc env logs
Section titled “qc env logs”View or tail environment logs.
Synopsis
Section titled “Synopsis”qc env logs [envId] [options]Arguments
Section titled “Arguments”| Name | Description |
|---|---|
envId |
Environment to view logs for. Defaults to the active environment. |
Options
Section titled “Options”| Flag | Description | Default |
|---|---|---|
-f, --follow |
Tail logs in real time. | false |
-n, --lines <number> |
Number of lines to show. | 100 |
--org <org> |
Override the active organization. | — |
--app <app> |
Override the active application. | — |
--env <env> |
Override the active environment. | — |
Examples
Section titled “Examples”# Last 100 linesqc env logs
# Tail in real timeqc env logs -f
# Last 500 linesqc env logs -n 500--lines only trims the entries that the platform returns. If the platform returns fewer entries than you ask for, qc prints those. For a longer window, use the logs page in the dashboard. With --follow, qc checks for new entries about every two seconds.
qc env metrics
Section titled “qc env metrics”Display a live metrics dashboard showing CPU, memory, network, request counts, and error rates.
Synopsis
Section titled “Synopsis”qc env metrics [envId] [options]Arguments
Section titled “Arguments”| Name | Description |
|---|---|
envId |
Environment to monitor. Defaults to the active environment. |
Options
Section titled “Options”| Flag | Description | Default |
|---|---|---|
-r, --refresh <seconds> |
Refresh interval in seconds. | 5 |
--no-clear |
Don’t clear the screen between updates. | — |
--org <org> |
Override the active organization. | — |
--app <app> |
Override the active application. | — |
--env <env> |
Override the active environment. | — |
Examples
Section titled “Examples”# Default 5-second refreshqc env metrics
# Faster refreshqc env metrics -r 2
# Keep history visibleqc env metrics --no-clearqc env state stop
Section titled “qc env state stop”Stop the environment. Running containers are shut down.
Synopsis
Section titled “Synopsis”qc env state stop [envId] [options]Options
Section titled “Options”--org, --app and --env overrides as above.
Example
Section titled “Example”qc env state stop stagingqc env state start
Section titled “qc env state start”Start a stopped environment.
Synopsis
Section titled “Synopsis”qc env state start [envId] [options]Options
Section titled “Options”--org, --app and --env overrides as above.
Example
Section titled “Example”qc env state start stagingqc env state redeploy
Section titled “qc env state redeploy”Redeploy an environment. Use this to roll out a new Docker image without going through the full create-or-update cycle.
Synopsis
Section titled “Synopsis”qc env state redeploy [envId] [options]Options
Section titled “Options”| Flag | Description |
|---|---|
--tag <imageTag> |
Docker image tag to deploy. |
--org <org> |
Override the active organization. |
--app <app> |
Override the active application. |
--env <env> |
Override the active environment. |
Example
Section titled “Example”qc env state redeploy production --tag v1.4.2stop, start and redeploy do not ask for confirmation. Check the target with qc env current before you run them on production.
See also
Section titled “See also”qc env vars— manage environment variables.qc ssh— connect to an environment container.qc backup— back up environment data.qc app— environments live within an application.
