Skip to content

Commands

Workspaces

Read workspace access and manage reviewed fork, push, and pull operations.

sim workspaces is also spelled sim workspace.

These commands accept the global options.

Workspace access

List workspaces

Code
sim workspaces list [options]

Options

OptionRequiredDescription
--sort-by <value>NoField used to sort the result. Do not rely on case-insensitive ordering when sorting by name. Defaults to "createdAt". Accepted values: name, createdAt, updatedAt.
--sort-order <value>NoSort direction. Defaults to "desc". Accepted values: asc, desc.
--limit <n>NoMaximum items to return (0 for everything). Defaults to 0.

API request and response schemas: listWorkspaces.

Get workspace

Code
sim workspaces get

API request and response schemas: getWorkspace.

Update workspace

OAuth login or personal API key required.

Code
sim workspaces update [options]

Options

OptionRequiredDescription
--name <value>NoNew workspace display name.
--logo-url <value>NoNew workspace logo: a root-relative path (starting with /) or an https:// URL. To remove the logo, send logoUrl: null through the API or MCP (--logo-url null sends the word, not JSON null).

API request and response schemas: updateWorkspace.

List workspace members

Code
sim workspaces members list [options]

Options

OptionRequiredDescription
--limit <n>NoMaximum items to return (0 for everything). Defaults to 0.

API request and response schemas: listWorkspaceMembers.

Update workspace member

OAuth login or personal API key required.

Code
sim workspaces members update <userId> [options]

Arguments

ArgumentRequiredDescription
userIdYesUser identifier of the workspace member, as returned by List workspace members.

Options

OptionRequiredDescription
--role <value>YesNew workspace role. Inherited organization Admin access, the workspace owner, and the workspace billing account keep Admin and cannot be changed here. Accepted values: admin, write, read.

API request and response schemas: updateWorkspaceMember.

Remove workspace member

OAuth login or personal API key required.

This removes the member’s workspace access. If it was their last workspace in the organization, their organization membership is removed and their sessions end.

Code
sim workspaces members remove <userId> [options]

Arguments

ArgumentRequiredDescription
userIdYesUser identifier of the workspace member, as returned by List workspace members.

Options

OptionRequiredDescription
-y, --yesYesConfirm this operation.

API request and response schemas: removeWorkspaceMember.

Create workspace invitations

OAuth login or personal API key required.

Code
sim workspaces invitations create [options]

Options

OptionRequiredDescription
--emails <value...>YesEmail addresses to invite. Each address is processed separately; inspect failed for unsuccessful recipients. (space- or comma-separated, a JSON array, or @path / @- with one value per line; @@value for a literal leading @).
--permission <value>NoWorkspace permission to grant. Existing workspace access is preserved. Defaults to "read". Accepted values: admin, write, read.
--membership <value>NoOrganization membership: member or admin uses a seat when billing is enabled. External grants workspace access only and requires an eligible paid account when billing is enabled. Existing members of another organization remain external. Defaults to "member". Accepted values: member, admin, external.

API request and response schemas: createWorkspaceInvitations.

Get workspace permission config

OAuth login or personal API key required.

Code
sim workspaces permission-config

API request and response schemas: getWorkspacePermissionConfig.

Access requests

Discover workspace access requests

OAuth login or personal API key required.

Code
sim workspaces access-requests discover [options]

Options

OptionRequiredDescription
--search <value>NoCase-insensitive substring match against the access item label.
--target-kind <value>NoCategory of access to discover. Accepted values: feature, integration, provider, model, tool, knowledge_connector, file_share_auth, chat_deploy_auth, usage_limit.
--state <value>NoFilter by the acting user’s current access. Requestable items can be submitted for review. Accepted values: allowed, requestable, unavailable.
--sort-by <value>NoField used to sort the result. Defaults to "label". Accepted values: label.
--sort-order <value>NoSort direction. Defaults to "asc". Accepted values: asc, desc.
--limit <n>NoMaximum items to return (0 for everything). Defaults to 100.
--cursor <value>NoContinue from nextCursor returned by a previous result.

API request and response schemas: discoverWorkspaceAccessRequests.

