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

# Reference

> Compact reference for commands, configuration, bindings, and common failure modes. Use it when you need exact IDs, inputs, and API calls.

## CLI

| Command                                 | Use                                |
| --------------------------------------- | ---------------------------------- |
| `deepline auth register`                | Connect this machine               |
| `deepline auth status --json`           | Confirm host, user, and workspace  |
| `deepline org list`                     | See available workspaces           |
| `deepline org switch <name>`            | Switch interactively               |
| `deepline plays search <query> --json`  | Find prebuilt and saved plays      |
| `deepline plays describe <name> --json` | Inspect inputs and outputs         |
| `deepline plays check <file>`           | Validate a play without running it |
| `deepline plays run <target> --watch`   | Run a file or named play           |
| `deepline plays publish <file>`         | Save and activate a play revision  |

## Config

| Name                | Use                                                                           |
| ------------------- | ----------------------------------------------------------------------------- |
| `DEEPLINE_API_KEY`  | Workspace API key                                                             |
| `DEEPLINE_HOST_URL` | Deepline host override                                                        |
| `.env.deepline`     | Per-workspace file containing only `DEEPLINE_HOST_URL` and `DEEPLINE_API_KEY` |

For automation, put `DEEPLINE_HOST_URL` and `DEEPLINE_API_KEY` in the
workspace folder's `.env.deepline`, then run plain `deepline ...` commands from
that folder.

## Input size limits

| Input size      | Behavior                                              |
| --------------- | ----------------------------------------------------- |
| Up to 100 KB    | Stored inline in coordinator retry state              |
| 100 KB to 1 MiB | Stored as a short-lived artifact-backed retry payload |
| Over 1 MiB      | Rejected; use staged files or `ctx.csv` inputs        |

Play input should contain parameters, filters, and file references. For large
tables, lead lists, research corpora, or documents, pass a file path and read it
inside the play with `ctx.csv(input.csv)` or the relevant file reader.

## Bindings

```ts theme={null}
import { definePlay } from 'deepline';

export default definePlay('inbound', async (_ctx, input: { email: string }) => {
  return { email: input.email };
}, {
  webhook: {},
});
```

```ts theme={null}
import { definePlay } from 'deepline';

export default definePlay('daily', async () => {
  return { ok: true };
}, {
  cron: { schedule: '0 9 * * *', timezone: 'America/New_York' },
});
```

```ts theme={null}
import { definePlay } from 'deepline';

export default definePlay('capped', async () => {
  return { ok: true };
}, {
  billing: { maxCreditsPerRun: 25 },
});
```

## Common fixes

| Symptom                       | Try                                                                   |
| ----------------------------- | --------------------------------------------------------------------- |
| Missing API key               | `deepline auth register` or add `DEEPLINE_API_KEY` to `.env.deepline` |
| Wrong workspace               | `deepline auth status --json`                                         |
| Play syntax fails             | `deepline plays check <file>`                                         |
| Prebuilt called as a tool     | Use `deepline plays run` or `ctx.runPlay`                             |
| Background job used wrong org | Run from the folder with the correct `.env.deepline`                  |
