Reference

CLI Reference

The LaunchCloud CLI wraps the REST API so you can create projects and ship deployments from your terminal or a CI pipeline. Every command acts on the organization tied to your credentials.

Installation

Install globally with npm. The package installs a lc command (with launchcloud as an alias):

npm install -g @launchcloud/cli
lc --version

Or run it on demand without installing:

npx @launchcloud/cli deployments create --project-id clx0abc123 ./dist

Requires Node.js 18+.

Authentication

The CLI authenticates one of two ways: an interactive browser login for everyday use, or an API key for CI and anywhere else a browser isn't available.

Browser login

Run lc login once to authenticate. The command runs an OAuth 2.0 Authorization Code + PKCE flow: the CLI discovers the authorization server, opens your browser, captures the redirect on a local loopback port, and exchanges the result for tokens. Tokens are stored in ~/.launchcloud/credentials.json (owner-readable only) and the access token is refreshed automatically when it expires.

API key

Set LC_API_KEY to authenticate without a browser. Create a personal key under Account → API keys in the dashboard, then export it - the CLI sends it as a Bearer token on every request:

export LC_API_KEY=lc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
lc projects list

LC_API_KEY takes precedence over any stored browser credentials, so a shell that has it set always acts as that key. There is no lc login step, and lc logout won't clear it - delete the key in the dashboard to revoke it, which takes effect immediately.

Keep the key in your CI provider's secret store rather than in the repository. A key is shown only once, when you create it, and cannot be retrieved afterwards.

Either way, the credentials act with the same permissions as your account within the organization they belong to.

Global options

FlagDescription
--jsonEmit machine-readable JSON instead of a table. Available on every command.
-v, --versionPrint the installed CLI version.
--helpShow help for the CLI or any subcommand.

Environment variables

VariablePurposeDefault
LC_API_KEYPersonal API key to authenticate with instead of a browser login. Takes precedence over stored credentials.None
LC_CONFIG_DIRDirectory holding credentials and the cached OAuth client.~/.launchcloud

Authentication commands

lc login

Authenticate the CLI with your LaunchCloud account via your browser (OAuth) and store the resulting tokens. Not needed when LC_API_KEY is set.

lc login

lc logout

Remove the stored credentials from this machine. This does not affect LC_API_KEY; unset it (or delete the key in the dashboard) to stop using it.

lc logout

Auth providers

lc auth list

List the organization's configured auth providers (e.g. Google, SAML). Use the provider id when creating or updating a project with --auth-id.

lc auth list

Projects

lc projects list

List the projects in your organization.

lc projects list [options]
  • -q, --query <text> - Filter by project name.
  • --page <n> - Page number.
  • --page-size <n> - Results per page, up to 100.
  • --json - Output raw JSON.

lc projects get

Show a single project's details.

lc projects get <projectId>

lc projects create

Create a new project. A project must be protected, so exactly one of --password or --auth-id is required.

lc projects create --name <name> (--password <value> | --auth-id <id>)
  • --name <name> - Project name. Required.
  • --password <value> - Gate the project's content behind a password.
  • --auth-id <id> - Link the project to an auth provider id (see lc auth list).
# Password-protected
lc projects create --name "Marketing site" --password s3cret

# Gated by an existing auth provider
lc projects create --name "Docs" --auth-id 3

lc projects set-auth

Change how an existing project is protected: set a password, link an auth provider, or clear protection entirely. Exactly one of --password, --auth-id, or --clear is required.

lc projects set-auth --project-id <id> (--password <value> | --auth-id <id> | --clear)
  • --project-id <id> - Target project. Required.
  • --password <value> - Protect the project with a password.
  • --auth-id <id> - Link the project to an auth provider id.
  • --clear - Remove password protection and unlink any provider.
lc projects set-auth --project-id clx0abc123 --auth-id 3

lc projects delete

Permanently delete a project and all of its deployments.

lc projects delete <projectId>

Deployments

lc deployments create

Upload a directory (or a single file) as a new deployment for a project. The folder structure is preserved and the snapshot becomes the live version.

lc deployments create --project-id <id> <path>
  • --project-id <id> - Target project. Required.
  • <path> - Directory or file to deploy.
  • --json - Output the created deployment as JSON.
lc deployments create --project-id clx0abc123 ./dist

lc deployments list

List a project's deployments, most recent first.

lc deployments list --project-id <id>

lc deployments get

Fetch a single deployment. Deployments are scoped to their project, so both ids are required.

lc deployments get --deployment-id <id> --project-id <id>

Scripting

Every command accepts --json to print raw JSON instead of a table, which is handy for piping into tools like jq:

lc projects list --json | jq '.projects[].id'