Create workspace access request

OAuth login or personal API key required.

Code
sim workspaces access-requests create [options]

Options

OptionRequiredDescription
--target <json|@file>YesTarget returned by Discover Workspace Access Requests or Discover Organization Access Requests. The target must currently be requestable. (JSON, or @path / @- to read a file or stdin).
--reason <value>NoWhy the acting user needs this access. Defaults to "".

API request and response schemas: createWorkspaceAccessRequest.

List my workspace access requests

OAuth login or personal API key required.

Code
sim workspaces access-requests mine [options]

Options

OptionRequiredDescription
--status <value>NoFilter by request status; omit to include all statuses. Accepted values: pending, fulfilled, declined, cancelled, closed.
--sort-by <value>NoField used to sort the result. Defaults to "createdAt". Accepted values: createdAt, targetLabel.
--sort-order <value>NoSort direction. Defaults to "desc". Accepted values: asc, desc.
--limit <n>NoMaximum items to return (0 for everything). Defaults to 100.
--cursor <value>NoContinue from nextCursor returned by a previous result.

API request and response schemas: listMyWorkspaceAccessRequests.

Cancel workspace access request

OAuth login or personal API key required.

Code
sim workspaces access-requests cancel <requestId>

Arguments

ArgumentRequiredDescription
requestIdYesAccess request identifier.

API request and response schemas: cancelWorkspaceAccessRequest.

Forks and lineage

Get workspace fork availability

OAuth login or personal API key required.

Code
sim workspaces fork-availability

API request and response schemas: getWorkspaceForkAvailability.

List workspace fork resources

OAuth login or personal API key required.

Code
sim workspaces fork-resources [options]

Options

OptionRequiredDescription
--limit <n>NoMaximum items to return (0 for everything). Defaults to 100.
--cursor <value>NoContinue from nextCursor returned by a previous result.
--kind <value>YesKind of source resource to list for copy selection. Accepted values: files, tables, knowledgeBases, customTools, skills, mcpServers, workflowMcpServers.
--sort-by <value>NoSupported stable sort key for this collection. Defaults to "id". Accepted values: id.
--sort-order <value>NoSort direction. Defaults to "asc". Accepted values: asc.

API request and response schemas: listWorkspaceForkResources.

Preview workspace fork

OAuth login or personal API key required.

Code
sim workspaces fork-preview [options]

Options

OptionRequiredDescription
--name <value>NoDisplay name of the workflow or workspace.
--copy <json|@file>NoExplicit resource selections to copy into the new fork; omitted resource kinds are not copied. (JSON, or @path / @- to read a file or stdin).

API request and response schemas: previewWorkspaceFork.

Fork workspace

OAuth login or personal API key required.

Code
sim workspaces fork [options]

Options

OptionRequiredDescription
--name <value>NoDisplay name of the workflow or workspace.
--copy <json|@file>NoExplicit resource selections to copy into the new fork; omitted resource kinds are not copied. (JSON, or @path / @- to read a file or stdin).
--request-id <value>YesStable client request ID. Reuse it with identical inputs after an uncertain response; changed inputs return 409. A new ID can apply another operation.
--preview-fingerprint <value>YesFingerprint returned by a preview with the same choices. A changed plan returns 409; preview again. The example hash is illustrative; use the actual preview value.
--waitNoWait for the committed operation to finish; missing configuration and failure exit nonzero.
--wait-timeout <seconds>NoMaximum operation wait in seconds (default 3600; 0 waits indefinitely).

API request and response schemas: forkWorkspace.

Get workspace fork lineage

OAuth login or personal API key required.

Code
sim workspaces lineage

API request and response schemas: getWorkspaceForkLineage.

List workspace fork children

OAuth login or personal API key required.

Code
sim workspaces children [options]

Options

OptionRequiredDescription
--limit <n>NoMaximum items to return (0 for everything). Defaults to 100.
--cursor <value>NoContinue from nextCursor returned by a previous result.
--sort-by <value>NoSupported stable sort key for this collection. Defaults to "createdAt". Accepted values: createdAt.
--sort-order <value>NoSort direction. Defaults to "desc". Accepted values: desc.

