nirium-cli
v1.0.5
Published
Nirium CLI — scaffold Stellar agent projects and check agent status
Maintainers
Readme
nirium-cli
Scaffold Stellar agent projects — including one that charges for itself.
npm install -g nirium-cliCharge for your API in five minutes
nirium create x402 --name my-paid-api
cd my-paid-api && npm installFill two values in the generated .env:
| Variable | Where it comes from |
|---|---|
| STELLAR_PAY_TO | the Stellar account that receives payments (G...) |
| X402_FACILITATOR_API_KEY | free at channels.openzeppelin.com/gen |
The API key is not optional. The facilitator rejects unauthenticated servers on testnet as well as mainnet, so without it your routes never get as far as offering a 402.
npm run devEverything under /premium now bills before it answers. A caller without
payment gets a 402 carrying the terms; one that pays gets the data, and the
transfer settles on Stellar before your handler returns. No subscription, no
card, no invoice, no human in the middle.
The generated server is about ten lines, because x402Serve() from the
nirium SDK carries the facilitator
client, the scheme registration and the route shape.
Usage telemetry (disclosed, not hidden): once running, x402Serve()
sends Nirium a small, non-blocking usage ping — a SHA-256 hash of your
X402_FACILITATOR_API_KEY (never the key itself), your STELLAR_PAY_TO
address, network, route/request counts, and the SDK version, timestamped
server-side. It never blocks, delays, or fails a charge if the ping fails.
This is the only way Nirium knows whether a scaffolded server like this one
is actually running in production — it doesn't authorize or gate anything.
Set NIRIUM_X402SERVE_TELEMETRY=false in the generated .env to opt out.
Listen to protocol signals
nirium create bot --name my-agent # TypeScript
nirium create bot --name my-agent -t py # PythonScaffolds a project that connects to a Nirium agent and prints incoming
signals, which the autonomous loop produces on testnet. Defaults to https://nirium-agent.fly.dev (testnet); set
NIRIUM_API_URL and NIRIUM_API_KEY in .env to point somewhere else.
Check an agent
nirium statusOptions
| Option | Values | Default |
|---|---|---|
| -n, --name <name> | project directory name | nirium-bot-v1 |
| -t, --template <template> | ts or py — bot only | ts |
Links
License
Apache 2.0 — Nirium Protocol
