v2.0.0Meet Sage, your assistant in the terminal · read the release notes →

Operate your infrastructure from the terminal.

SageCode is the command line for Autosage. One command, sagex, to build, version and run workflows on your servers, and Sage, an assistant that does the work with you.

$curl -LsSf https://sagecode.web.app/install.sh | sh
Then sign in with your Autosage account: sagex auth login. No account? Create one free →
MIT licensedPython 3.11+macOS · Linux · Windows
Triggers
Git pushCI pipeline · exit codes
WebhookPOST · Idempotency-Key
Schedule0 2 * * * · UTC
Manualsagex run workflow
sagex · ~/infra

Example: a workflow run, started by a webhook, a schedule, a CI job or by hand, streaming node by node in SageCode.

Targets
web-1Linux · SSH
win-dbWindows · WinRM
Notify teamEmail · SMTP
Run logsstreamed · saved locally
63commands in 16 groups
4ways to start a run
SSH · WinRMLinux and Windows targets
0secrets written to disk
01 Triggers

Every way a run starts. One tool to follow it.

Start a workflow by hand, from a webhook, on a cron schedule or from your CI pipeline. SageCode streams each one live, node by node, as it runs on your servers.

MANUAL

Run it now

Run any workflow or script and follow it live. Ctrl+C cancels, and the logs land in your workspace.

$ sagex run workflow Deploy \ -p VERSION=1.4.2
HTTP

Expose a webhook

One command creates an HTTP trigger; trigger poll follows its runs. Every call carries an Idempotency-Key, so retries never run twice.

$ sagex trigger create Deploy \ -t http
CRON

Schedule it

Five-field cron in UTC, validated by the scheduler itself. SageCode shows the next runs, then can wait for one and follow it.

next run in …
$ sagex trigger create Backup \ -t schedule \ --cron "0 2 * * *"
CI/CD

Wire it into CI

Set SAGEX_API_KEY and call SageCode from any pipeline. The exit code follows the run, so a failed deploy fails the build.

$ sagex run workflow Deploy \ -p VERSION=$GITHUB_SHA
02 Version control

Infrastructure as files.

Keep workflows and scripts as plain files in git, next to the code they deploy. Edit them in your own editor; SageCode shows you exactly what changes before anything reaches the server.

  • new scaffolds a workflow or script, with every field explained
  • syntax prints copy-paste JSON for any node or edge
  • render --file previews a workflow's flow before you push
  • push creates or updates, and asks first; scripts show a diff
  • copy pulls workflows, scripts and run logs into your workspace
~/infra main
  • workflows/
  • Deploy_Production.jsonM
  • Nightly_Backup.json
  • scripts/
  • deploy.shM
  • migrate.pyA
  • logs/workflow/46a2ba05…/
sagex push script deploy.sh
❯ sagex push script deploy.sh'deploy.sh' already exists (id 12, v3, updated 2026-10-28T09:14:02Z).--- server:deploy.sh+++ local:deploy.sh@@ -4,3 +4,4 @@ set -euo pipefail-systemctl restart app+systemctl reload app+curl -fsS localhost/health Update it? This overwrites the code and bumps the version. [y/N]: y✓ Updated 'deploy.sh' (id 12, now v4)
03 Terminal app

A control room in your terminal.

Run sagex on its own to open a full-screen app: your resources on the left, a live transcript on the right. Start any command with ! and watch workflow runs draw themselves, or type a question to ask Sage.

The SageCode terminal app. Workflows, scripts, vault items, recent runs and triggers are listed on the left, with today's Sage usage and model at the bottom. On the right, a finished run of Deploy Production shows each node with its exit code and duration. Tap to view full size ↗
! run a command no ! ask Sage Esc stop it ↑↓ history F2 switch shell F3 server / local files F5 refresh CtrlQ quit
04 Sage

Ask in plain language. Approve what it does.

In the terminal app, type a question without ! and Sage, your Autosage assistant, answers. It looks things up on its own and asks before it changes anything.

  • Shows its work: every command it runs appears as a card with the exact command and its output
  • Asks first: y runs a change once, a allows it for the session, n declines. Deletes always ask; /permissions takes allowances back
  • Files and shell: reads, writes and edits files in your workspace and runs shell commands, each one approved
  • Remembers: conversations are saved; /sessions reopens one, /new starts fresh
  • Your own model: add one with sagex create model, switch with /model
  • Usage at a glance: today's requests, tokens and model sit in the sidebar; /usage has the rest

Sage never signs in, never takes or shows a secret, and can't add a model key. Runs that need a password are handed back to you.

sagex · Sage
you why did the last Deploy run fail?╭ sagex_read · sagex show run latest --logs│ ✗ migrate exit 1 · ERROR: column "region" already exists╰ ✓ 1.4sSage The migrate node failed: its migration had already run on this database. I can make it skip existing columns and rerun it.╭ Approve? Make the migration safe to rerun│ edit_file scripts/migrate.py│ - op.add_column("users", region)│ + if "region" not in columns: op.add_column(…)╰ y run once · a this session · n don't
05 Architecture

Your terminal, a control plane, your servers.

SageCode never connects to your servers itself. It talks to the Autosage API over HTTPS; Autosage validates, queues and executes the work, then streams every line back.

01 / CLIENT

Your terminal

The SageCode CLI or terminal app, signed in through your browser, with its session key in your OS keychain.

HTTPS · X-API-Key
02 / CONTROL PLANE

Autosage

Stores workflows, scripts and vaults, checks each run, and owns the webhooks and the scheduler.

REST · queue · cron
03 / EXECUTION

Workers

Fetch the script, fill in its parameters and connect to the target, streaming output as it happens.

SSH · WinRM · SMTP
04 / STREAM

Live output

Every line flows back as server-sent events, to SageCode, the web app, or both at once.

SSE
06 Security

Secrets stay secret.

SageCode handles server passwords, SSH keys and webhook secrets. It's built so none of them end up in your shell history, your workspace or a stray screenshot.

Keychain, not dotfiles

Your session key lives in Credential Manager, Keychain or Secret Service, and you can revoke any session from your Autosage profile. CI jobs use an access token in SAGEX_API_KEY.

Never on the command line

Passwords, SSH keys and your own model's API key go in at hidden prompts, or from a file you point to. Never as flags.

Hidden by default

Credentials can't be copied to disk. show key keeps values hidden unless you pass --reveal and confirm.

Shown once

A webhook's secret appears exactly once, when it's created or rotated. The server keeps only a hash.

07 Releases

Versioned like your infrastructure.

SageCode follows semantic versioning and ships from tagged releases straight to PyPI. Here's the story so far.

v1.0.0 v1.1.0 v2.0.0 main feat/sessions feat/sage
v1.0.0 shipped

Everything the web app does

Workflows, scripts, vaults, triggers and live runs, from your terminal.

v1.1.0 shipped

Open to everyone

Sign in with your browser, and see and revoke every session on your Autosage profile.

v2.0.0 live

Sage in the terminal

Ask, look up, run and fix with your approval. Saved conversations, your own model and usage at a glance.

Install in one line.

Then sign in with sagex auth login and run sagex.

$curl -LsSf https://sagecode.web.app/install.sh | sh