API request and response schemas: listWorkspaceForkChildren.

Mappings

Get workspace fork mappings

OAuth login or personal API key required.

Code
sim workspaces mappings get [options]

Options

OptionRequiredDescription
--other-workspace-id <value>YesWorkspace on the other side of the direct fork edge.
--direction <value>YesPush means current to other; pull means other to current, independent of parent/child orientation. Accepted values: push, pull.
--limit <n>NoMaximum items to return (0 for everything). Defaults to 100.
--cursor <value>NoContinue from nextCursor returned by a previous result.
--sort-by <value>NoSupported stable sort key for this collection. Defaults to "id". Accepted values: id.
--sort-order <value>NoSort direction. Defaults to "asc". Accepted values: asc.

API request and response schemas: getWorkspaceForkMappings.

Update workspace fork mappings

OAuth login or personal API key required.

Code
sim workspaces mappings update [options]

Options

OptionRequiredDescription
--other-workspace-id <value>YesWorkspace on the other side of the direct fork edge.
--direction <value>YesPush means current to other; pull means other to current, independent of parent/child orientation. Accepted values: push, pull.
--mappings <json|@file>YesMapping entries addressed by resource type and sourceId. targetId: null clears a mapping. (JSON, or @path / @- to read a file or stdin).

API request and response schemas: updateWorkspaceForkMappings.

Push and pull

Preview workspace push

OAuth login or personal API key required.

Code
sim workspaces push-preview [options]

Options

OptionRequiredDescription
--other-workspace-id <value>YesWorkspace on the other side of the direct fork edge.
--mappings <json|@file>NoProposed mapping entries addressed by resource type and sourceId. Preview does not save them; apply commits them with the sync. (JSON, or @path / @- to read a file or stdin).
--dependent-values <json|@file>NoDestination-specific choices addressed by source workflow ID, source block ID, and field key. Omission keeps saved overrides; an explicit empty array clears them. (JSON, or @path / @- to read a file or stdin).
--copy-resources <json|@file>NoExplicit source resources to copy before syncing the workflows. (JSON, or @path / @- to read a file or stdin).
--drop-references <json|@file>NoSource-deleted references explicitly acknowledged for removal; live source references cannot be dropped. (JSON, or @path / @- to read a file or stdin).
--trigger-mappings <json|@file>NoPublic trigger path choices from preview.triggerSlots, addressed by source workflow and block IDs. Duplicate or unavailable choices are rejected. (JSON, or @path / @- to read a file or stdin).

API request and response schemas: previewWorkspacePush.

Push workspace

OAuth login or personal API key required.

This replaces target workflows and may archive targets whose sources were deleted.

Code
sim workspaces push [options]

Options

OptionRequiredDescription
--other-workspace-id <value>YesWorkspace on the other side of the direct fork edge.
--mappings <json|@file>NoProposed mapping entries addressed by resource type and sourceId. Preview does not save them; apply commits them with the sync. (JSON, or @path / @- to read a file or stdin).
--dependent-values <json|@file>NoDestination-specific choices addressed by source workflow ID, source block ID, and field key. Omission keeps saved overrides; an explicit empty array clears them. (JSON, or @path / @- to read a file or stdin).
--copy-resources <json|@file>NoExplicit source resources to copy before syncing the workflows. (JSON, or @path / @- to read a file or stdin).
--drop-references <json|@file>NoSource-deleted references explicitly acknowledged for removal; live source references cannot be dropped. (JSON, or @path / @- to read a file or stdin).
--trigger-mappings <json|@file>NoPublic trigger path choices from preview.triggerSlots, addressed by source workflow and block IDs. Duplicate or unavailable choices are rejected. (JSON, or @path / @- to read a file or stdin).
--request-id <value>YesStable client request ID. Reuse it with identical inputs after an uncertain response; changed inputs return 409. A new ID can apply another operation.
--preview-fingerprint <value>YesFingerprint returned by a preview with the same choices. A changed plan returns 409; preview again. The example hash is illustrative; use the actual preview value.
--waitNoWait for the committed operation to finish; missing configuration and failure exit nonzero.
--wait-timeout <seconds>NoMaximum operation wait in seconds (default 3600; 0 waits indefinitely).
-y, --yesYesConfirm this operation.

