From the command line
aioum is the app as commands. Backing an operator, sitting on the jury, listing a service,
driving your private node, building and hiring agents, watching the network: one command each,
against the same runner, nodes and contracts the app uses. A listing you add here appears on the
marketplace page; an agent built in the app answers to aioum agent run. Build the tool, set its
environment, run the two commands that tell you the stack is there.
What you need
- The repository checked out, and Node 18 or newer.
- The stack. On the local development network,
scripts/devstack.sh reviewfrom the repository root starts all of it, the chain, the demo node, the catalogue node, the indexer, the agent runner, the facilitator and the bundler, on the ports the CLI expects. On the AIOUM network you point the CLI at those parts with the variables in step 2. - A wallet's private key, only for staking, the jury and paid calls. Agents, selling and the private node need no wallet of yours.
Steps
-
Build the SDK, then the CLI. The CLI's one dependency is
@aioum/sdk, taken frompackages/sdkas a local package, so the SDK is built first.(cd packages/sdk && npm install && npm run build) cd packages/cli && npm install && npm run buildFrom here on, every command is
npx aioum …, run inpackages/cli. During developmentnpx tsx src/aioum.ts …runs the source without a build. -
Set the environment. Every variable has a default that matches the local development network, so on your own machine you set none of them, with one exception:
AIOUM_PRIVATE_KEYwhen you stake, sit on the jury or pay for a call yourself.AIOUM_RPC_URL: the chain's RPC. Default: therpcUrlindeployments.json, elsehttp://127.0.0.1:8545.AIOUM_DEPLOYMENTS: the path to the network'sdeployments.json(contract addresses and chain id), needed for anything on-chain. Default: the first ofdeployments.json,offchain/deployments.jsonand../offchain/deployments.jsonthat exists where you run, else the repository's ownoffchain/deployments.json, wherever the CLI is run from.AIOUM_INDEXER_URL: the indexer, the marketplace directory. Defaulthttp://127.0.0.1:8549.AIOUM_AGENTS_URL: your runner. Defaulthttp://127.0.0.1:8770/runner, your own inside your private node;aioum runner use <url>picks a shared one.AIOUM_NODE_URL: the demo node, where a paid call goes when the listing names no node of its own. Defaulthttp://127.0.0.1:8546.AIOUM_MULTINODE_URL: the catalogue node, whose admin API lists and delists your services. Defaulthttp://127.0.0.1:8556.AIOUM_NODE_TOKEN: that admin API's bearer token, when the node was started with one. Default: none.AIOUM_FACILITATOR_URL: the facilitator. Defaulthttp://127.0.0.1:8547.AIOUM_BUNDLER_URL: the bundler. Defaulthttp://127.0.0.1:8548.AIOUM_PRIVATE_NODE_URL: your private node. Defaulthttp://127.0.0.1:8770.AIOUM_PRIVATE_NODE_TOKEN: its bearer token. Default: the file~/.aioum-private/token(or$PRIVATE_NODE_DIR/token), which the node writes at its first start.AIOUM_DEPOSITS_URL: the deposit service, deposits from any chain credited as USDC. Defaulthttp://127.0.0.1:8551.AIOUM_BACKER_URL: the network's staking node, which reviews a listing and backs it (aioum stake request). Defaulthttp://127.0.0.1:8552.AIOUM_PRIVATE_KEY: your wallet, for staking, the jury and paid calls. It signs on your machine and is never sent anywhere. Default: none (OWNER_KEYis read as a fallback).AIOUM_OWNER: the name your agents are grouped under. Defaultcli.AIOUM_DEBUG: set it to print a stack trace under the one-line error. Default: unset.
Three flags work on every command:
--jsonprints the result as JSON,--key <hex>stands in forAIOUM_PRIVATE_KEYfor that one command, and--deployments <path>forAIOUM_DEPLOYMENTS. -
Print what the CLI resolved.
npx aioum configOne fact per line: each URL in full, the deployments file with its chain id and how many addresses it holds, the owner, the path of the jury salt store, and each secret masked. The node token and the private-node token read
set (N chars), the latter with where it came from; the private key readsset from AIOUM_PRIVATE_KEYwith its address, never the value. A line that reads(not set: …)says which commands need it. -
Probe the stack.
npx aioum statusOne row per part,
okorDOWN, with its URL, what it said and how long it took: the chain (chain id and block), the node (its operator and whether it is staked), the catalogue node (listings served), the indexer (listings indexed), the agent runner (agents, runs, how many are running, the planner it has of its own and how many planner listings are live), the facilitator, the bundler, the deposit service, the staking node and the private node (which providers are connected). The last line readsall goodorsomething is down, with the counts: listings, agents, runs and how many are running. The deposit service, the staking node and the private node do not count against the verdict when they are not running. -
The same, for a script.
npx aioum status --jsonIt prints exactly what the underlying call returned:
ok,services(one object per probe withname,url,ok,detailandms) andcounts. Every command works this way with--json, sojqcan read any of it; without the flag the output is columns and facts for a person. A failure exits with code 1 and one line on standard error saying what went wrong. -
See what else there is.
npx aioum helpIt lists every group with its commands and the global flags;
npx aioum stake --helplists one group's commands with their flags, andnpx aioum stake delegate --helpshows one command. A command that spends money or signs a transaction says so there.
What you have now
A built aioum that knows where every part of your network is and has probed each one.
Everything else runs in this same shell with this same environment; commands that sign or spend
say so.
Next: Fund your AI wallet from any chain — a quote from where you hold your funds, one command to send, and the credit that follows.