Scripts
A script is a versioned, reusable piece of code that can be executed by a Script node inside a workflow. Scripts are language-agnostic: you write them in whichever runtime makes sense for the task.
Supported runtimes
Section titled “Supported runtimes”| Runtime | File extension |
|---|---|
| Bash | .sh |
| Python | .py |
| TypeScript | .ts |
| JavaScript | .js |
| Go | .go |
More runtimes are on the roadmap. Let us know which you need.
Script anatomy
Section titled “Script anatomy”A script is a plain source file with optional frontmatter that declares its inputs and outputs:
# /// orvanta# [inputs]# customer_id = { type = "string", required = true }# dry_run = { type = "boolean", default = false }## [outputs]# result = { type = "string" }# ///
import os
customer_id = os.environ["ORVANTA_INPUT_CUSTOMER_ID"]dry_run = os.environ.get("ORVANTA_INPUT_DRY_RUN", "false") == "true"
# ... your logic ...
print(f"ORVANTA_OUTPUT_RESULT=processed:{customer_id}")Orvanta reads the frontmatter to validate inputs at workflow-design time and surface them in the editor.
Versioning
Section titled “Versioning”Scripts are versioned independently of workflows. When you update a script, existing workflows continue to use the pinned version until you explicitly upgrade them. This prevents silent breakage.
orvanta scripts publish my-script --version 1.2.0orvanta scripts listorvanta scripts diff my-script@1.1.0 my-script@1.2.0Sharing scripts
Section titled “Sharing scripts”Scripts belong to an organisation and can be shared across all workflows in that organisation. You can also mark scripts as public to share them across organisations (marketplace — coming soon).
Related
Section titled “Related”- Workflows — How scripts are used inside workflow nodes.
- CLI: /scripts — Manage scripts from the command line.