Skip to content
Changelog

Report a bug

CLI Reference

Use Type CLI to deploy a project folder and to manage the automation after the deploy. Install it and log in first:

Terminal window
curl -fsSL https://type.com/install.sh | sh
type-cli auth login
GoalCommand
Deploy or update a foldertype-cli automations deploy <folder> --space <space>
Follow a deploytype-cli automations deployment <deployment-id> --space <space> --follow
Show the saved automationtype-cli automations get <automation-id> --kind scheduled --json
List automationstype-cli automations list --space <space>
Show runstype-cli automations history --space <space> --automation <automation-id>
Show one run in detailtype-cli automations history --space <space> --run <run-id> --include-activity
Pausetype-cli scheduled-actions disable <automation-id> --space <space>
Resumetype-cli scheduled-actions enable <automation-id> --space <space>
Archivetype-cli scheduled-actions archive <automation-id> --yes
Delete permanentlytype-cli scheduled-actions delete <automation-id> --permanent --yes

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

Terminal window
type-cli automations deploy [<folder>] --space <space> [--timeout <seconds>] [--expires-in <duration> | --expires-at <time> | --max-runs <count> | --no-expiration] [--json]
Argument or flagDefaultMeaning
<folder>.The project folder. It must contain type.json.
--space—Required. The Space that owns the automation.
--timeout600How long the CLI waits, in seconds. 1 to 3600.
--expires-in—Expire after a duration from the first activation, for example 30s, 15m, 5h, or 7d.
--expires-at—Expire at an ISO timestamp with Z or an offset.
--max-runs—Expire after this number of live runs.
--no-expiration—Remove the expiration for this deploy.
--jsonoffPrint JSON lines.

Use at most one expiration flag. It overrides type.json and the source for this deploy only. The next deploy without a flag uses the project value again. See Expiration.

What the command does:

  1. Reads and validates the folder on your computer. See Project Files.
  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.
  5. Prints each deploy stage until the deploy is active or failed.
  6. Writes the automation ID to .type/deployment.json.

Example output:

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

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

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

Deploy rules:

  • A successful deploy enables the automation.
  • 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.
  • Two automations in the same Space cannot have the same name.
  • A deploy expires after 10 minutes if it does not activate.
  • 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.
Terminal window
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 reads the status one time. With --follow, it prints each stage until the deploy ends.

Statuses: running, active, failed.

Terminal window
type-cli automations get <automation-id> --kind scheduled [--json]

Shows the saved automation. For a code automation, the result includes codeExecution, codeFiles, and subscriptionStatuses. Each subscription status is pending, active, paused, or disabled.

Terminal window
type-cli automations history --space <space> [--automation <id>] [--run <id>] [--status <status>] [--since <time>] [--limit <n>] [--include-activity] [--include-content]
FlagMeaning
--automationShow runs of one automation.
--runShow one run.
--statusrunning, completed, failed, or cancelled.
--since, --untilISO time, or a relative time such as 7d or 12h. --until is exclusive.
--limit1 to 100. Default 20.
--cursorThe next page.
--modelive, test, unknown, or all.
--include-activityAdd the steps of each run.
--include-contentAdd message content.
--max-chars1 to 48,000. Default 8,000.

Use --all-spaces instead of --space to read all Spaces that you can access.

These commands require code-first-automations. Report commands additionally require automation-visualizations.

Terminal window
type-cli automations schema --live --json
type-cli automations test-code <automation-id> --space <space> --arguments-file ./fixture.json --json
type-cli scheduled-actions update <automation-id> --space <space> --max-runs 10 --json
type-cli scheduled-actions update <automation-id> --space <space> --no-expiration --json
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

Pause the automation before test-code and sign in as its creator. A fixture contains subscriptionId and payload, with optional checkpoint, matcher, and recorded responses. The command returns its result and testedDefinitionHash; it does not enable the automation. Use --arguments-file - for stdin or --arguments '<JSON>' for inline input.

Report updates require the current revision. Read it before editing and re-read after a version conflict. The update file contains visualization plus optional layout and binding fields. Hide preserves the saved report, and restore uses it. Export supports json and image; it does not deliver reports to external services.

With the feature enabled, get includes connection health and intervention details, while detailed history can include code results, call journals, retrospectives, and report errors. Use --run <id> --include-activity --include-content for rich run details. They share the redacted --max-chars budget with activity; detailContentOmitted names omitted fields. Secondary feature gates still apply.

See Type CLI for input details and expiration options.

FlagEnvironment variableMeaning
--jsonTYPE_JSON=1Print JSON.
--no-inputTYPE_NO_INPUT=1Do not ask questions. Commands that need approval fail unless you add --yes.
--profile <name>TYPE_PROFILEUse a saved login profile. Default default.
--org <org>TYPE_ORG_IDUse a workspace.
--server <url>TYPE_SERVER_URLDefault https://api.type.com.
Exit codeError codeMeaning
0—Success.
1unexpected_errorAn unknown error.
2invalid_input, version_conflictThe input is not valid, or the data changed. Also returned when code automations are not on for the workspace.
3auth_requiredRun type-cli auth login.
4permission_deniedYou do not have access.
5ambiguous_resourceMore than one item matches.
6unavailable, rate_limitedThe deploy failed, the wait timed out, or Type is not available.
8not_foundThe item does not exist.

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

  • automations test-code tests saved, paused code with fixtures; deployment still runs the project’s fixture suite.
  • automations tests start and scheduled-actions test test agent instructions. 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 discover code commands when the feature is enabled.