Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions apps/docs/content/docs/cli/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8596,7 +8596,9 @@ sim workflows source catalog [options]

| Option | Required | Description |
| --- | --- | --- |
| `--workflow-id <value>` | No | Return the source catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`. |
| `--workflow-id <value>` | No | Workflow id, or its exact name: adds every block type already placed in it, the ones the caller could not add marked `addable: false`. |
| `--dir <dir>` | No | Source directory whose workspace and workflow to read. Defaults to `.`. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand All @@ -8607,9 +8609,20 @@ API request and response schemas: [getSourceCatalog](/api-reference/catalog/getS
List the tables, knowledge bases, credentials, workflows, skills, custom tools, MCP servers and env names source can name

```bash
sim workflows source resources
sim workflows source resources [options]
```

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--dir <dir>` | No | Source directory whose workspace to read. Defaults to `.`. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

API request and response schemas: [getSourceResources](/api-reference/workflows/getSourceResources).

### sim workflows source get
Expand Down Expand Up @@ -8639,6 +8652,7 @@ sim workflows source get <workflow> [options]
| `--function-code <value>` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `codeFile()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. |
| `--dir <dir>` | No | Write the source, its lock and SDK type declarations into this directory instead of printing them. |
| `--force` | No | With --dir: replace another workflow's source or edits no apply has saved. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -8678,6 +8692,7 @@ sim workflows source apply [workflowId] [options]
| `--run [input]` | No | After the write is saved, dry-run the draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it): a run that does not complete exits 1 and deploys nothing. With several triggers (an API and a webhook), name the one to enter through by its const: --run 'shopWebhook=&#123;…&#125;' (--run shopWebhook alone: no input). Repeat --run to test more inputs or triggers: every run is made and reported, and --deploy needs all to complete. Sandboxed code (Python, shell, imports) really runs in it, network requests included, and is listed in sideEffects.unchecked, so --run --deploy in CI sends those. |
| `--deploy` | No | After the write is saved (and a --run completed), deploy the workflow (as `sim workflows deploy <workflowId>` does). |
| `--allow-delete` | No | Delete blocks and variables the source no longer declares; without it, an apply that deletes one is refused. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -8708,6 +8723,7 @@ sim workflows source create [options]
| `-y, --yes` | No | Create without asking for confirmation. |
| `--run [input]` | No | After the write is saved, dry-run the draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it): a run that does not complete exits 1 and deploys nothing. With several triggers (an API and a webhook), name the one to enter through by its const: --run 'shopWebhook=&#123;…&#125;' (--run shopWebhook alone: no input). Repeat --run to test more inputs or triggers: every run is made and reported, and --deploy needs all to complete. Sandboxed code (Python, shell, imports) really runs in it, network requests included, and is listed in sideEffects.unchecked, so --run --deploy in CI sends those. |
| `--deploy` | No | After the write is saved (and a --run completed), deploy the workflow (as `sim workflows deploy <workflowId>` does). |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand All @@ -8734,6 +8750,7 @@ sim workflows source check [options]
| `--no-strict` | No | Never fail on a warning an apply saves. |
| `--no-types` | No | Skip the type check (TypeScript 7.0.2 over tsconfig.json) that runs after the compile. |
| `--verbose` | No | Also list the info findings hidden by default: every one with --output json, blocks placed by autolayout in the display. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -8762,7 +8779,7 @@ sim workflows source status [options]
| `--summary-file <path>` | No | Also 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>` | No | Source directory: workflow.ts, functions/* and .sim/. Defaults to `.`. |
| `--offline` | No | Report local changes only, without asking the server. |
| `--json` | No | Print the machine-readable status (same as --output json). |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -8798,7 +8815,7 @@ sim workflows source diff [paths...] [options]
| --- | --- | --- |
| `--dir <dir>` | No | Source directory: workflow.ts, functions/* and .sim/. Defaults to `.`. |
| `--server` | No | Compare with the server's current source instead of the base. |
| `--json` | No | Print the machine-readable diff (same as --output json). |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -8832,6 +8849,7 @@ sim workflows source params <builder> [options]
| --- | --- | --- |
| `--dir <dir>` | No | Source directory whose catalog to read. Defaults to `.`. |
| `--full` | No | Print every param with its type, enum, default and doc, not the brief form. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -8864,6 +8882,7 @@ sim workflows source find <block...> [options]
| Option | Required | Description |
| --- | --- | --- |
| `--dir <dir>` | No | Workflow source directory to read. Defaults to `.`. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -10093,6 +10112,7 @@ sim workspaces source get [options]
| `--dir <dir>` | Yes | Directory to write the workspace source into. |
| `--only <kinds>` | No | Read only these kinds (comma-separated folders: secrets.ts, credentials.ts, tools, skills, mcp, tables, knowledge, files, workflows, deployments). |
| `--force` | No | Replace files with edits no apply has saved. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -10126,6 +10146,7 @@ sim workspaces source apply [options]
| `--only <kinds>` | No | Apply only these kinds (comma-separated folders: secrets.ts, credentials.ts, tools, skills, mcp, tables, knowledge, files, workflows, deployments). |
| `--to <workspaceId>` | No | Promote 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/&lt;workspaceId&gt;.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>` | No | After the apply, dry-run workflows/&lt;key&gt;/'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. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand All @@ -10152,6 +10173,7 @@ sim workspaces source check [options]
| `--no-strict` | No | Never fail on a warning an apply saves. |
| `--no-types` | No | Skip the type check (TypeScript 7.0.2 over tsconfig.json) that runs after the compile. |
| `--verbose` | No | Also list the info findings hidden by default: every one with --output json, blocks placed by autolayout in the display. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -10183,7 +10205,7 @@ sim workspaces source status [options]
| `--dir <dir>` | No | Workspace source directory written by `workspaces source get`. Defaults to `.`. |
| `--only <kinds>` | No | Report only these kinds (comma-separated folders: secrets.ts, credentials.ts, tools, skills, mcp, tables, knowledge, files, workflows, deployments). |
| `--offline` | No | Report local changes only, without asking the server. |
| `--json` | No | Print the machine-readable status (same as --output json). |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -10219,7 +10241,7 @@ sim workspaces source diff [paths...] [options]
| --- | --- | --- |
| `--dir <dir>` | No | Workspace source directory written by `workspaces source get`. Defaults to `.`. |
| `--server` | No | Compare with the server's current source instead of the base. |
| `--json` | No | Print the machine-readable diff (same as --output json). |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down
27 changes: 23 additions & 4 deletions apps/docs/content/docs/cli/workflows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,7 @@ sim workflows source get <workflow> [options]
| `--function-code <value>` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `codeFile()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. |
| `--dir <dir>` | No | Write the source, its lock and SDK type declarations into this directory instead of printing them. |
| `--force` | No | With --dir: replace another workflow's source or edits no apply has saved. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand All @@ -1418,7 +1419,7 @@ sim workflows source status [options]
| `--summary-file <path>` | No | Also 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>` | No | Source directory: workflow.ts, functions/* and .sim/. Defaults to `.`. |
| `--offline` | No | Report local changes only, without asking the server. |
| `--json` | No | Print the machine-readable status (same as --output json). |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -1449,6 +1450,7 @@ sim workflows source create [options]
| `-y, --yes` | No | Create without asking for confirmation. |
| `--run [input]` | No | After the write is saved, dry-run the draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it): a run that does not complete exits 1 and deploys nothing. With several triggers (an API and a webhook), name the one to enter through by its const: --run 'shopWebhook=&#123;…&#125;' (--run shopWebhook alone: no input). Repeat --run to test more inputs or triggers: every run is made and reported, and --deploy needs all to complete. Sandboxed code (Python, shell, imports) really runs in it, network requests included, and is listed in sideEffects.unchecked, so --run --deploy in CI sends those. |
| `--deploy` | No | After the write is saved (and a --run completed), deploy the workflow (as `sim workflows deploy <workflowId>` does). |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -1486,6 +1488,7 @@ sim workflows source apply [workflowId] [options]
| `--run [input]` | No | After the write is saved, dry-run the draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it): a run that does not complete exits 1 and deploys nothing. With several triggers (an API and a webhook), name the one to enter through by its const: --run 'shopWebhook=&#123;…&#125;' (--run shopWebhook alone: no input). Repeat --run to test more inputs or triggers: every run is made and reported, and --deploy needs all to complete. Sandboxed code (Python, shell, imports) really runs in it, network requests included, and is listed in sideEffects.unchecked, so --run --deploy in CI sends those. |
| `--deploy` | No | After the write is saved (and a --run completed), deploy the workflow (as `sim workflows deploy <workflowId>` does). |
| `--allow-delete` | No | Delete blocks and variables the source no longer declares; without it, an apply that deletes one is refused. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand All @@ -1505,7 +1508,9 @@ sim workflows source catalog [options]

| Option | Required | Description |
| --- | --- | --- |
| `--workflow-id <value>` | No | Return the source catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`. |
| `--workflow-id <value>` | No | Workflow id, or its exact name: adds every block type already placed in it, the ones the caller could not add marked `addable: false`. |
| `--dir <dir>` | No | Source directory whose workspace and workflow to read. Defaults to `.`. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand All @@ -1528,6 +1533,7 @@ sim workflows source check [options]
| `--no-strict` | No | Never fail on a warning an apply saves. |
| `--no-types` | No | Skip the type check (TypeScript 7.0.2 over tsconfig.json) that runs after the compile. |
| `--verbose` | No | Also list the info findings hidden by default: every one with --output json, blocks placed by autolayout in the display. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -1563,7 +1569,7 @@ sim workflows source diff [paths...] [options]
| --- | --- | --- |
| `--dir <dir>` | No | Source directory: workflow.ts, functions/* and .sim/. Defaults to `.`. |
| `--server` | No | Compare with the server's current source instead of the base. |
| `--json` | No | Print the machine-readable diff (same as --output json). |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -1596,6 +1602,7 @@ sim workflows source find <block...> [options]
| Option | Required | Description |
| --- | --- | --- |
| `--dir <dir>` | No | Workflow source directory to read. Defaults to `.`. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -1629,6 +1636,7 @@ sim workflows source params <builder> [options]
| --- | --- | --- |
| `--dir <dir>` | No | Source directory whose catalog to read. Defaults to `.`. |
| `--full` | No | Print every param with its type, enum, default and doc, not the brief form. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand All @@ -1639,9 +1647,20 @@ Exit codes: 0 printed; 1 no builder or namespace of that name (the closest one i
### List the tables, knowledge bases, credentials, workflows, skills, custom tools, MCP servers and env names source can name

```bash
sim workflows source resources
sim workflows source resources [options]
```

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--dir <dir>` | No | Source directory whose workspace to read. Defaults to `.`. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

API request and response schemas: [getSourceResources](/api-reference/workflows/getSourceResources).

## Related docs
Expand Down
7 changes: 5 additions & 2 deletions apps/docs/content/docs/cli/workspaces.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ sim workspaces source get [options]
| `--dir <dir>` | Yes | Directory to write the workspace source into. |
| `--only <kinds>` | No | Read only these kinds (comma-separated folders: secrets.ts, credentials.ts, tools, skills, mcp, tables, knowledge, files, workflows, deployments). |
| `--force` | No | Replace files with edits no apply has saved. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand All @@ -728,7 +729,7 @@ sim workspaces source status [options]
| `--dir <dir>` | No | Workspace source directory written by `workspaces source get`. Defaults to `.`. |
| `--only <kinds>` | No | Report only these kinds (comma-separated folders: secrets.ts, credentials.ts, tools, skills, mcp, tables, knowledge, files, workflows, deployments). |
| `--offline` | No | Report local changes only, without asking the server. |
| `--json` | No | Print the machine-readable status (same as --output json). |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -760,6 +761,7 @@ sim workspaces source apply [options]
| `--only <kinds>` | No | Apply only these kinds (comma-separated folders: secrets.ts, credentials.ts, tools, skills, mcp, tables, knowledge, files, workflows, deployments). |
| `--to <workspaceId>` | No | Promote 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/&lt;workspaceId&gt;.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>` | No | After the apply, dry-run workflows/&lt;key&gt;/'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. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand All @@ -784,6 +786,7 @@ sim workspaces source check [options]
| `--no-strict` | No | Never fail on a warning an apply saves. |
| `--no-types` | No | Skip the type check (TypeScript 7.0.2 over tsconfig.json) that runs after the compile. |
| `--verbose` | No | Also list the info findings hidden by default: every one with --output json, blocks placed by autolayout in the display. |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down Expand Up @@ -821,7 +824,7 @@ sim workspaces source diff [paths...] [options]
| --- | --- | --- |
| `--dir <dir>` | No | Workspace source directory written by `workspaces source get`. Defaults to `.`. |
| `--server` | No | Compare with the server's current source instead of the base. |
| `--json` | No | Print the machine-readable diff (same as --output json). |
| `--json` | No | Print machine-readable JSON (same as --output json). |

</CommandTable>

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/scripts/fixtures/content-baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -13164,7 +13164,7 @@
{
"lang": "bash",
"meta": null,
"sha256": "face4eea006073000b49334d0a2bea7f15f9df86cb1f606ac8fe39004c754027",
"sha256": "f893698f2fd6f13766a0f3e9d0ad0d4200ccb097939860a634500730358066ab",
"bytes": null,
"line": null
},
Expand Down Expand Up @@ -17813,7 +17813,7 @@
{
"lang": "bash",
"meta": null,
"sha256": "face4eea006073000b49334d0a2bea7f15f9df86cb1f606ac8fe39004c754027",
"sha256": "f893698f2fd6f13766a0f3e9d0ad0d4200ccb097939860a634500730358066ab",
"bytes": null,
"line": null
}
Expand Down
Loading
Loading