Skip to main content

Using the CLI

Commands come from the control plane, so the CLI always offers what the server supports, without a new release. See them with --help at any level:

launchpad --help
launchpad service --help
launchpad service create --help

Each command's help shows its access level (read, write or admin), required flags and allowed values. The full list is in the command reference.

launchpad workspace list
launchpad project create --name web
launchpad service create --project-id <project-id> --type app --name api
launchpad service deploy <service-id> --image nginx:alpine --wait
launchpad logs tail <service-id> --lines 20

Arguments and flags​

  • IDs are positional arguments: launchpad service get <service-id>. Everything else is a --kebab-case flag.

  • Array flags repeat: --scopes read --scopes write.

  • Object values, and arrays of objects, take JSON inline, @file.json, or - to read standard input:

    launchpad env set <service-id> --vars '{"key":"PORT","value":"8080"}' --vars @db.json
  • A JSON array given to an array-of-objects flag is spliced in, so output can be piped straight back:

    launchpad env get <service-id> -o json | jq .vars | launchpad env set <service-id> --vars -

    --vars '[]' sends an empty set. Note that env set replaces the whole set: keys you don't list are deleted.

Waiting for deployments​

service build, service deploy and service rollback accept --wait. The CLI then follows the deployment until it is released, failed, superseded or rolled_back, for at most 30 minutes.

--wait is on by default in an interactive terminal and off otherwise. Without a terminal, the final deployment is printed to standard output, and only failed exits non-zero (exit code 4).

Prompts and confirmation​

In an interactive terminal, the CLI prompts for missing required inputs (with a picker for IDs), and asks for confirmation before delete and admin operations. -y / --yes skips the confirmation.

With no terminal, with --json, or when CI is set, there are no prompts: a missing input fails with invalid_input and exit code 1.

Refreshing the command list​

The CLI refreshes its cached command list every hour, and whenever you use a command it doesn't know yet. To force a refresh, add --refresh-manifest. Use --api-url to target another server for a single run.