sim workspaces is also spelled sim workspace.
These commands accept the global options.
Workspace access
List workspaces
Options
API request and response schemas: listWorkspaces.
Get workspace
API request and response schemas: getWorkspace.
Update workspace
OAuth login or personal API key required.
Options
API request and response schemas: updateWorkspace.
List workspace members
Options
API request and response schemas: listWorkspaceMembers.
Update workspace member
OAuth login or personal API key required.
Arguments
Options
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.
Arguments
Options
API request and response schemas: removeWorkspaceMember.
Create workspace invitations
OAuth login or personal API key required.
Options
API request and response schemas: createWorkspaceInvitations.
Get workspace permission config
OAuth login or personal API key required.
API request and response schemas: getWorkspacePermissionConfig.
Access requests
Discover workspace access requests
OAuth login or personal API key required.
Options
API request and response schemas: discoverWorkspaceAccessRequests.
Create workspace access request
OAuth login or personal API key required.
Options
API request and response schemas: createWorkspaceAccessRequest.
List my workspace access requests
OAuth login or personal API key required.
Options
API request and response schemas: listMyWorkspaceAccessRequests.
Cancel workspace access request
OAuth login or personal API key required.
Arguments
API request and response schemas: cancelWorkspaceAccessRequest.
Forks and lineage
Get workspace fork availability
OAuth login or personal API key required.
API request and response schemas: getWorkspaceForkAvailability.
List workspace fork resources
OAuth login or personal API key required.
Options
API request and response schemas: listWorkspaceForkResources.
Preview workspace fork
OAuth login or personal API key required.
Options
API request and response schemas: previewWorkspaceFork.
Fork workspace
OAuth login or personal API key required.
Options
API request and response schemas: forkWorkspace.
Get workspace fork lineage
OAuth login or personal API key required.
API request and response schemas: getWorkspaceForkLineage.
List workspace fork children
OAuth login or personal API key required.
Options
API request and response schemas: listWorkspaceForkChildren.
Mappings
Get workspace fork mappings
OAuth login or personal API key required.
Options
API request and response schemas: getWorkspaceForkMappings.
Update workspace fork mappings
OAuth login or personal API key required.
Options
API request and response schemas: updateWorkspaceForkMappings.
Push and pull
Preview workspace push
OAuth login or personal API key required.
Options
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.
Options
API request and response schemas: pushWorkspace.
Preview workspace pull
OAuth login or personal API key required.
Options
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.
Options
API request and response schemas: pullWorkspace.
Operation status
List workspace operations
Options
API request and response schemas: listWorkspaceOperations.
Get workspace operation
Arguments
API request and response schemas: getWorkspaceOperation.
Wait for workspace copy and deployment readiness
Arguments
Options
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.
Options
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.
Options
API request and response schemas: rollbackWorkspaceFork.
Unlink workspace fork
OAuth login or personal API key required.
This removes the fork relationship and its persisted mappings.
Options
API request and response schemas: unlinkWorkspaceFork.
Workspace as code
Write a workspace as a source directory
Options
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
Options
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
Options
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
Options
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
Arguments
Options
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.