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

# Tilebox CLI

> Install, authenticate, and use the Tilebox CLI for developer workflows, operations, and AI-assisted development.

The Tilebox CLI is a command-line interface for developers, operators, agents, and automation. Use it to inspect Tilebox resources, manage datasets and workflows, submit jobs, start release runners, and run operational commands from the shell.

The CLI is also the default Tilebox interface for coding agents that can run terminal commands. It keeps actions visible in the shell, supports structured output, and pairs with Tilebox skills for multi-step tasks.

## Install the CLI

Install the Tilebox CLI with the install script.

```bash theme={"system"}
curl -fsSL https://install.tilebox.com/cli.sh | sh
```

<Tip>
  If you want to install the Tilebox CLI and Agent Skills together, use the setup wizard instead.

  ```bash theme={"system"}
  curl -fsSL https://install.tilebox.com/wizard.sh | sh
  ```
</Tip>

## Authenticate

The CLI reads the `TILEBOX_API_KEY` environment variable. Create an API key in the [Tilebox Console](https://console.tilebox.com/settings/api-keys), then export it in the shell or agent environment that runs CLI commands.

```bash theme={"system"}
export TILEBOX_API_KEY="YOUR_TILEBOX_API_KEY"
```

<Note>
  Alternatively, you can also provide the API key, or override the environment variable with the `--api-key` flag in each command.
</Note>

## Discover commands with agent-context

Agents should inspect the CLI instead of guessing command names and flags. The `agent-context` command returns machine-readable information about the available command tree, arguments, flags, and descriptions.

```bash theme={"system"}
tilebox agent-context
```

Use this before asking an agent to create datasets, submit jobs, or manage automations with the CLI.

## Prefer JSON output

Use `--json` when the agent needs to parse command output. Structured output is easier for agents to inspect, filter, and pass to follow-up commands than terminal tables.

```bash theme={"system"}
tilebox dataset list --json
```

## Scaffold workflow projects

Use the CLI to create a Tilebox workflow and scaffold a Python release project.

```bash theme={"system"}
tilebox workflow init --name "Scene QA" --json
```

The command creates the remote workflow, writes `tilebox.workflow.toml`, creates Python project files, adds the `tilebox` dependency, and runs `uv sync`. See [Project Structure](/workflows/build-and-deploy/project-structure) for the generated files and release project layout.

## Use files and standard input for generated input

For larger inputs, prefer file-based flags instead of long shell-quoted strings. The CLI supports input patterns such as `--schema-file`, `--input-file`, `--spatial-extent-file`, and `--description-file`. Many file flags also support `-` for reading from standard input.

```bash theme={"system"}
tilebox dataset create --schema-file schema.json
```

```bash theme={"system"}
# Read from stdin.
cat schema.json | tilebox dataset create --schema-file -
```

This pattern is safer for agents because generated JSON, geometry, and descriptions do not need to be embedded in one fragile shell command.

## Use the CLI with Tilebox skills

The Tilebox skills include guidance for using the CLI in agent workflows. Install them when you want an agent to combine CLI commands into higher-level tasks such as managing datasets, monitoring jobs, or configuring automations.

```bash theme={"system"}
curl -fsSL https://install.tilebox.com/skills.sh | sh
```

After installing the skills, ask your agent to inspect `tilebox agent-context` and follow the relevant Tilebox skill before running commands that change resources. If your agent cannot use a terminal, configure the [Tilebox MCP server](/agents-and-ai-tools/tilebox-mcp) instead.
