Metadata-Version: 2.4
Name: layer
Version: 1.0.2
Summary: Command-line interface for Layer — AI asset generation for game studios.
Keywords: layer,ai,generative,game-development,cli
Author: Layer
Author-email: Layer <info@layer.ai>
License-Expression: Apache-2.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Software Development :: Build Tools
Requires-Dist: httpx>=0.28.1,<0.29.0
Requires-Dist: keyring>=25.7.0,<26.0.0
Requires-Dist: pydantic>=2.5.2,<3.0.0
Requires-Dist: rich>=13.9.4,<16.0.0
Requires-Dist: tomli>=2.0.1,<3.0.0 ; python_full_version < '3.11'
Requires-Dist: tomli-w>=1.0.0,<2.0.0
Requires-Dist: typer>=0.15.0,<1.0.0
Requires-Python: >=3.10
Project-URL: Homepage, https://layer.ai
Project-URL: Documentation, https://www.layer.ai/docs/cli
Project-URL: Changelog, https://github.com/layerai/app/releases
Description-Content-Type: text/markdown

# layer

Command-line interface for [Layer](https://layer.ai) — AI asset generation for game studios.

> **Pre-release.** This is an early build of the rewritten CLI. Asset generation is
> landing next; today it covers signing in and choosing a workspace.

## Install

```sh
uv tool install --prerelease=allow layer     # or: pipx install --pip-args=--pre layer
```

Working on the CLI itself? Install it from your checkout instead, so the `layer`
command follows the branch you have out:

```sh
task -d apps/cli-py install-cli
```

## Sign in

```sh
layer login                 # opens a browser
layer login --device        # for SSH sessions and containers
layer whoami
layer use zynga-solitaire
```

For CI and other unattended runs, set `LAYER_API_KEY` to a personal access token instead
of signing in.

## Where settings come from

Highest wins:

1. a command-line flag
2. an environment variable — `LAYER_PROFILE`, `LAYER_WORKSPACE`, `LAYER_PROJECT`,
   `LAYER_API_URL`, `LAYER_API_KEY`
3. `layer.toml`, found by walking up from the working directory
4. the active profile in `~/.layer/config.toml`

Committing a `layer.toml` pins a checkout to its workspace, so two repos open in two
terminals cannot generate into each other's:

```toml
workspace = "zynga-solitaire"
project   = "season-12-art"
```

## Scripting

`--json` puts the result on stdout and nothing else — progress, warnings, and errors all
go to stderr, so a pipeline never has to filter them out.

```sh
layer --json whoami | jq -r .workspace
```

Exit codes: `0` ok, `1` error, `2` usage, `3` auth, `4` insufficient balance,
`5` invalid input, `6` content policy, `7` timeout.

## Documentation

<https://www.layer.ai/docs/cli>

## Licence

Apache-2.0
