# Type CLI Reference for Automations

> Type CLI commands to deploy, follow, inspect, pause, and delete Type.com code automations, plus how to install the CLI and log in.

Canonical page: https://docs.type.com/automations/reference/cli/

Use [Type CLI](https://docs.type.com/reference/type-cli/index.md) to deploy a project folder and to manage the automation after the deploy. Install it and log in first:

```sh
curl -fsSL https://type.com/install.sh | sh
type-cli auth login
```

## Commands

| Goal | Command |
| --- | --- |
| Deploy or update a folder | `type-cli automations deploy <folder> --space <space>` |
| Follow a deploy | `type-cli automations deployment <deployment-id> --space <space> --follow` |
| Show the saved automation | `type-cli automations get <automation-id> --kind scheduled --json` |
| List automations | `type-cli automations list --space <space>` |
| Show runs | `type-cli automations history --space <space> --automation <automation-id>` |
| Show one run in detail | `type-cli automations history --space <space> --run <run-id> --include-activity` |
| Test saved code with a fixture | `type-cli automations test-code <automation-id> --space <space> --arguments-file ./fixture.json` |
| Pause | `type-cli scheduled-actions disable <automation-id> --space <space>` |
| Resume | `type-cli scheduled-actions enable <automation-id> --space <space>` |
| Archive | `type-cli scheduled-actions archive <automation-id> --yes` |
| Delete permanently | `type-cli scheduled-actions delete <automation-id> --permanent --yes` |

Type.com stores a deployed code automation as a scheduled action. That is why pause, resume, archive, and delete use `scheduled-actions` commands.

To see every automation command and flag that your workspace allows, run `type-cli automations schema --live --json`.

## `automations deploy`

```sh
type-cli automations deploy [<folder>] --space <space> [--timeout <seconds>] [--expires-in <duration> | --expires-at <time> | --max-runs <count> | --no-expiration] [--json]
```

| Argument or flag | Default | Meaning |
| --- | --- | --- |
| `<folder>` | `.` | The project folder. It must contain `type.json`. |
| `--space` | — | Required. The Space that owns the automation. |
| `--timeout` | `600` | How long the CLI waits, in seconds. 1 to 3600. |
| `--expires-in` | — | Expire after a duration from the first activation: a whole number with `s`, `m`, `h`, or `d`, for example `30s`, `15m`, `5h`, or `7d`. 1 to 315,576,000 seconds. |
| `--expires-at` | — | Expire at an ISO timestamp with `Z` or an offset, for example `2026-10-10T10:00:00-06:00`. |
| `--max-runs` | — | Expire after this number of live runs. 1 to 2,147,483,647. |
| `--no-expiration` | — | Remove the expiration for this deploy. |
| `--follow` | — | Accepted, but has no effect. `deploy` always prints progress. |
| `--json` | off | Print JSON lines. |

Use at most one expiration flag. It replaces `type.json` and the source for this deploy only. The next deploy without a flag uses the project value again. See [Expiration](https://docs.type.com/automations/reference/deployment/index.md#expiration).

What the command does:

1. Reads and validates the folder on your computer. See [Project Files](https://docs.type.com/automations/reference/project-files/index.md).
2. Creates `.type/project.json` if it does not exist. This file is the identity of the project.
3. Writes a new deployment ID to `.type/deployment.json`.
4. Sends the project to Type and prints the deployment ID.
5. Prints each deploy step until the deploy is `active`, `paused`, or `failed`.
6. Writes the automation ID to `.type/deployment.json`.

Example output for the [project in Project Files](https://docs.type.com/automations/reference/project-files/index.md#fixturesjson):

```text
Deployment 3f6c2a4e-8b1d-4c2a-9f0e-1a2b3c4d5e6f
deployment: started
validation: started
validation: succeeded
fixtures [records the scheduled time]: started
fixtures [records the scheduled time]: succeeded
subscription [hourly]: started
subscription [hourly]: succeeded
activation: started
activation: succeeded
deployment: succeeded
Deployment 3f6c2a4e-8b1d-4c2a-9f0e-1a2b3c4d5e6f: active
Automation: atask_01k...
```

Each line is `<step> [<key>]: <status> — <message>`. The steps are `deployment`, `validation`, `fixtures`, `subscription`, and `activation`. The key is a fixture name, a subscription key, or a webhook adapter key. A failed step shows the error message.

With `--json`, the command prints one JSON object on each line:

```json
{"type":"deployment","deploymentId":"3f6c2a4e-..."}
{"type":"checkpoint","deploymentId":"3f6c2a4e-...","automationId":"atask_...","stage":"validation","status":"succeeded","sequence":2,"at":"2026-10-13T12:00:01.000Z"}
{"ok":true,"operation":"automations.deploy","deploymentId":"3f6c2a4e-...","automationId":"atask_...","status":"active","events":[...]}
```

Deploy rules:

- The first deploy of a folder turns the automation on. A later deploy keeps the current state. If the automation is paused, the deploy ends `paused` with "Saved paused. Enable the automation explicitly when ready."
- If a deploy fails, the automation keeps its last active revision.
- A folder can have only one deploy in progress.
- Only the person who created the automation can deploy to it again.
- While Type has paused an automation for a person (repeated failures, an account to reconnect, or an agent's request), a deploy is refused until it is enabled again.
- Two automations in the same Space cannot have the same `name`.
- Type stops a deploy that runs longer than 10 minutes.
- If the CLI stops waiting, it prints the command to follow the deploy and exits with code 6. The deploy keeps running.
- If you lose the connection during a deploy, do not deploy again at once. Use `automations deployment` with the ID from `.type/deployment.json` to read the result.

> **Caution:** The automation ID comes from `.type/project.json` and the Space. Keep this file. If you delete it, the next deploy makes a new automation. If you deploy the same folder to a different Space, Type.com makes a different automation.

## `automations deployment`

```sh
type-cli automations deployment <deployment-id> --space <space> [--follow] [--timeout <seconds>] [--json]
```

Reads the status of a deploy. `<deployment-id>` is the UUID that `deploy` printed. Without `--follow`, it prints the current status one time. With `--follow`, it prints each step until the deploy ends, or until `--timeout` (default 600 seconds).

Statuses: `running`, `active`, `paused`, `failed`. A `failed` deploy exits with code 6.

## `automations get`

```sh
type-cli automations get <automation-id> --kind scheduled [--json]
```

Shows the saved automation. `--kind` is required. For a code automation, the result includes `codeExecution`, `codeFiles`, and `subscriptionStatuses`. Each subscription status is `pending`, `active`, `paused`, or `disabled`. The result can also include connection health, recovery details, and a request for human intervention.

## `automations list`

```sh
type-cli automations list (--space <space> | --all-spaces) [--kind scheduled|event|all] [--json]
```

Lists the automations in one Space, or in all Spaces that you can access. Use exactly one of `--space` and `--all-spaces`. `--kind` defaults to `all`.

## `automations history`

```sh
type-cli automations history --space <space> [--automation <id>] [--status <status>] [--mode <mode>] [--since <time>] [--until <time>] [--limit <n>] [--kind <kind>]
type-cli automations history --space <space> --run <id> [--include-activity [--include-content [--max-chars <n>]]]
```

| Flag | Meaning |
| --- | --- |
| `--automation` | Show runs of one automation. |
| `--run` | Show one run. Do not combine it with `--automation`, `--status`, `--mode`, `--since`, or `--until`. |
| `--status` | `running`, `completed`, `failed`, or `cancelled`. |
| `--mode` | `live`, `test`, `unknown`, or `all`. |
| `--kind` | `scheduled`, `event`, or `all`. Default `all`. |
| `--since`, `--until` | An ISO time with a time zone, or a relative time such as `7d` or `12h`. `--until` is exclusive. |
| `--limit` | 1 to 100. Default 20. |
| `--cursor` | The next page. Use it without the other filters. |
| `--include-activity` | Add the steps of the run. Requires `--run`. |
| `--include-content` | Add message content. Requires `--include-activity`. |
| `--max-chars` | 1 to 48,000. Default 8,000. Requires `--include-content`. |

Use `--all-spaces` instead of `--space` for a summary report across all Spaces that you can access. The report has no run details.

For a code automation, run details can include the code result, the call journal, recovery details, and report errors.

## `automations test-code`

```sh
type-cli automations test-code <automation-id> --space <space> (--arguments-file <path> | --arguments '<JSON>') [--json]
```

Runs one fixture against the saved code. Use `--arguments-file -` to read the fixture from stdin.

- The automation can be on or paused.
- You must be a member of the automation's Space.
- The fixture has the same fields as a case in `fixtures.json`, without `name`, `expectedOutput`, and `expectedError`. See [Project Files](https://docs.type.com/automations/reference/project-files/index.md#fixturesjson).
- The command returns the result and `testedDefinitionHash`. It does not turn the automation on. If a member's **Enable** was waiting for a test, a passing test can complete it.

## Pause, resume, archive, and delete

| Command | Notes |
| --- | --- |
| `scheduled-actions disable <id> --space <space> [--finish-runs \| --stop-runs]` | Stops new runs. By default, runs in progress stop at their next stage; an agent stage that is already running finishes its turn first. `--finish-runs` lets them finish; `--stop-runs` stops them now and cancels agent turns already running. |
| `scheduled-actions enable <id> --space <space>` | In some workspaces, enable requires a completed private test of the current definition first. The command then fails with `test_required` or `test_in_progress`. A person can always enable the automation from its page in Type. |
| `scheduled-actions archive <id> --yes` | Turns off and hides the automation, and stops its runs in progress. Configuration and run history remain. |
| `scheduled-actions delete <id> --permanent --yes` | Deletes the automation. Run records and delivered output remain. This cannot be undone. Without `--permanent`, `delete` archives. |

Without `--yes`, archive and delete ask before they change anything.

## Reports

```sh
type-cli automations visualization get <automation-id> --space <space> --json
type-cli automations visualization update <automation-id> --space <space> --patch-file ./report.json --expected-revision 4 --json
type-cli automations visualization hide <automation-id> --space <space> --expected-revision 5 --json
type-cli automations visualization restore <automation-id> --space <space> --expected-revision 6 --json
type-cli automations visualization export <automation-id> --space <space> --destination json --json
```

- `update`, `hide`, and `restore` require the current revision in `--expected-revision`. Read the report first. After a version conflict, read it again.
- The update file contains `visualization`, and optional `layoutPrompt`, `stateSources`, and `dataSources`. Use `--patch-file -` for stdin.
- `hide` keeps the saved report. `restore` shows it again.
- `export` supports `--destination json` (the default) and `image`.

## Global flags

| Flag | Environment variable | Meaning |
| --- | --- | --- |
| `--json` | `TYPE_JSON=1` | Print JSON. |
| `--no-input` | `TYPE_NO_INPUT=1` | Do not ask questions. Commands that need approval fail unless you add `--yes`. |
| `--profile <name>` | `TYPE_PROFILE` | Use a saved login profile. Default `default`. |
| `--org <org>` | `TYPE_ORG_ID` | Use a workspace. |
| `--server <url>` | `TYPE_SERVER_URL` | Default `https://api.type.com`. |

## Exit codes

| Exit code | Error code | Meaning |
| --- | --- | --- |
| 0 | — | Success. |
| 1 | `unexpected_error` | An unknown error. |
| 2 | `invalid_input`, `version_conflict`, `test_required`, `test_in_progress` | The input is not valid, or the data changed. Also returned when you deploy and code automations are not on for the workspace. |
| 3 | `auth_required` | Run `type-cli auth login`. |
| 4 | `permission_denied` | You do not have access. Also returned by `test-code` and report commands when their feature is not on. |
| 5 | `ambiguous_resource` | More than one item matches. |
| 6 | `unavailable`, `rate_limited` | The deploy failed, the wait timed out, or Type is not available. |
| 8 | `not_found` | The item does not exist. |

With `--json`, an error prints `{"ok":false,"error":{"code","message","details"}}`.

## Limitations

- `automations test-code` runs one fixture against saved, paused code. Each deploy still runs the project's `fixtures.json`.
- `automations tests start` and `scheduled-actions test` send the automation's instructions to an agent in a private thread. They do not run your code with fixtures.
- The CLI has no `logs` command. Use `automations history --run <id> --include-activity`.
- Offline `automations schema` omits code commands. Use `automations schema --live` to see them when the feature is on.
