CLI
Overview
Use the Monolayer command-line interface (CLI) to list projects and start deployments from your terminal.
About the Monolayer CLI
This section summarizes the commands that the @monolayer/cli package provides.
The CLI currently supports the following commands:
JavaScript Object Notation (JSON) is the default output format for projects:list.
| Command | Description | Output |
|---|---|---|
projects:list | Lists your projects using cursor-based pagination. | JSON |
deployments:deploy | Triggers a branch deployment and monitors its progress. | Logs and status |
Using the Monolayer CLI
This section gives you a quick workflow for validating access to your control plane.
Concept and Goal
Use this procedure to confirm that your CLI installation can authenticate and run both available commands.
Prerequisites
- You installed the CLI package.
- You have a control plane base URL.
- You have a project auth token and a deployment token.
Numbered Steps
- Set your environment variables in the current terminal session.
export MONOLAYER_BASE_URL="https://control-plane-domain"
export MONOLAYER_AUTH_TOKEN="token_xxx"
export MONOLAYER_DEPLOYMENT_TOKEN="deploy_token_xxx"- Run the project listing command.
npx mnlyr projects:list --limit 5- Run the deployment command.
npx mnlyr deployments:deploy --project-id proj-1 --branch-name mainExpected Result
You see JSON output from projects:list and live deployment status output from deployments:deploy.
CLI Reference
This section points you to task-focused and command-focused pages.
- Installation: Install the package and validate your environment.
- Authentication and Configuration: Configure base URL and token resolution.
- Commands: View detailed reference pages for each command.