API request and response schemas: pushWorkspace.

Preview workspace pull

OAuth login or personal API key required.

Code
sim workspaces pull-preview [options]

Options

OptionRequiredDescription
--other-workspace-id <value>YesWorkspace on the other side of the direct fork edge.
--mappings <json|@file>NoProposed mapping entries addressed by resource type and sourceId. Preview does not save them; apply commits them with the sync. (JSON, or @path / @- to read a file or stdin).
--dependent-values <json|@file>NoDestination-specific choices addressed by source workflow ID, source block ID, and field key. Omission keeps saved overrides; an explicit empty array clears them. (JSON, or @path / @- to read a file or stdin).
--copy-resources <json|@file>NoExplicit source resources to copy before syncing the workflows. (JSON, or @path / @- to read a file or stdin).
--drop-references <json|@file>NoSource-deleted references explicitly acknowledged for removal; live source references cannot be dropped. (JSON, or @path / @- to read a file or stdin).
--trigger-mappings <json|@file>NoPublic trigger path choices from preview.triggerSlots, addressed by source workflow and block IDs. Duplicate or unavailable choices are rejected. (JSON, or @path / @- to read a file or stdin).

API request and response schemas: previewWorkspacePull.

Pull workspace

OAuth login or personal API key required.

This replaces target workflows and may archive targets whose sources were deleted.

Code
sim workspaces pull [options]

Options

OptionRequiredDescription
--other-workspace-id <value>YesWorkspace on the other side of the direct fork edge.
--mappings <json|@file>NoProposed mapping entries addressed by resource type and sourceId. Preview does not save them; apply commits them with the sync. (JSON, or @path / @- to read a file or stdin).
--dependent-values <json|@file>NoDestination-specific choices addressed by source workflow ID, source block ID, and field key. Omission keeps saved overrides; an explicit empty array clears them. (JSON, or @path / @- to read a file or stdin).
--copy-resources <json|@file>NoExplicit source resources to copy before syncing the workflows. (JSON, or @path / @- to read a file or stdin).
--drop-references <json|@file>NoSource-deleted references explicitly acknowledged for removal; live source references cannot be dropped. (JSON, or @path / @- to read a file or stdin).
--trigger-mappings <json|@file>NoPublic trigger path choices from preview.triggerSlots, addressed by source workflow and block IDs. Duplicate or unavailable choices are rejected. (JSON, or @path / @- to read a file or stdin).
--request-id <value>YesStable client request ID. Reuse it with identical inputs after an uncertain response; changed inputs return 409. A new ID can apply another operation.
--preview-fingerprint <value>YesFingerprint returned by a preview with the same choices. A changed plan returns 409; preview again. The example hash is illustrative; use the actual preview value.
--waitNoWait for the committed operation to finish; missing configuration and failure exit nonzero.
--wait-timeout <seconds>NoMaximum operation wait in seconds (default 3600; 0 waits indefinitely).
-y, --yesYesConfirm this operation.

API request and response schemas: pullWorkspace.

Operation status

List workspace operations

Code
sim workspaces operations list [options]

Options

OptionRequiredDescription
--limit <n>NoMaximum items to return (0 for everything). Defaults to 100.
--cursor <value>NoContinue from nextCursor returned by a previous result.
--request-id <value>NoFind an uncertain mutation by the original client request ID; keep the same filter while paging.

API request and response schemas: listWorkspaceOperations.

Get workspace operation

Code
sim workspaces operations get <operationId>

Arguments

ArgumentRequiredDescription
operationIdYesDurable operation identifier to use for polling.

API request and response schemas: getWorkspaceOperation.

Wait for workspace copy and deployment readiness

Code
sim workspaces operations wait <operationId> [options]

Arguments

ArgumentRequiredDescription
operationIdYesOperation ID returned by import, fork, push, or pull

Options

