Skip to content
Talk to our solutions team

Common library

The library every engine except Datapipes binds, and the one a script reaches by default. If you learn one library, learn this one.

Each row below gives the flow task key and the script namespace functions for the same operation. Full parameters are in the atom reference.

OperationFlow taskScript functions
Shellshell:shell.execute, .open, .run, .close
Interactive shellsupershell:supershell.execute
Remote shellssh:ssh.connect, .execute, .upload, .download, .close
Scriptscript:(you are already in one)
Pythonpython:
Mojomojo:
Containersdocker:, podman:docker.build, .push, .pull, .run, .login, .tag, .inspect, .rm
Kubernetesk8s:, kubectl:k8s.apply, .delete, .get, .exec, .rolloutStatus, .logs, .scale

shell.open / .run / .close have no task equivalent. They hold a shell session open across several commands, which is a thing a script can do and a flow node cannot — each node is independent by design.

- name: build
shell:
script: make build
workingdir: ./src
setvar: build_output
next:
go: report
- name: report
print:
message: "build said: {{build_output}}"
OperationFlow taskScript functions
Filesfile:file.read, .write, .exists, .remove, .copy, .move, .mkdir
Pattern matchingglob:glob.find
Archivesarchive:archive.compress, .extract
Content extractionextract:extract.markdown
Structured filesyaml:, json:
Format-preserving YAMLyamlx:
JSON queryjq:jq.query
Templatingliquid:, template:liquid.render, .process

yaml: and yamlx: are not the same. yaml: reads and writes; yamlx: edits in place while preserving comments and key order — the one you want when a human also maintains the file.

OperationFlow taskScript functions
HTTPhttp:, httpclient:http.get, .post, .put, .patch, .delete, .request, .download, .upload
Secure copyscp:scp.upload, .download, .transfer
Syncrsync:rsync.push, .pull, .sync
S3 storages3:s3.upload, .download, .list, .delete
Azure Blobazureblob:azureblob.upload, .download, .list, .delete
Web scrapingscraper:scrape.web, .pdf, … — pipeline-only
OperationFlow taskScript functions
Databasesdb:db.connect, .query, .exec, .insert, .update, .delete, .bulk, .close
Rulesrule:

The task carries its connection and its statement in one block, and the mode is operation:. The namespace splits them: db.connect returns a connectionId that every later call takes, and db.close gives it back. That is the one place where the script form has steps the task does not.

- name: count-orders
db:
driver: postgres
host: "{{db.host}}"
database: orders
username: "{{db.user}}"
password: "{{db.password}}"
operation: query
sql: "select count(*) as n from orders where status = $1"
args: ["open"]
setvar: open_orders
next:
go: report
- name: report
print:
message: "open orders: {{open_orders}}"
OperationFlow taskScript functions
Vaultvault:vault.get, .exists, .serviceJwt
Secret generationsecret:secret.generate, .encode, .decode, .hash, .validate
Encryptionencrypt:, decrypt:crypt.encrypt, .decrypt, .encryptFile, .decryptFile
Hashinghash:hash.string, .file, .bytes
Certificatesletsencrypt:letsencrypt.obtain, .renew, .revoke, .info, .list

The script-side vault namespace reads secrets and issues service tokens. It does not write — secret creation is a deliberate act with an audit trail, not something a transform should do in passing.

OperationFlow taskScript functions
Gitgit:git.clone, .commit, .push, .pull, .status, .addRemote, .removeRemote
OperationFlow taskScript functions
Distributed locklock:lock.acquire, .refresh, .release, .peek
Poll until readywait:wait.http
DNS recordsdns:dns.list, .set, .append, .delete, .lookup
Identifiersid:id.generate

wait: as a task polls several kinds of condition; the namespace offers HTTP polling only. For anything else in a script, write the loop — you have one.

These exist as tasks because they act on the run. A script has language constructs that do the same job.

TaskDoesIn a script
print:Writes into the run loglog.info()
setenv:Sets environment variables for later nodesSet them in the call
setvars:Sets run variablesAssign a variable, or vars.set
suspend:Pauses the run until resumed— nothing to pause
throw:Fails the node deliberatelythrow

Available to a script, with no task equivalent, because they are language services rather than units of work.

NamespaceFor
logLog lines
jsonParse and serialise
string, array, mathValue helpers
time, now, tsnanoClock and timestamps
uuid, ulid, nanoidIdentifier generation
template, interpolateString templating
configService configuration — config.getString, .getBool, .getInt, .getMap, .isSet, .getAppName, .getRootConfig, .getTenantConfig
varsRun variables — vars.set, .readFile, .readGlob
cpetThe tenancy coordinate the script is running under

Most of these are in the base set that survives --namespaces none. See What a script can reach.