Skip to main content

Command Reference

Every command group at a glance. For every flag and option, see the full command reference on the SageCode site — it's generated from the CLI itself, so it always matches the latest release. In your terminal, sagex <group> --help shows the same detail.

GroupCommandsWhat it does
authlogin · status · logoutSign in with your browser (or --with-token), see who you're signed in as, sign out. Guide
listworkflow · script · run · trigger · vault · server · key · modelCompact tables of your resources; --json for scripting
showworkflow · script · run · trigger · vault · server · key · modelOne resource in detail. show run --logs prints node output; show key --reveal shows secrets after confirming (a model's API key is never shown)
renderworkflowDraw a workflow as a flow tree, from AutoSage or a local file (--file)
runscript · workflowRun now and stream the output live; Ctrl+C stops. Inputs with -p NAME=VALUE. Guide
triggercreate · fire · poll · watch · invoke · enable · disable · regenerateWebhooks and cron schedules: set up, fire, follow and rotate. Guide
newworkflow · scriptScaffold a local file, ready to edit
pushworkflow · scriptCreate in AutoSage from a local file, or update after confirming (scripts show a diff)
copyworkflow · script · runDownload to your workspace (--all, or copy run --since 7days). Keys can't be copied
createvault · server · key · modelCreate Key Vault resources (guide), or add a model with your own API key (guide)
updatevault · server · key · modelChange them, rotate a key's secret, or replace a model's API key (--new-key)
renameworkflow · script · vault · server · key · modelRename in place
deleteworkflow · script · vault · server · key · trigger · modelDelete, after confirming. Deleting a vault deletes everything in it
usemodelChoose the model Sage (and Autobot on the web) answers with, or --free for AutoSage's free models. Guide
workspaceset · showChoose the local folder SageCode reads from and writes to. Concepts
syntaxtrigger · script · email · decision · edge · decision-edgePrint a copy-paste JSON snippet for a workflow node or edge

Run sagex with no command to open the terminal app, where you can also ask Sage, and sagex --version to see which version you have.

A typical session​

sagex new script disk_check --language shell # scripts/disk_check.sh
sagex push script disk_check # create it in AutoSage
sagex run script disk_check.sh -s web-1 # run it on a vault server

sagex new workflow "Disk Check" # workflows/Disk_Check.json
sagex syntax script # snippet for an action node
sagex render workflow --file "Disk Check" # preview the flow locally
sagex push workflow "Disk Check"
sagex trigger create "Disk Check" -t schedule --cron "0 2 * * *"
sagex trigger watch "Disk Check" # wait for the next firing, then follow it
On This Page