OptionRequiredDescription
--wait-timeout <seconds>NoMaximum total wait (default 3600; 0 waits indefinitely).

Exit codes: 0 completed (including completion with warnings), 1 follow-up work failed, 3 destination configuration is required, 4 timed out. The mutation may already be committed; reconcile using the same operation or request ID rather than repeating it with a new ID.

API request and response schemas: getWorkspaceOperation.

Exclusions and recovery

Update workspace fork exclusions

OAuth login or personal API key required.

Code
sim workspaces sync-exclusions [options]

Options

OptionRequiredDescription
--workflow <value...>YesWorkflow identifiers in the current workspace. (space- or comma-separated, a JSON array, or @path / @- with one value per line; @@value for a literal leading @).
--fork-sync-excluded <true|false>YesWhether the named workflows should be skipped as sync sources and targets. Accepted values: true, false.

API request and response schemas: updateWorkspaceForkExclusions.

Rollback workspace fork

OAuth login or personal API key required.

This restores the latest sync using its prior deployed versions.

Code
sim workspaces fork-rollback [options]

Options

OptionRequiredDescription
--other-workspace-id <value>YesWorkspace on the other side of the direct fork edge.
-y, --yesYesConfirm this operation.

API request and response schemas: rollbackWorkspaceFork.

OAuth login or personal API key required.

This removes the fork relationship and its persisted mappings.

Code
sim workspaces unlink [options]

Options

OptionRequiredDescription
--other-workspace-id <value>YesWorkspace on the other side of the direct fork edge.
-y, --yesYesConfirm this operation.

API request and response schemas: unlinkWorkspaceFork.

Workspace as code

Write a workspace as a source directory

Code
sim workspaces source get [options]

Options

OptionRequiredDescription
--dir <dir>YesDirectory to write the workspace source into.
--only <kinds>NoRead only these kinds (comma-separated folders: secrets.ts, credentials.ts, tools, skills, mcp, tables, knowledge, files, workflows, deployments).
--forceNoReplace files with edits no apply has saved.

A directory that already holds a .sim/base.json is refreshed from the workspace it was read from, whatever the profile's default workspace.

Exit codes: 0 written; 1 the command failed, the directory holds edits no apply has saved (SOURCE_LOCAL_EDITS: apply them, get into another directory, or pass --force), --workspace or SIM_WORKSPACE names another workspace than the one the directory was read from (SOURCE_OTHER_WORKSPACE), the directory is a workflow source directory (SOURCE_DIR_KIND_MISMATCH, even with --force), or a downloaded binary file does not match its listing (SOURCE_BLOB_MISMATCH: nothing was written); 9 rate limited (HTTP 429) after the CLI's retries: nothing was written, the binary files already downloaded are kept in .sim/downloads, and running the get again downloads only the rest; 10 (busy, retry) another sim workspaces source or workflows source command is using this directory or a workflow folder in it (SOURCE_DIR_BUSY): nothing was read or written, run it again once it finished; 13 not logged in, the login expired, or the server refused the credential (AUTH_REQUIRED): nothing was read or written, run sim login and the get again.

API request and response schemas: getWorkspaceSource, getSourceCatalog, getSourceResources, downloadFile, downloadKnowledgeDocument.

Show what changed locally and on the server since the directory was read

Code
sim workspaces source status [options]

Options

OptionRequiredDescription
--summary-file <path>NoAlso write the plan as Markdown to this file (or set SIM_SUMMARY_FILE), replacing it each run; its first line is a comment that names the directory, for a CI step that updates one pull-request comment.
--dir <dir>NoWorkspace source directory written by workspaces source get. Defaults to ..
--only <kinds>NoReport only these kinds (comma-separated folders: secrets.ts, credentials.ts, tools, skills, mcp, tables, knowledge, files, workflows, deployments).
--offlineNoReport local changes only, without asking the server.
--jsonNoPrint the machine-readable status (same as --output json).

With --json, plan is what applying would do as apply --dry --allow-delete reports it (its errors and warnings counted the same, a conflict as an error), and next the command to run (with --allow-delete only when the plan deletes something).

