Filesystem operations, archives, and moving bytes between hosts and object stores. Every parameter with its type, default and description, plus worked examples.
Read and write files.
Parameter Type Required Default Description operationstring Yes - Operation: read or write filestring Yes - File path contentstring No - Content to write (for write operation) templatestring No - Liquid template to render and write appendbool No falseAppend to file instead of overwrite setvarstring No - Variable to store file content (for read)
file : /config/settings.json
file : /output/config.yaml
File system operations.
Function Description file.read()Read file contents file.write()Write content to file file.exists()Check if file/directory exists file.remove()Delete file or directory file.copy()Copy file file.move()Move/rename file file.mkdir()Create directory
Parameter Type Default Description pathstring - File path to read (required)
Parameter Type Default Description pathstring - File path to write (required) contentstring - Content to write (required) appendbool falseAppend instead of overwrite createbool trueCreate file if not exists
Parameter Type Default Description sourcestring - Source file path (required) destinationstring - Destination file path (required) overwritebool falseOverwrite if exists
let result = file . read ( { path: " /config/settings.json " } )
log ( " Content: " , result . content )
path: " /output/result.txt " ,
content: " Hello, World! " ,
content: new Date () + " - Log entry \n " ,
let result = file . exists ( { path: " /config/app.yaml " } )
log ( " File exists, isDir: " , result . isDir )
source: " /source/file.txt " ,
destination: " /backup/file.txt " ,
destination: " /new/path.txt "
path: " /data/output/reports " ,
// Remove file or directory
Find files matching glob patterns.
Parameter Type Required Default Description patternstring Yes - Glob pattern (e.g., **/*.go) pathstring No .Base directory to search excludelist No - Patterns to exclude filesOnlybool No falseReturn only files dirsOnlybool No falseReturn only directories setvarstring Yes - Variable to store matches
File pattern matching functions.
Function Description glob.find()Find files matching glob pattern
Parameter Type Default Description patternstring - Glob pattern (e.g., **/*.go) pathstring "."Base directory to search excludearray - Patterns to exclude filesOnlybool falseReturn only files dirsOnlybool falseReturn only directories
exclude: [ " **/vendor/** " ]
log ( " Found " , files . matches . length , " Go files " )
// Find JavaScript files, excluding tests
let jsFiles = glob . find ( {
exclude: [ " **/*.test.js " , " **/node_modules/** " ] ,
Compress and extract ZIP, TAR, TAR.GZ, and GZ archives.
Parameter Type Required Default Description operationstring Yes - Operation: extract or compress sourcestring Yes* - Source file/directory sourceslist No - Multiple source paths (for compress) destinationstring Yes - Destination path formatstring No auto-detect Format: zip, tar, tar.gz, gz stripRootbool No falseStrip root directory when extracting setvarstring No - Variable to store output path
source : /downloads/package.zip
source : /downloads/node-v20.0.0-linux-x64.tar.gz
destination : /output/app-bundle.tar.gz
Archive extraction and compression functions.
Function Description archive.extract()Extract archive file archive.compress()Create archive from files
Parameter Type Default Description sourcestring - Path to archive file destinationstring - Extraction destination formatstring auto-detect Archive format stripRootbool falseStrip root directory
Parameter Type Default Description sourcestring - Single source path sourcesarray - Multiple source paths destinationstring - Output archive path formatstring auto-detect Archive format
let result = archive . extract ( {
source: " /downloads/package.tar.gz " ,
log ( " Extracted to: " , result . path )
sources: [ " /app/bin " , " /app/config " ],
destination: " /output/app-bundle.tar.gz " ,
// Create zip from single directory
destination: " /releases/app-v1.0.0.zip "
Extract structured content from documents (Markdown, HTML, etc.) into workflow variables.
Parameter Type Required Default Description formatstring No markdownInput format: markdown contentstring No* - Inline content to extract from filestring No* - File path to read content from globstring No* - Glob pattern for multiple files selectstring No - CSS/path selector to narrow extraction languagestring No - Filter code blocks by language headingstring No - Filter sections by heading text indexint No - Select a specific match by index setvarstring No - Variable to store extracted content extractionsmap No - Multiple extractions (variable name to extraction spec)
*At least one of content, file, or glob is required.
language: yaml
setvar: extracted_yaml
setvar: install_instructions
Content extraction from structured documents.
Function Description extract.markdown()Extract content from Markdown documents
// Extract code blocks by language
let result = extract . markdown ( {
log ( " Found " , result . blocks . length , " YAML blocks " )
// Extract section by heading
let section = extract . markdown ( {
file: " ./docs/README.md " ,
heading: " Getting Started "
File synchronization.
Parameter Type Required Default Description hoststring Yes - Remote host usernamestring Yes - SSH username privatekeypathstring No - Path to private key localpathstring Yes - Local path remotepathstring Yes - Remote path directionstring Yes - push or pullarchivebool No falseArchive mode (-a) deletebool No falseDelete extraneous files excludestring No - Comma-separated exclusion patterns
privatekeypath : ~/.ssh/id_rsa
remotepath : /var/www/html/
privatekeypath : ~/.ssh/id_rsa
exclude : " node_modules,.git,.env "
File synchronisation over SSH, via the rsync binary.
Function Direction rsync.push()Local to remote rsync.pull()Remote to local rsync.sync()Set by direction
Each returns {success, filesTransferred, totalFiles, bytesSent, bytesReceived, output, exitCode, error}.
Parameter Type Description host, user, portstring, string, int The remote keyPathstring SSH private key localPath, remotePathstring The two ends archivebool Archive mode recursivebool Recurse into directories deletebool Remove destination files absent from the source compressbool Compress in transit checksumbool Compare by checksum rather than size and time dryRunbool Report without transferring exclude, includearray Patterns excludeFrom, includeFromstring Pattern files partial, partialDirbool, string Keep partial transfers for resumption preservePerms, preserveOwner, preserveGroup, preserveTimesbool What to carry across bandwidthLimitint Throttle, in KB/s jumpHost, jumpUser, jumpPort, jumpKeyPathRoute through a bastion rsyncPath, sshCommand, extraArgsOverride the invocation timeoutduration Give up after this progress, verbosebool Output detail
host: " web-1 " , user: " deploy " , keyPath: " ~/.ssh/id_ed25519 " ,
localPath: " ./dist/ " , remotePath: " /srv/app/ " ,
archive: true , delete: true , compress: true
// Rehearse first — dryRun reports what would move without moving it
host: " web-1 " , user: " deploy " , keyPath: " ~/.ssh/id_ed25519 " ,
localPath: " ./dist/ " , remotePath: " /srv/app/ " ,
delete: true , dryRun: true
log ( plan . totalFiles , " files would transfer " )
delete: true removes files at the destination that are not in the source. Run it with
dryRun: true once before trusting it against anything you care about.
Secure file transfer.
Parameter Type Required Default Description hoststring Yes - SSH server (host:port) usernamestring Yes - SSH username privatekeypathstring No - Path to private key localpathstring Yes - Local file/directory path remotepathstring Yes - Remote file/directory path directionstring Yes - upload or downloadrecursivebool No falseRecursive transfer preservemodebool No falsePreserve file permissions
host : server.example.com:22
privatekeypath : ~/.ssh/id_rsa
localpath : ./dist/app.tar.gz
remotepath : /opt/deploy/app.tar.gz
host : server.example.com:22
privatekeypath : ~/.ssh/backup_key
localpath : ./backups/db_backup.sql
remotepath : /backups/latest.sql
File transfer over SSH, with jump-host and host-key support.
Function Direction scp.upload()Local to remote scp.download()Remote to local scp.transfer()Set by direction
Each returns {success, filesTransferred, bytesTransferred, error}.
Parameter Type Description host, userstring The remote keyPathstring SSH private key keyPassphrasestring If the key is encrypted passwordstring Password auth, where a key is not in use authMethodstring Which method to use localPath, remotePathstring The two ends recursivebool Transfer a directory preserveModebool Carry file modes across strictHostKeyCheckingbool Verify the host key knownHostsPathstring Where to verify it against timeoutduration Give up after this
host: " web-1 " , user: " deploy " , keyPath: " ~/.ssh/id_ed25519 " ,
localPath: " ./app.tar.gz " , remotePath: " /tmp/app.tar.gz "
host: " web-1 " , user: " deploy " , keyPath: " ~/.ssh/id_ed25519 " ,
remotePath: " /var/log/app/error.log " , localPath: " ./error.log "
Leave strictHostKeyChecking on and point knownHostsPath at a file you control. Turning it off
to make a transfer work removes the only check that the host is the one you meant.
S3-compatible object storage operations. Works with AWS S3, MinIO, DigitalOcean Spaces, and other S3-compatible services.
Parameter Type Required Default Description commandstring Yes - Operation: upload, download, list, delete s3urlstring Yes - S3 endpoint URL bucketnamestring Yes - Bucket name credentials.accesskeystring Yes - Access key ID credentials.secretkeystring Yes - Secret access key credentials.securebool No falseUse HTTPS dirstring No - Base directory for relative paths commandparamsobject Yes - Command-specific parameters
Parameter Type Description files[].pathstring Local file or directory path files[].destinationstring S3 object key/prefix
Parameter Type Description files[].objectstring S3 object key files[].pathstring Local destination path
Parameter Type Description files[].pathstring Prefix to list files[].setvarstring Variable to store results
Parameter Type Description files[].pathstring S3 object key or prefix files[].recursivebool Delete all objects with prefix
s3_access_key : " {{env.AWS_ACCESS_KEY_ID}} "
s3_secret_key : " {{env.AWS_SECRET_ACCESS_KEY}} "
accesskey : " {{s3_access_key}} "
secretkey : " {{s3_secret_key}} "
- path : ./dist/app.tar.gz
destination : releases/v1.0.0/app.tar.gz
- path : ./dist/checksums.txt
destination : releases/v1.0.0/checksums.txt
bucketname : static-assets
accesskey : " {{s3_access_key}} "
secretkey : " {{s3_secret_key}} "
destination : website/assets/
bucketname : config-bucket
accesskey : " {{s3_access_key}} "
secretkey : " {{s3_secret_key}} "
- object : config/production.yaml
- object : secrets/keys.json
path : ./secrets/keys.json
accesskey : " {{s3_access_key}} "
secretkey : " {{s3_secret_key}} "
accesskey : " {{s3_access_key}} "
secretkey : " {{s3_secret_key}} "
- path : old-release.tar.gz
destination : backups/db-backup.sql
S3-compatible storage functions.
Function Returns s3.upload(){success, uploaded, error}s3.download(){success, downloaded, error}s3.list(){success, objects, error} — each object has name, size, modTime, isDirs3.delete(){success, deleted, error}
Every function takes these.
Parameter Type Default Description endpointstring - S3 endpoint host, e.g. s3.amazonaws.com or minio.local:9000 bucketstring - Bucket name accessKeystring - Access key ID secretKeystring - Secret access key securebool falseUse HTTPS insecureSkipVerifybool falseSkip TLS verification
Function Parameter Type Description uploadsourcestring Local path to send destinationstring Object key to write recursivebool Walk a directory downloadobjectstring Object key to fetch pathstring Local path to write listprefixstring Filter by key prefix deletepathstring Object key to remove recursivebool Remove a prefix
The task and the namespace name these differently
The s3: task nests credentials under credentials: and operands under commandparams:, and
calls the bucket bucketname and the endpoint s3url. The namespace takes one flat object with
the names above. Translating between the two is not a matter of case.
Task Namespace bucketnamebuckets3urlendpointcredentials.accesskeyaccessKeycredentials.secretkeysecretKeycredentials.securesecurecommandparams.files[].pathsource (upload) / path (download)commandparams.files[].destinationdestination
endpoint: " s3.amazonaws.com " ,
source: " ./dist/app.tar.gz " ,
destination: " releases/v1.0.0/app.tar.gz "
endpoint: " minio.local:9000 " ,
endpoint: " s3.amazonaws.com " ,
object: " config/production.yaml " ,
endpoint: " s3.amazonaws.com " ,
log ( " Found " , found . objects . length , " objects " )
endpoint: " s3.amazonaws.com " ,
path: " temp/old-file.txt "
Pull credentials from the Vault namespace rather than
literals — these examples name variables so the shape is readable, not because that is where a
secret should live.
Azure Blob Storage operations with parallel processing and incremental sync.
Parameter Type Required Default Description connection_stringstring Yes - Azure Storage connection string commandslist Yes - List of operations to perform max_retriesint No 3Maximum retry attempts retry_delaystring No 1sDelay between retries max_workersint No 4Parallel workers incrementalbool No falseOnly sync changed files continue_on_errorbool No trueContinue on individual file errors sync_modestring No fastSync mode: fast, full operation_logstring No - Path to write operation log
Action Description uploadUpload files to blob storage downloadDownload blobs to local filesystem listList blobs in container deleteDelete blobs
azure_conn : " {{env.AZURE_STORAGE_CONNECTION_STRING}} "
connection_string : " {{azure_conn}} "
connection_string : " {{azure_conn}} "
connection_string : " {{azure_conn}} "
connection_string : " {{azure_conn}} "
connection_string : " {{azure_conn}} "
operation_log : ./upload-log.json
destination : " imports/{{ date | date: '%Y-%m-%d' }}/ "
Azure Blob storage functions.
Function Description azureblob.upload()Upload files to Azure Blob container azureblob.download()Download blobs from Azure Blob container azureblob.list()List blobs in container azureblob.delete()Delete blobs from container
Parameter Type Default Description connectionStringstring - Azure Storage connection string containerstring - Container name sourcestring - What to send (upload) — local path destinationstring - Where to write it — blob path on upload, local path on download prefixstring - Filter by blob prefix (list, download) blobNamestring - A single blob to act on maxWorkersint - Parallel transfers maxRetriesint - Retries per transfer incrementalbool falseSkip blobs already present and unchanged recursivebool falseRecursive upload/download skipPatternsarray - Patterns to skip continueOnErrorbool trueContinue on individual file errors syncModestring "fast"Sync mode: fast or full
connectionString: env . AZURE_STORAGE_CONNECTION ,
source: " ./dist/app.tar.gz " ,
destination: " releases/v1.0.0/app.tar.gz "
// Upload directory recursively
connectionString: env . AZURE_STORAGE_CONNECTION ,
skipPatterns: [ " *.tmp " , " .git/** " ]
connectionString: env . AZURE_STORAGE_CONNECTION ,
destination: " production/config.yaml "
connectionString: env . AZURE_STORAGE_CONNECTION ,