# Sim CLI (/cli)



Use `sim` to run workflows, query tables, move files, search knowledge bases, and read logs. Structured results default to JSON for scripts, CI jobs, and coding agents. Select `--output table` for a readable table.

## Install [#install]

The installed CLI requires Node.js 20 or newer. Install it globally with Bun, then check the version:

```bash
bun add -g sim
sim --version
```

To run a command without a global installation:

```bash
bunx sim --help
```

The package also supports npm and pnpm installations. Keep using the package manager that owns your installation when upgrading; another manager may install a second copy on your `PATH`.

Eligible interactive invocations can show an update notice. Run `sim update` to update the active global installation. See [Updates](/cli/configuration#updates) for supported managers, release channels, and notice controls.

## Your first command [#your-first-command]

### 1. Sign in [#1-sign-in]

```bash
sim login
```

Local sign-in prefers OAuth and opens a browser for approval. SSH sessions and headless Linux terminals select API-key pairing. To choose pairing explicitly without opening a browser:

```bash
sim login --method api-key --no-browser
```

Approve the code shown in your terminal. See [Authentication](/cli/authentication) for CI credentials, remote terminals, multiple accounts, and self-hosted deployments.

### 2. Choose a workspace [#2-choose-a-workspace]

After OAuth login, list your workspaces and set a default:

```bash
sim workspaces list
sim configure --set-workspace <workspaceId>
```

Pairing sets the default workspace you choose on its approval page. Override that target for one command with `--workspace <workspaceId>`.

### 3. Check the resolved settings [#3-check-the-resolved-settings]

```bash
sim whoami
```

This shows the endpoint, credential type, workspace, and output format, including the source of each setting. It also checks authentication and access to the selected workspace. Use `--no-verify` to inspect settings offline.

### 4. List and run a workflow [#4-list-and-run-a-workflow]

```bash
sim workflows list --output table
```

Example table output; timestamps are UTC:

```text
ID                                    NAME           FOLDER      DEPLOYED  RUNS  LAST RUN
3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8  Refund triage  /Support    yes       412   2026-08-15 14:02:11
b8c0d247-9e13-4a86-97f5-2ad4e1638c09  Weekly digest  /Reporting  no        18    2026-08-11 09:00:04
```

```bash
sim workflows run 3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8 --input '{"ticketId":"T-4821"}'
```

Ordinary execution runs the active deployment. Deploy from the workflow builder or with `sim workflows deploy <workflowId>`. To execute the current saved workflow state, use `sim workflows run <workflowId> --manual`.

## How commands are shaped [#how-commands-are-shaped]

Resource commands use this shape:

```text
sim <resource> [sub-resource] <verb> [arguments] [options]
```

```bash
sim workflows list
sim tables rows query tbl_9f3c1a05d4b7426e8c2f0917ab35de64 --limit 50
sim knowledge documents upload 4c1b7f60-2d55-4a3e-9c18-70b6ea2f9d31 ./handbook.pdf
```

In the installed CLI, commands such as `login`, `whoami`, `configure`, `update`, and `chat` run directly under `sim`. Local setup and maintenance commands are unavailable when Sim runs commands inside Chat; see [Configuration](/cli/configuration). Some resource groups have singular aliases: `sim workflow get` and `sim workflows get` are equivalent. `knowledge` also accepts `kb`; each group reference lists its aliases.

## Find a command [#find-a-command]

Search by the task you want to complete, then inspect the result's arguments and options:

```bash
sim cli search "cancel a workflow run"
sim workflows runs cancel --help
```

Help is available at every depth:

```bash
sim --help
sim tables --help
sim tables rows query --help
```

## What you can do [#what-you-can-do]

| Group | Capabilities |
| - | - |
| [`workflows`](/cli/workflows) | Build, deploy, run, roll back, import, export, and organize workflows |
| [`logs`](/cli/logs) | Inspect runs and recursive traces |
| [`tables`](/cli/tables) | Query and change rows; manage columns, views, imports, and exports |
| [`files`](/cli/files) | Upload, download, share, version, and organize workspace files |
| [`knowledge`](/cli/knowledge) | Search knowledge bases and manage documents, connectors, and tags |
| [`skills`](/cli/skills) | Manage skills and their editors |
| [`sandboxes`](/cli/sandboxes) | Configure dependencies, managed CLIs, and system packages |
| [`mcp-servers`](/cli/mcp-servers) | Connect external Model Context Protocol (MCP) servers and discover tools |
| [`custom-tools`](/cli/custom-tools) | Manage custom tool definitions |
| [`credentials`](/cli/credentials) | Connect, reconnect, and disconnect integration credentials |
| [`secrets`](/cli/secrets) | Manage personal and workspace secrets |
| [`workspaces`](/cli/workspaces) | Manage members, invitations, forks, and workspace sync |
| [`organizations`](/cli/organizations) | Manage organization access, members, usage, domains, and SSO |
| [`permission-groups`](/cli/permission-groups) | Manage restrictions and group membership |
| [`billing`](/cli/billing) | Inspect plan status and credit usage |
| [`audit-logs`](/cli/audit-logs) | Read organization audit actions |
| [`blocks`](/cli/blocks) | Inspect the block catalog and configuration fields |
| [`tools`](/cli/tools) | Inspect and execute built-in tools |
| [`connector-types`](/cli/connector-types) | Inspect knowledge-base connector types and fields |
| [`selectors`](/cli/selectors) | Discover and verify configuration choices |
| [`chat-deployments`](/cli/chat-deployments) | List deployed workflow chats |
| [`workflow-mcp-servers`](/cli/workflow-mcp-servers) | Expose deployed workflows as MCP tools |
| [`meta`](/cli/meta) | Inspect API availability and credential status |

The [command overview](/cli/commands) lists global options and root commands. The [complete reference](/cli/reference) contains every subcommand, argument, and option on one page. Both are generated from the CLI.

## Related docs [#related-docs]

* [Authentication](/cli/authentication)
* [Configuration](/cli/configuration)
* [Output formats](/cli/output)
* [Scripting](/cli/scripting)
* [Workflow imports and workspace sync](/cli/workflow-sync)
* [Troubleshooting](/cli/troubleshooting)
* [TypeScript SDK](/api-reference/typescript), [Python SDK](/api-reference/python), and [HTTP API](/api-reference/getting-started)