Exit codes: 0 clean (nothing to apply, and the server changed nothing since the directory was read); a server that cannot be reached is not a failure: the status shows the local changes only and says so (exit 0 or 11); 1 the command failed; 7 the source is too large for the server to read in one dry run; 9 rate limited (HTTP 429) after the CLI's retries: wait a minute and run it again; 10 (busy, retry) another sim workspaces source or workflows source command is using this directory or a workflow folder in it (SOURCE_DIR_BUSY): nothing was read or written, run it again once it finished; 11 local changes only (applying writes them); 12 the server changed since the directory was read: drift (a resource edited, added or deleted there that the directory leaves alone) or a conflict (also changed here, so applying it is refused as stale), with or without local changes; 13 not logged in (AUTH_REQUIRED) or the credential was refused: the status shows the local changes only, then run sim login.

API request and response schemas: planWorkspaceSource.

Apply a workspace source directory

Code
sim workspaces source apply [options]

Options

OptionRequiredDescription
--verboseNoAlso list the info findings hidden by default: every one with --output json, blocks placed by autolayout in the display.
--summary-file <path>NoAlso write the plan as Markdown to this file (or set SIM_SUMMARY_FILE), replacing it each run; its first line is a comment that names the directory, for a CI step that updates one pull-request comment.
--dir <dir>NoWorkspace source directory written by workspaces source get. Defaults to ..
--dryNoPlan and check without writing anything.
-y, --yesNoApply without asking for confirmation.
--allow-deleteNoDelete resources, columns and data the directory no longer declares (with --to, only what it deleted since the last promotion: the target's own resources are kept).
--delete-target-onlyNoWith --to and --allow-delete, also delete the target's resources this directory never declared and no promotion from it left there (prod-only tables and their rows, skills made in prod). Without it a promotion keeps them, naming each with a warning.
--only <kinds>NoApply only these kinds (comma-separated folders: secrets.ts, credentials.ts, tools, skills, mcp, tables, knowledge, files, workflows, deployments).
--to <workspaceId>NoPromote the directory to another workspace (dev to prod): its resources bind by key to that workspace's own and are updated in place. Only .sim/targets/<workspaceId>.json changes, the record the next promotion compares with: a resource changed there since is kept, or refused as stale (exit 5) when the directory changed it too.
--run <key=input>NoAfter the apply, dry-run workflows/<key>/'s saved draft with this input (JSON or @file, as sim workflows run --dry --input takes it; --run <key> alone: no input). Repeat it to test more workflows. deployments/ is applied only after every run completed, and only when every draft it publishes was test-run; a run that does not complete exits 1 and leaves the applied drafts in place. Sandboxed code (Python, shell, imports) really runs in it, network requests included, and is listed in runs[].sideEffects.unchecked.

Exit codes: 0 applied (or a clean dry run); 1 the source has errors (each printed as file:line:column with its frame and hint), or every change it would write was held back because it uses a declared secret the workspace has no value for or a declared credential key nothing binds to (nothing was written; a dry run of such an apply exits 1 too), the directory was read from another workspace than the one --workspace or SIM_WORKSPACE names (SOURCE_OTHER_WORKSPACE: drop it, or promote it with --to; without either an apply targets the workspace the directory was read from), its base records binary files no get downloaded (SOURCE_BLOBS_NOT_FETCHED: get again first), a --run test run did not complete (the apply is written; deployments/ was not applied), or the command failed; 5 a resource changed or was deleted on the server since the directory was read (SOURCE_STALE: get it again into a fresh directory, reapply the edit, retry); 6 a resource (a workflow or its folder, a table) is locked (a locked block exits 1, E_APPLY_LOCKED_BLOCK); 7 the directory is too large; 8 the apply stopped part-way on a server failure: what was written is saved into the directory, and applying again continues. An apply a resource refused part-way (stale, locked, forbidden) saves what was written too, and exits as that refusal: 5, 6 or 1; 9 rate limited (HTTP 429) after the CLI's retries, before anything was written: wait a minute and apply again (binary files already uploaded are not sent again); 10 another apply is writing the workspace (SOURCE_BUSY), or another command is using the directory (SOURCE_DIR_BUSY): nothing was written, run the command again once the other finished; 13 not logged in, the login expired, or the server refused the credential (AUTH_REQUIRED): nothing was sent, run sim login (or fix or unset SIM_API_KEY when the key comes from it) and the command again; 14 without --yes and with no terminal to ask: the plan was printed with no errors and nothing was written (run the same command with --yes to apply it); 15 written in part: changes that use a declared secret the workspace has no value for, or a declared credential key nothing binds to, were held back and the rest was applied and saved (set the secret or connect the credential, then apply again); a dry run that would do so exits 15 too, having written nothing; 130 interrupted (Ctrl-C): a write already sent is finished and saved into the directory first, waiting up to 60s for its answer, and a second Ctrl-C, or no answer by then, stops at once and prints that it may have been written and how to check.

API request and response schemas: applyWorkspaceSource, findMissingWorkspaceSourceBlobs, stageWorkspaceSourceBlobs, getWorkspaceSource, getSourceCatalog, getWorkflowDeployment, executeWorkflow.

Compile and type-check every workflow of a workspace source directory locally, without the server

Code
sim workspaces source check [options]

Options

OptionRequiredDescription
--dir <dir>NoWorkspace source directory: the kind folders and .sim/base.json. Defaults to ..
--strictNoFail on the warnings listed below in every block, not only new ones.
--no-strictNoNever fail on a warning an apply saves.
--no-typesNoSkip the type check (TypeScript 7.0.2 over tsconfig.json) that runs after the compile.
--verboseNoAlso list the info findings hidden by default: every one with --output json, blocks placed by autolayout in the display.

Compiles every workflows/<key>/workflow.ts (and the function files each names) with the compiler the server runs, against the workspace's block catalog the last get cached (in a fresh clone with no cache, such as CI, it downloads the catalog once with the profile's credentials). No other request is made to Sim. It checks, against what the directory declares: - env names (secrets.ts), with a did-you-mean - credential keys (credentials.ts) - the keys of tables, knowledge bases, skills, custom tools, MCP servers and workflows, with a did-you-mean, and a key holding a look-alike letter (a Cyrillic а) named by its code point - the columns and select options of a table row write - a child workflow call: an inputMapping key the child's Start trigger does not declare, and a child with no Start trigger - each tables/<key>.rows.jsonl: a malformed line, an undeclared column, a managed key two lines share, an empty required cell, a repeated unique value, a value its column's type or options cannot hold - block names whose words mix Latin with Cyrillic, Greek, Armenian or Cherokee letters The dry run still checks what only the server knows (stored values, MCP tool names, model ids, deployments, credential bindings), so run it before applying. A check also regenerates .sim/sdk/workspace.d.ts from the declarations (so a key added since the get is typed, and each workflow's inputs) and adds the blocks the workflows now use to the CLI's tsconfig.json. Then it type-checks the directory with TypeScript 7.0.2 (the release the declarations are built for) over tsconfig.json. Each type error is an E_TYPE error, its message starting with TypeScript's code. One is left out on a line the compile already reports an error on, and in a file still as the last get or apply wrote it when that file had the same error then (against the declarations as that get or apply left them). The first check installs that release with npm into the CLI's cache, once (none when SIM_TYPESCRIPT_DIR already holds it); when it cannot (offline, no npm), the check warns W_TYPES_UNCHECKED and passes or fails on the compile alone. --no-types skips the type check.

Exit codes: 0 no errors; 1 errors (each printed as file:line:column with its frame and hint), or no cached catalog that could not be downloaded (a check downloads it once when none is cached, with the profile's credentials; 13 when there is no login to download it with). With --output json, stdout is one document that also lists every finding under diagnostics.

These warnings, which an apply saves as written, fail the check as errors on every block the lock does not bind (a block added since the get, or every block of a new workflow): W_REQUIRED_MISSING, W_UNKNOWN_OPTION, W_UNKNOWN_OUTPUT_PATH, W_VALUE_KIND, W_OUT_OF_RANGE, W_LITERAL_SECRET, W_TABLE_UNKNOWN_COLUMN, W_CHILD_INPUT_UNKNOWN, W_CHILD_RESULT_PATH, W_BRANCH_UNWIRED, W_UNRESOLVED_REF, W_REF_OUT_OF_SCOPE, W_LOOP_CONDITION_SYNTAX. --strict fails on them in every block, except W_BRANCH_UNWIRED on a block the lock binds (the stored workflow may hold it, and the server then stays quiet); --no-strict fails on none of them. In every mode, as the server refuses them: W_REF_OUT_OF_SCOPE is the error E_APPLY_REF_OUT_OF_SCOPE in any file of a block the edit added or changed; W_LOOP_CONDITION_SYNTAX is the error E_APPLY_LOOP_CONDITION_SYNTAX in any file of a block the edit added or changed; W_UNKNOWN_OPTION is the error E_APPLY_INVALID_SUBBLOCK_FIELD in workflow.ts on a block the edit added or changed; W_UNKNOWN_OUTPUT_PATH is the error E_APPLY_UNRESOLVED_REF in workflow.ts on a block the edit added or changed; W_UNRESOLVED_REF is the error E_APPLY_UNRESOLVED_REF in workflow.ts on a block the edit added or changed; W_UNKNOWN_BLOCK_TYPE is the error E_APPLY_INVALID_BLOCK_TYPE in workflow.ts on a block the edit added or changed; W_TYPE_NOT_ADDABLE is the error E_APPLY_TYPE_NOT_ADDABLE in workflow.ts on a block the edit added or changed; W_UNRESOLVED_REF is the error E_APPLY_UNRESOLVED_REF in a function file changed since the get; W_UNKNOWN_OUTPUT_PATH is the error E_APPLY_UNRESOLVED_REF in a function file changed since the get; W_CODE_FILE_REF_SYNTAX is the error E_APPLY_CODE_FILE_REF_SYNTAX in a function file changed since the get. A block counts as changed when the lock does not bind it, when the source moved it into another container, or when it compiles differently than in the source the last get or apply printed (.sim/stored-edges.json records a digest of each block). That last comparison needs the catalog the source was printed with in the cache: without it, a bound block that did not move counts as unchanged, so the server may refuse what the check passes. A $ref in a function file to a block the lock binds that the source no longer declares stays a warning, unless a warning cap left findings out: the server may infer that block was renamed and rewrite the reference, and refuses it otherwise. W_JSON_REF_UNTYPED is reported, as the server reports it, only on a field the edit made store the reference anew: one whose text differs from what the printed source stored, through block renames, or where the reference was typed then, as when an edit elsewhere (a Start input, a Function's code) changes its type. Without the record or that catalog, it is reported on every block the edit added or changed; with --strict, on every block.

Exit 10 (busy, retry): another sim workspaces source or workflows source command is using this directory or a workflow folder in it (SOURCE_DIR_BUSY); nothing was read or written. Run this one again once it finished.

API request and response schemas: getSourceCatalog.

Show the content of the changes in a workspace source directory

Code
sim workspaces source diff [paths...] [options]

Arguments

ArgumentRequiredDescription
paths...NoFiles, folders or kind:key resources to compare (default: every file)

Options

OptionRequiredDescription
--dir <dir>NoWorkspace source directory written by workspaces source get. Defaults to ..
--serverNoCompare with the server's current source instead of the base.
--jsonNoPrint the machine-readable diff (same as --output json).

Without --server, each file created, edited or deleted since the directory was read is shown against the text it was read at. The CLI records only each file's digest, so that text is the server's current text where it still matches the digest; a file the server changed since is named instead (compare it with --server). A binary file is shown by its sizes. Paths filter by file or folder (and in a workspace directory by kind:key, such as table:leads). Exit codes: 0 the differences were shown, whether or not there were any; 7 the source is too large for the server to read; 1 the command failed.

Exit 10 (busy, retry): another sim workspaces source or workflows source command is using this directory or a workflow folder in it (SOURCE_DIR_BUSY); nothing was read or written. Run this one again once it finished.

API request and response schemas: getWorkspaceSource.

Was this helpful?
Suggest an edit