Skip to content
Stirrup

Stirrup documentation

The full docs ship inside StirrupOS, next to the work they describe; this page shows where to start and how the API fits together.

Reading the full docs requires a Stirrup account. The Free plan is enough.

scripts/weekly-report.ts
import { stirrup } from "@stirrup/sdk";
export async function main() {
const rows = await stirrup.spreadsheets.query("revenue.grid", { sheet: "Q3" });
const total = rows.reduce((s, r) => s + r.revenue, 0);
await stirrup.store.set("weekly:total", total, { ttl: 3600 });
return { total };
}
Published at /api/run/acme/weekly-report

Quickstart

Five steps from a raw source to a governed endpoint, each using one module.

  1. 1

    Connect a source

    PostgreSQL, MySQL, a REST API, Google Sheets, Microsoft Excel or a CSV, XLSX or JSON upload. It lands as a spreadsheet tab.

    About this module
  2. 2

    Model it in a spreadsheet

    Write formulas on the live data. Recalculation runs on the server and reaches every viewer.

    About this module
  3. 3

    Write a script

    JavaScript, TypeScript or SQL with the stirrup.* SDK, in a sandboxed runtime.

    About this module
  4. 4

    Publish it as an endpoint

    The script becomes a versioned endpoint at /api/run/{org}/{slug}, called with an API key. Team plan and up.

    About this module
  5. 5

    Guard it with a contract

    Add rules for types, nulls, patterns, allowed values and freshness so bad data is caught before it spreads. Team plan and up.

    About this module

Documentation by module

Every module has its own section in the docs. Here is what each one covers.

Documentation sections by module
ModuleWhat the docs cover
Connections & FilesThe six connectors, schema introspection, sync schedules, import history, write-back and org file storage.
SpreadsheetsThe formula engine, what-if scenarios, pivots, charts, formatting, protection, comments and version history.
Scripts & APIsThe editor, sandbox limits, the SDK, publishing endpoints, API keys, environments, schedules, webhooks and tests.
Graphs & DashboardsChart types, binding charts to live ranges, trendlines, dashboards, filters and sharing.
Contracts & TriggersRule types, warn and block modes, violations, coverage gaps, and event and cron triggers.
Docs & Doc SitesThe block editor, live embeds, versions, Doc Sites, Ask-AI for readers and share links.
InvestigateOpening an investigation, the 10 lenses, evidence trails and Investigation Reports.
Juno AI agentWhere Juno works, approvals, modes, budgets and unattended runs.

API basics

Any published script is an HTTPS endpoint on api.stirruphq.com, authenticated with an API key.

API basics
Base URL
https://api.stirruphq.com
Endpoint path
/api/run/{org}/{slug}
With subpath and method routing. Each publish creates a new version.
Authentication
x-stirrup-key header
Keys start with sk_live_ and carry scopes, role ceilings, endpoint allowlists and an expiry.
Per-endpoint settings
Methods, CORS, IP allow and deny lists, rate limits
Plus ETag caching, idempotency keys and JSON Schema request validation.
Reference
OpenAPI docs generated for every published endpoint
Call a published endpoint
curl https://api.stirruphq.com/api/run/acme/weekly-report \
-H "x-stirrup-key: sk_live_•••"
// 200 OK
{ "total": 43950 }

The script SDK

@stirrup/sdk has 15 capability-gated namespaces, so a script gets only what you grant it.

  • stirrup.spreadsheets
  • stirrup.contracts
  • stirrup.files
  • stirrup.graphs
  • stirrup.connections
  • stirrup.documentation
  • stirrup.storeKey-value store with TTL, incr and compareAndSet
  • stirrup.httpAllowlisted egress; private IPs are blocked
  • stirrup.cache
  • stirrup.secretsInjected at run time, never logged
  • stirrup.util
  • stirrup.notify
  • stirrup.logWith redaction
  • stirrup.runsList, get and replay runs
  • stirrup.scriptsCall other scripts

The script editor has type-aware autocomplete for the whole SDK, and every published script gets a generated API reference page.

Read the docs in the app

Start free with two seats to open the full documentation, or talk to us about a rollout for your team.