Excelsior docs
Wrap any command, pay only for the seconds it ran, and get back a receipt signed by the node that ran it.
Quickstart
Needs Node 18.17 or newer. The package has no dependencies.
# run once without installing
npx excelsior-cli run -- echo hello
# or install the command
npm install -g excelsior
Without --cloud the command runs on your own machine. Seconds are metered and the receipt is signed for real, but no money moves (settlement: simulated). Use it to see how billing works before you fund anything.
$ excelsior run --budget 2.00 -- python scraper.py
✓ session opened 0x7f3a…c21e
⧗ metered 412s ████████████ 0.1648 USDG
✓ receipt signed ~/.excelsior/receipts/0x7f3a….json
✓ settled 0.1648 USDG · refund 1.8352 USDG (simulated)
Run in the cloud
Your account is the ed25519 key the CLI creates at ~/.excelsior/node.key. There is no sign-up and no API key: every request is signed with that key.
# --cloud sends the command to the Excelsior node
excelsior account --cloud # your account id and balance
excelsior run --cloud --worker python --budget 0.05 -- python -c "print(6*7)"
# or set it once for every command
export EXCELSIOR_CLOUD=https://api.excelsiorrh.com
- Opening a session holds the budget from your balance. Stopping it pays for the seconds the sandbox was up and returns the rest.
- When the budget runs out the sandbox is destroyed.
- Workers:
shell(Alpine 3.20),python(3.12),node(22). - To run several commands, wrap them in one shell:
excelsior run --worker shell -- sh -c 'cmd1; cmd2'.
Fund your account
Balances are paid in USDG on Robinhood Chain through the ExcelsiorVault contract. The node credits your account after 3 confirmations.
In the browser
Run excelsior account to get your account id, then open excelsiorrh.com/fund. Connect a wallet, approve USDG and deposit. The CLI also prints a link with your account already filled in.
From a wallet or script
Approve the vault for the amount, then call deposit(bytes20 account, uint256 amount). USDG has 6 decimals, so 1 USDG is 1000000.
| Item | Value |
|---|---|
| Chain | Robinhood Chain (4663) |
| Vault | 0x5649715C2B4084f3fA9528fC03143E53EACd14C7 |
| Token | USDG 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 |
Deposits pay for compute on this node. They cannot be withdrawn back to the depositor. Unused session budget always returns to your balance.
Sandbox limits
Each session gets its own container under gVisor, a user-space kernel that keeps your code away from the host.
/workCommands
| Command | What it does |
|---|---|
excelsior run -- <cmd> | Runs the command, meters it by the second, stops it when the budget runs out, signs a receipt. Takes --budget, --worker, --cloud. |
excelsior account | Your account id. With a node: balance, deposits and recent sessions. |
excelsior quote <seconds> | What that many seconds cost. |
excelsior receipts | Every receipt on this machine, newest first. Add --json for scripts. |
excelsior verify <file> | Checks a receipt's signature. Any edit to any field breaks it. |
excelsior whoami | Your key's id and public key. |
run exits with the command's own exit code, or 124 when the budget ran out.
Receipts
Every session ends in a JSON receipt saved under ~/.excelsior/receipts/.
{
"session": "0x7f3a…c21e",
"worker": "python",
"seconds": 412,
"paid": "0.164800 USDG",
"refund": "1.835200 USDG",
"status": "completed",
"settlement": "ledger",
"output": "sha256:91c7…",
"node": { "id": "0xbf86…c85d", "pub": "MCow…" },
"sig": "5d0a…"
}
outputis the sha256 of everything the command wrote to stdout and stderr, in order.sigis an ed25519 signature over the canonical JSON of every other field.node.idis derived from the node's public key, so a receipt cannot swap in another key.
SDK
import excelsior from "excelsior";
const session = await excelsior.open({ worker: "python", seconds: 600, cloud: "https://api.excelsiorrh.com" });
const out = await session.exec("python main.py"); // { code, stdout, stderr }
const receipt = await session.stop();
excelsior.verifyReceipt(receipt); // { ok: true }
open takes budget or seconds, plus an onTick callback. Leave out cloud to run locally.
HTTP API
Base URL https://api.excelsiorrh.com. The CLI and SDK sign requests for you.
| Endpoint | Returns |
|---|---|
GET /v1/node | Node id, rate, workers, deposit details. Public. |
GET /v1/account | Balance, held funds, deposits, recent sessions. |
POST /v1/sessions | Opens a sandbox and holds the budget. Body {worker, budget}. |
POST /v1/sessions/:id/exec | Runs {cmd}, output streamed as NDJSON. |
POST /v1/sessions/:id/stop | Closes, settles, returns the signed receipt. |
GET /v1/receipts/:id | A closed session's receipt. Public. |
Signed requests carry x-excelsior-key, x-excelsior-ts, x-excelsior-nonce and x-excelsior-sig, an ed25519 signature over METHOD\nPATH\nTS\nNONCE\nsha256(body). Requests older than 60 seconds or with a reused nonce are refused.