# CLI

`layer` is Layer’s command-line interface. It reaches the same models, workspaces, and Creative Unit balance as the app, from a terminal, a Makefile, or a CI job.

**uv**

```bash
uv tool install layer
```

**pipx**

```bash
pipx install layer
```

**pip**

```bash
pip install layer
```

Then sign in and generate:

```bash
layer login
layer generate image -p "a cyberpunk market stall, isometric"
```

The first run picks the recommended model for the modality, prints what it will cost, waits for the result, and writes the file into your working directory.

[Install](/docs/cli/install)Installers, supported Python versions, and upgrading.

[Authentication](/docs/cli/authentication)Browser sign-in, device codes, and API keys for CI.

[Configuration](/docs/cli/configuration)Profiles, layer.toml, and the environment variables that override them.

[Generating assets](/docs/cli/generate)Image, video, mesh, and audio — every flag, and how runs are priced.

[Models](/docs/cli/base-models)List what your workspace can run, and inspect what a model accepts.

[Scripting](/docs/cli/scripting)JSON output, the stdout/stderr split, and the published exit codes.

## Command surface

| Command                                | What it does                                                 |
| -------------------------------------- | ------------------------------------------------------------ |
| layer login / logout / whoami          | Sign in, sign out, and show who you are signed in as         |
| layer use <workspace>                  | Choose the workspace subsequent commands act on              |
| layer generate image\|video|mesh|audio | Run a generation                                             |
| layer generate status <id>             | Read back a run submitted with \--no-wait                    |
| layer base-models list / show          | The catalogue your workspace can run, and one model’s inputs |

Global options apply to every command: `--profile`, `--workspace`/`-w`, `--project`, `--api-url`, `--json`, `--quiet`/`-q`, and `--version`.

## Other ways to drive Layer

The CLI is for you and your scripts. If the caller is an AI agent rather than a shell, the [MCP server](/docs/mcp) gives it tools instead, and the [Agent Skills](https://layer.ai/skills) teach it the procedures. For your own services, there is the [REST API](/docs/quickstart).
