# Type CLI

> Use the Type command line tool to sign in, sync skills, and push local agent sessions.

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

The Type CLI lets you manage Type from a terminal or from a local AI agent session. Use it to sync local skills to agents and move a local agent conversation into a Type thread.

The executable is `type-cli`.

If you want to use Type directly from Claude or another supported MCP client without installing a local binary, use [Type MCP](https://docs.type.com/reference/type-mcp/index.md). Type MCP is also the better fit when an agent runs in a cloud-hosted environment, including Claude Cowork in cloud mode, where the compute cannot access a `type-cli` binary installed on your machine.

## Install the CLI

If you use the Type desktop app, the CLI is bundled with the app:

```sh
/Applications/Type.app/Contents/Resources/bin/type-cli install-shell --yes
```

This installs a `type-cli` command and configures supported shells so the Type CLI is available on PATH. Restart your shell after installation.

Standalone beta binaries are published from the Type CLI release workflow. To install the latest released CLI with the shell installer:

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

You can also download a release asset manually, make it executable, then install it into your shell:

```sh
chmod +x ./type-cli-linux-x64
./type-cli-linux-x64 install-shell --yes
```

Check that the CLI is available:

```sh
type-cli version
```

`type-cli version` shows the installed CLI version and whether it is managed by the Type desktop app, the standalone installer, or a manual/development path.

Both the desktop install path and the standalone shell installer also make a best-effort attempt to install a local Type CLI skill for Claude Code and Codex when those tools are detected on your machine. This lets local agent sessions discover when the Type CLI is useful and how to call it safely.

To repair or re-run only the local agent skill setup:

```sh
type-cli install-agent-skills
```

To target one local agent:

```sh
type-cli install-agent-skills --agent claude
type-cli install-agent-skills --agent codex
```

To skip local agent skill setup during install:

```sh
TYPE_CLI_SKIP_AGENT_SKILLS=1 curl -fsSL https://type.com/install.sh | sh
```

For scripts that only need the version string, use:

```sh
type-cli --version
```

## Update the CLI

If you installed the CLI from the Type desktop app, update the Type app to update the bundled CLI.

If you installed the standalone CLI with the shell installer, update it in place:

```sh
type-cli update
```

Updates also refresh existing Type-managed local agent skills so agents see command guidance that matches the current binary. This preserves the local agents you previously installed the skill for; for example, a prior `type-cli install-agent-skills --agent claude` install is refreshed only for Claude. For desktop-managed installs, `type-cli update` does not update the app binary, but it still refreshes those existing local skills from the bundled CLI.

Preview the available update without replacing the current binary:

```sh
type-cli update --dry-run
```

## Sign in

Sign in before running workspace commands:

```sh
type-cli auth login
```

The CLI opens a browser window and asks you to finish signing in to Type. If you are working in an environment that cannot open a browser, print the login URL instead:

```sh
type-cli auth login --no-open
```

Check your current session:

```sh
type-cli auth status
```

Show the signed-in user and active workspace:

```sh
type-cli whoami
```

Sign out:

```sh
type-cli auth logout
```

## Manage CLI analytics

The CLI sends best-effort product analytics for command usage and authenticated CLI outcomes. Analytics failures never change command output or exit codes.

Check the current analytics setting:

```sh
type-cli analytics status
```

Persistently disable or re-enable CLI analytics:

```sh
type-cli analytics disable
type-cli analytics enable
```

Disable analytics for one process without changing the saved preference:

```sh
TYPE_CLI_ANALYTICS=0 type-cli skills list --global
```

## Choose a workspace

List the Type workspaces available to your signed-in account:

```sh
type-cli orgs list
```

Set the default workspace:

```sh
type-cli orgs use acme
```

Most commands use your active workspace. If you belong to more than one workspace, pass `--org` to choose one for a single command:

```sh
type-cli skills sync ./skills/pr-review --global --org acme-test
```

Local agent scripts can use `TYPE_ORG` instead of repeating `--org`:

```sh
TYPE_ORG=acme-test type-cli skills sync ./skills/pr-review --global
```

## Work with Type documents

Use `type-cli documents` when you want Markdown files on your machine to become editable Type documents, or when you want to bring an existing Type document down for local editing.

List recent documents you can access:

```sh
type-cli documents list
```

Search by title or Markdown content:

```sh
type-cli documents list "launch plan"
```

Create a document from a local Markdown file:

```sh
type-cli documents push --file ./docs/launch-plan.md --title "Launch Plan" --agent @engineering
```

`push` is best for one-off uploads, stdin, or scripts that already know the document ID. By default, new documents are channel-scoped. Add `--public` only when the document should be accessible to anyone with the link:

```sh
type-cli documents push --file ./docs/status.md --title "Weekly Status" --agent @engineering --public
```

Update an existing document by ID:

```sh
type-cli documents push wart_123 --file ./docs/launch-plan.md
```

Use `sync` for local files you expect to maintain over time. The first sync creates the document and records a local mapping in `~/.type`; later syncs update the same Type document:

```sh
type-cli documents sync --file ./docs/launch-plan.md --title "Launch Plan" --agent @engineering
```

After the first sync, you can run:

```sh
type-cli documents sync --file ./docs/launch-plan.md
```

Link an existing Type document to a local file before syncing it:

```sh
type-cli documents sync --file ./docs/launch-plan.md --link wart_123
```

Pull an existing Type document into a local Markdown file:

```sh
type-cli documents pull wart_123 --file ./docs/launch-plan.md
```

Write a pulled document to stdout instead:

```sh
type-cli documents pull wart_123 --file -
```

Preview create, update, or sync work before writing:

```sh
type-cli documents sync --file ./docs/launch-plan.md --title "Launch Plan" --agent @engineering --dry-run
```

Document commands return share links. In agent workflows, pass `--json --no-input` so the agent can parse document IDs and URLs without prompts.

## Sync skills to an agent

Use `type-cli skills sync` to create or update a Type skill from a local skill folder.

```sh
type-cli skills sync ./skills/pr-review --agent @engineering
```

The skill folder should include a `SKILL.md` file. Optional `scripts`, `references`, and `assets` folders are uploaded with the skill.

On the first sync, Type creates the skill and attaches it to the agent. On later syncs, Type updates the existing skill.

Preview the change without uploading:

```sh
type-cli skills sync ./skills/pr-review --agent @engineering --dry-run
```

Create a new skill every time instead of updating a linked skill:

```sh
type-cli skills push ./skills/pr-review --agent @engineering
```

If a skill with the same name already exists for the target, `push` fails by default. Use `--force` to update the existing same-name skill when the CLI can resolve it unambiguously:

```sh
type-cli skills push ./skills/pr-review --agent @engineering --force
```

List skills attached to an agent:

```sh
type-cli skills list --agent @engineering
```

Inspect a skill and its packaged files:

```sh
type-cli skills inspect skill_123
```

## Sync skills to the workspace library

Use `--global` to create or update workspace-level skills instead of attaching the skill to one agent.

```sh
type-cli skills sync ./skills/pr-review --global
```

List workspace-level skills:

```sh
type-cli skills list --global
```

Use `--link` when one local skill directory should sync to an existing Type skill:

```sh
type-cli skills sync ./skills/pr-review --global --link skill_123
```

Skill packages currently support UTF-8 text files. Binary skill assets are not supported yet.

## Push a local agent session

Use `type-cli sessions push` to move a local Claude or Codex session, or an exported agent transcript, into Type.

Choose exactly one push source: use `--current` to discover the active provider session, or use `--file <path>` to push a specific transcript file. The CLI rejects commands that pass both.

```sh
type-cli sessions push --from claude --current --agent @engineering
```

```sh
type-cli sessions push --from codex --current --agent @engineering
```

You can also push a specific transcript file:

```sh
type-cli sessions push --file ./handoff/session.jsonl --agent @engineering
```

Type creates a new thread and returns the thread URL. The pushed thread includes the transcript and provider metadata so you can continue the work on type.com.

Add a title:

```sh
type-cli sessions push --file ./handoff/session.jsonl --agent @engineering --title "Checkout bug investigation"
```

File attachments and redaction are not supported yet. If you pass `--include-files` or `--redact`, the CLI returns an unsupported error instead of silently ignoring it.

```sh
type-cli sessions push --file ./handoff/session.jsonl --agent @engineering --include-files "notes/*.md"
```

Preview what will be uploaded:

```sh
type-cli sessions push --file ./handoff/session.jsonl --agent @engineering --dry-run
```

If the current Claude or Codex session is too large for the inline push limit, push the newest complete records that fit:

```sh
type-cli sessions push --from codex --current --agent @engineering --tail
```

## Use the CLI from local agents

Local agents can call the same commands people use. For reliable agent workflows, use `--json` and `--no-input`:

```sh
type-cli skills sync ./skills/pr-review --agent @engineering --json --no-input
```

In JSON mode, stdout contains one JSON object. Progress and warnings are written to stderr so the response stays parseable.

Successful responses include IDs and URLs:

```json
{
  "ok": true,
  "operation": "skill.sync",
  "skill": {
    "id": "skill_123",
    "handle": "pr-review",
    "url": "https://type.com/acme/skills/skill_123"
  },
  "agent": {
    "id": "agent_456",
    "handle": "engineering"
  }
}
```

If the CLI needs a decision and `--no-input` is set, it fails with a structured error instead of prompting.

## Resource references

Commands accept stable IDs and handles.

| Resource | Accepted references |
| --- | --- |
| Agent | `@handle`, `agent_...` |
| Skill | `skill_...`, skill handle |
| Workspace | workspace slug, organization ID |

Use IDs in scripts and agent workflows. Handles are easier for humans but can become ambiguous.

## Files and secrets

The CLI never uploads known secret files by default. It excludes files such as `.env`, private keys, local credential stores, `node_modules`, and `.git`.

Use `--dry-run` before large session pushes to review what will be sent to Type.

## Common commands

| Task | Command |
| --- | --- |
| Sign in | `type-cli auth login` |
| Check session | `type-cli auth status` |
| List workspaces | `type-cli orgs list` |
| Set active workspace | `type-cli orgs use acme` |
| List agents | `type-cli agents list` |
| List documents | `type-cli documents list` |
| Create a document | `type-cli documents push --file ./doc.md --title "Title" --agent @engineering` |
| Sync a maintained document | `type-cli documents sync --file ./doc.md --title "Title" --agent @engineering` |
| Pull a document | `type-cli documents pull wart_123 --file ./doc.md` |
| Sync a skill | `type-cli skills sync ./skill --agent @engineering` |
| Preview skill sync | `type-cli skills sync ./skill --agent @engineering --dry-run` |
| Push a transcript | `type-cli sessions push --file ./session.jsonl --agent @engineering` |
| Push current Claude session | `type-cli sessions push --from claude --current --agent @engineering` |
| Push current Codex session | `type-cli sessions push --from codex --current --agent @engineering` |
| Install shell command | `type-cli install-shell --yes` |
| Show CLI version | `type-cli version` |
| Update standalone CLI | `type-cli update` |

## Troubleshooting

If `type-cli` is not available in your shell, rerun `type-cli install-shell --yes`, then restart your shell. You can always invoke the bundled desktop binary directly:

```sh
/Applications/Type.app/Contents/Resources/bin/type-cli auth status
```

If `type-cli` is not found, reinstall the CLI from the Type desktop app or add the standalone binary to your shell path.

If a command says you are not signed in, run:

```sh
type-cli auth login
```

If a command cannot find an agent, use its agent ID or exact handle:

```sh
type-cli skills sync ./skill --agent agent_123
```

For documents, use the document ID from `type-cli documents list`. Document IDs usually start with `wart_`.

If `install-shell` needs to write somewhere other than `/usr/local/bin` or `~/.local/bin`, pass an explicit install directory:

```sh
type-cli install-shell --install-dir "$HOME/bin" --yes
```

If the install target already exists and is not the current Type CLI symlink, replace it explicitly:

```sh
type-cli install-shell --force --yes
```

If a local agent cannot answer an interactive prompt, rerun the command with `--json --no-input` and use the structured error to decide the next step.
