> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leanly.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

> Manage deployments, stacks, and configuration from your terminal.

The Leanly CLI brings the full platform to your terminal. Use it to deploy apps, inspect stacks, and manage integrations — without leaving your development environment.

## Before you begin

* **Node.js v22.11.0 or later** — LTS versions are recommended. [Download Node.js](https://nodejs.org)

## Install

To install or update the CLI, run the following.

<CodeGroup>
  ```bash npm theme={null}
  npm install leanly --global
  ```

  ```bash pnpm theme={null}
  pnpm add leanly --global
  ```

  ```bash yarn theme={null}
  yarn global add leanly
  ```

  ```bash bun theme={null}
  bun add leanly --global
  ```
</CodeGroup>

## Commands

### login

Authenticate with your Leanly account. Opens a browser window to complete the login flow.

```bash theme={null}
leanly login
```

| Flag                  | Description                                                                |
| --------------------- | -------------------------------------------------------------------------- |
| `--timeout <seconds>` | How long to wait for authentication to complete (default: 300)             |
| `--select-tenant`     | Prompt to select a tenant instead of using the previously logged in tenant |
| `--tenant-id <id>`    | Specify a tenant ID to use for this session                                |
| `--no-open`           | Print the authentication URL instead of opening it in a browser            |

<Info>There's more where that came from. Run `leanly --help` to see everything available in your installed version.</Info>
