CLI
Installation
Install the Laioutr CLI globally:
pnpm install -g @laioutr/cli@latest
Or run commands directly without installing:
npx @laioutr/cli@latest <command>
Global flags
All commands accept these flags:
| Flag | Env variable | Default | Description |
|---|---|---|---|
--cockpit-api-host | COCKPIT_API_HOST | https://cockpit.laioutr.cloud | Cockpit API host |
--cwd | CWD | Current directory | Working directory |
--no-color | None | Automatic | Disable colored output |
Use kebab-case for long flag names. The previous camelCase forms remain available as deprecated aliases for compatibility.
Authentication
Some commands require authentication. Two mechanisms exist depending on the command:
- Project secret — used by
rc fetchto download project configuration. Find it in the Cockpit under Settings > Project Secrets. - Organization API key — used by
app releaseanddeploycommands. Create one in the Cockpit under Organization Settings > API Keys. Deployment commands require theproject:deployscope. Pass the key via the--keyflag orLAIOUTR_API_KEYenvironment variable.
Output and errors
The CLI removes ANSI color sequences from deployment logs when output is redirected or piped. You can also disable color with --no-color, a non-empty NO_COLOR environment variable, or TERM=dumb.
API requests time out after 30 seconds. Authentication, missing-resource, rate-limit, server, network, and invalid-response failures include an actionable message without exposing the API response body.
Deployment commands support --json. Errors in JSON mode use a structured object that CI scripts can parse:
{
"error": {
"code": "HTTP_RESPONSE_ERROR",
"message": "Laioutr API authentication failed (401 Unauthorized). Check the API key and required permissions, then try again.",
"status": 401
}
}
Commands
rc fetch
Fetches the laioutrrc.json of a project from the Cockpit API.
laioutr rc fetch -p <org>/<project> -s <project-secret> [filename]
| Flag / Arg | Required | Default | Description |
|---|---|---|---|
-p, --project | Yes | — | <organization slug>/<project slug> |
-s, --project-secret | Yes | — | Project secret key |
-e, --environment-name | No | main | Environment name |
filename | No | laioutrrc.json | Output file path |
rc update
Updates an existing laioutrrc.json with the latest data from the Cockpit API. Reads project and secret from the laioutr metadata inside the file, so no flags are needed.
laioutr rc update [filename]
| Flag / Arg | Required | Default | Description |
|---|---|---|---|
filename | No | laioutrrc.json | File to update |
app release
Publishes an app version to the Laioutr platform. Run this from the app's package directory after the npm package has been published.
laioutr app release --key orgKey_xxx
The command reads name, version, and peerDependencies from package.json and extracts configSchema from src/module.ts automatically.
| Flag | Required | Default | Description |
|---|---|---|---|
-k, --key | Yes | — | Organization API key (LAIOUTR_API_KEY) |
-c, --channel | No | Auto-detected | Release channel: stable or testing. Pre-release versions default to testing. |
deploy trigger
Triggers a project deployment. By default, the command waits for the deployment to complete.
# Production deployment
laioutr deploy trigger --project <org>/<project> --key orgKey_xxx
# Return immediately after triggering
laioutr deploy trigger --project <org>/<project> --key orgKey_xxx --no-wait
# Stream build logs while waiting
laioutr deploy trigger --project <org>/<project> --key orgKey_xxx --logs
# Named preview deployment
laioutr deploy trigger \
--project <org>/<project> \
--key orgKey_xxx \
--preview my-feature
| Flag | Required | Default | Description |
|---|---|---|---|
-p, --project | Yes | — | <organization slug>/<project slug> |
-k, --key | Yes | — | Organization API key with project:deploy scope |
--[no-]wait | No | Wait | Wait for completion; use --no-wait to return after triggering |
--logs | No | — | Stream build log output instead of showing a spinner |
--preview <name> | No | — | Create a preview deployment with an optional name |
--json | No | — | Format output as JSON |
deploy status
Shows the status of a specific deployment.
laioutr deploy status --project <org>/<project> --key orgKey_xxx --deployment-id dep_abc123
| Flag | Required | Default | Description |
|---|---|---|---|
-p, --project | Yes | — | <organization slug>/<project slug> |
-k, --key | Yes | — | Organization API key with project:deploy scope |
--deployment-id | Yes | — | Deployment ID |
--json | No | — | Format output as JSON |
deploy logs
Fetches and displays build logs for a deployment.
laioutr deploy logs --project <org>/<project> --key orgKey_xxx --deployment-id dep_abc123
| Flag | Required | Default | Description |
|---|---|---|---|
-p, --project | Yes | — | <organization slug>/<project slug> |
-k, --key | Yes | — | Organization API key with project:deploy scope |
--deployment-id | Yes | — | Deployment ID |
--json | No | — | Format output as JSON |
deploy list
Lists recent deployments for a project.
# Use the default limit of 20 deployments
laioutr deploy list --project <org>/<project> --key orgKey_xxx
# Return up to 50 deployments
laioutr deploy list --project <org>/<project> --key orgKey_xxx --limit 50
| Flag | Required | Default | Description |
|---|---|---|---|
-p, --project | Yes | — | <organization slug>/<project slug> |
-k, --key | Yes | — | Organization API key with project:deploy scope |
--limit | No | 20 | Maximum deployments to list (1–100) |
--json | No | — | Format output as JSON |