The CLI installs from the qiforge-cli npm package and runs as the qiforge-cli binary (source). It provisions an oracle's on-chain identity and Matrix account, scaffolds the oracle as a Cloudflare Workers project on @ixo/oracle-runtime-workers, scaffolds plugins inside it, and manages the entity and its keys afterwards. This page describes qiforge-cli 2.0.0.
Installation
npm install -g qiforge-cli
# or
pnpm add -g qiforge-clipnpm users: after install, approve build scripts for protobufjs:
pnpm approve-builds -g
# select protobufjs when promptedVerify:
qiforge-cli --version
qiforge-cli --helpRequires Node 22+ and pnpm 10+. Provisioning needs either the IXO Mobile App (SignX QR) or a 12/24-word mnemonic (offline mode). Deploying the scaffolded oracle needs a Cloudflare account on the Workers Paid plan.
Commands at a glance
| Command | Purpose |
|---|---|
qiforge-cli | Interactive menu (auth → choose command). |
qiforge-cli new | Provision an oracle and scaffold its Cloudflare Workers project. |
qiforge-cli plugin new <name> | Scaffold a plugin into an existing oracle project. |
qiforge-cli create-entity | Provision an oracle entity, DID and Matrix account without scaffolding. |
qiforge-cli update-entity | Update an existing entity (e.g. add controllers). |
qiforge-cli update-oracle-api-url | Point the entity's #api / #ws services at the deployed oracle. |
qiforge-cli agent-card | Author, validate and publish (or replace) the oracle's Agent Card. |
qiforge-cli setup-signing-key | Add the Ed25519 UCAN signing key to an oracle created before 2.0.0. |
qiforge-cli setup-encryption-key | Add the P-256 key-agreement key (per-room secrets). |
qiforge-cli dashboard-access | Link an oracle to a developer console account. |
qiforge-cli create-composio-key | Mint a Composio API key tied to the oracle. |
qiforge-cli create-user | Create a new user account. |
qiforge-cli signx-login | Authenticate via SignX QR (IXO Mobile App). |
qiforge-cli offline-login | Authenticate with a local mnemonic (no mobile app). |
qiforge-cli logout | Clear stored credentials. |
qiforge-cli help, --help, -h | Show help. |
--version, -v | Show the CLI version. |
Authentication
Two modes. Either one keeps the session in ~/.wallet.json; qiforge-cli logout clears it.
SignX (default)
Uses the IXO Mobile App for QR-code-based authentication. Keep the app open during the session: every transaction is approved on the phone.
qiforge-cli signx-login
# Scan the QR code with the IXO Mobile App when prompted.Offline wallet
Uses a local mnemonic. No mobile app needed; transactions are signed locally.
Interactive:
qiforge-cli offline-loginNon-interactive:
qiforge-cli offline-login \
--network devnet \
--mnemonic "your twelve word mnemonic phrase here" \
--matrixPassword "your-matrix-password"Flags:
| Flag | Description |
|---|---|
--network | devnet, testnet, mainnet |
--mnemonic | Mnemonic phrase for wallet derivation. |
--matrixPassword | Matrix account password. |
--name | Display name (falls back to Matrix profile name). |
qiforge-cli new
Provisions an oracle and scaffolds it as a Cloudflare Workers project, from the bundled template (no git clone). Interactive by default: it asks for the name, description, organisation, avatar and network, provisions the oracle, asks you to describe the services for its Agent Card, and writes the project.
qiforge-cli newProvisioning creates, in order:
- The oracle's account and DID document. The DID carries the oracle's Ed25519 UCAN signing key; the signing mnemonic is stored PIN-encrypted in the oracle's Matrix account room, where the runtime reads it.
- The oracle's Matrix bot account and account room.
- The entity (profile, services, parent protocol, linked accounts), its domain card, its Agent Card, its AuthZ config and its P-256 key-agreement key.
Non-interactive (for CI) — --name is required:
qiforge-cli new --no-interactive \
--name my-oracle \
--network devnet \
--description "What this oracle does" \
--org "My Org" \
--pin 123456 \
--installScaffold only — no login, nothing on chain or on Matrix:
qiforge-cli new --no-interactive --name my-oracle --network devnet --skip-entityFlags:
| Flag | Description | Default |
|---|---|---|
--name | Project and oracle name (required with --no-interactive). | — |
--path | Directory to scaffold into. | ./<name> |
--network | devnet, testnet or mainnet: picks the chain, homeserver and service URLs. | devnet |
--description | Oracle description. | An oracle built with QiForge. |
--org | Organisation name. | IXO |
--pin | 6-digit PIN that encrypts the oracle's secrets in its account room. | Prompted. |
--install | Run pnpm install after scaffolding. | false |
--force | Overwrite an existing non-empty directory. | false |
--skip-entity | Scaffold only: no login, no entity, no Matrix account. The wrangler configs get placeholder identity values. | false |
--template | Template. | basic |
--no-interactive | Skip prompts (requires --name). | false |
In non-interactive mode no Agent Card is published; publish one later with qiforge-cli agent-card.
After new, add your OPEN_ROUTER_API_KEY to .dev.vars and run pnpm dev (wrangler dev, both scripts, on http://localhost:8787). See What qiforge-cli new writes.
qiforge-cli plugin new
Scaffolds a new plugin into an existing oracle project. Run it from inside the project; the CLI walks up to find a package.json that depends on @ixo/oracle-runtime-workers and writes the plugin there. A project on the deprecated Node runtime (@ixo/oracle-runtime) is refused.
qiforge-cli plugin new climateFlag: --cwd — the directory to resolve the oracle project from (defaults to the current directory).
Generated layout (under src/plugins/<name>/):
src/plugins/climate/
├── climate.plugin.ts # OraclePlugin subclass with a manifest stub + one sample tool (climate_echo)
├── climate.plugin.test.ts # 3 tests, run inside workerd by `pnpm test`
├── fixtures/ # placeholder for fixtures
└── README-climate.md # the manifest mirrored as docsRegister the plugin in src/index.ts (plugins: [...BUNDLED_WORKERS_PLUGINS, new ClimatePlugin()]). Name validation: kebab-case, and it must not collide with a plugin the runtime ships.
qiforge-cli create-entity
Provisions an oracle — entity, DID with its Ed25519 UCAN signing key, Matrix account and account room, domain card, P-256 key — without scaffolding a project. new runs the same flow. It prints the oracle's credentials once; save them.
qiforge-cli create-entity --no-interactive \
--network devnet \
--oracle-name "My Oracle" \
--org-name "My Org" \
--description "Oracle description" \
--api-url https://my-oracle.example.workers.dev \
--pin 123456Flags:
| Flag | Description | Default |
|---|---|---|
--network | devnet, testnet, mainnet. | devnet |
--oracle-name | Oracle name. | My oracle |
--org-name | Organisation name. | IXO |
--logo | Logo URL. | Auto-generated. |
--cover-image | Cover image URL. | Same as logo. |
--location | Location string. | New York, NY |
--description | Entity description. | Default placeholder. |
--website | Website URL. | — |
--api-url | The oracle's URL, registered as the entity's #api and #ws services. | http://localhost:8787 |
--relayer-node | Relayer node entity DID. | The network's IXO relayer. |
--project-path | Project directory. | Current directory. |
--pin | 6-digit PIN that encrypts the oracle's secrets. | Prompted. |
qiforge-cli update-entity
Updates an existing entity — for example, adds a controller. Accepts account DIDs as controllers (in addition to entity DIDs).
qiforge-cli update-entityqiforge-cli update-oracle-api-url
Replaces the URL the oracle entity advertises (its #api and #ws services). The prompt defaults to http://localhost:8787, the wrangler dev address; after deploying, set the Worker's URL (for example https://my-oracle.<subdomain>.workers.dev).
qiforge-cli update-oracle-api-urlqiforge-cli agent-card
Authors an Agent Card (name, description, version, priced services), validates it against the eval engine's schema, uploads it with the oracle's Matrix account and anchors it on the entity — replacing an existing card in one transaction. A local copy is saved as agent-card.json in the project.
qiforge-cli agent-card
qiforge-cli agent-card --no-interactive --card card.json --env oracle-credentials.envFlags:
| Flag | Description |
|---|---|
--no-interactive | Skip prompts; requires --card and the oracle's Matrix credentials. |
--card | Agent Card JSON file to validate and publish. |
--env | oracle-credentials.env: the account room and the bot's password. |
--matrix-room-id, --matrix-access-token | Legacy alternative to --env for oracles that kept a Matrix access token. |
--network | devnet, testnet, mainnet. |
--project-path | Project directory to save agent-card.json into. |
qiforge-cli setup-signing-key
The Workers runtime signs every call it makes to IXO services (the user's owner copy in the VFS, the memory engine, the sandbox) with an Ed25519 key, and those services verify it against the oracle's DID document. Oracles created with qiforge-cli 2.0.0 or later get the key at creation. Older oracles carry only secp256k1 keys — the Node runtime used to add the Ed25519 key on its first boot; the Workers runtime only reads it — so they cannot sign UCAN invocations until you run this command.
qiforge-cli setup-signing-key --env oracle-credentials.envIt reads the signing mnemonic from the oracle's account room (or creates it there, PIN-encrypted) and adds its public key to the oracle's DID document with MsgAddVerification, signed and paid for by the oracle's own account. It needs no user login and is idempotent. A Node-era .env with SECP_MNEMONIC, MATRIX_VALUE_PIN, MATRIX_ACCOUNT_ROOM_ID and the bot's credentials works as --env too. Redeploy (or restart) the oracle afterwards.
Flags: --env (otherwise prompted), --network, --no-interactive (requires --env).
qiforge-cli setup-encryption-key
Adds the P-256 keyAgreement key the runtime uses to decrypt per-room secrets: it generates the key pair, stores it PIN-encrypted in the oracle's account room and publishes the public key on the entity. new and create-entity already do this; run it for an oracle that lacks the key. It does not provision the UCAN signing key — that is setup-signing-key.
qiforge-cli setup-encryption-key --env oracle-credentials.env--env supplies the oracle's Matrix account; without it the command prompts for the account room, the bot's user id and its password. It always prompts for the entity DID and the PIN.
qiforge-cli dashboard-access
Links an oracle to a developer console account: mints a short-lived UCAN invocation with the oracle's signing key and asks the eval engine to link the oracle's entity to your console account DID. Optionally authorizes that account to fund the oracle's performance deposits.
qiforge-cli dashboard-access
qiforge-cli dashboard-access --no-interactive \
--grant did:ixo:ixo1... --entity-did did:ixo:entity:... --env oracle-credentials.envFlags: --env (SECP_MNEMONIC, MATRIX_VALUE_PIN and the Matrix credentials), --grant, --entity-did, --grant-deposit, --network, --no-interactive (requires --grant, --entity-did and --env).
qiforge-cli create-composio-key
Mints a Composio API key tied to your oracle's DID. Required if your oracle uses the bundled composio plugin; put the key in .dev.vars (COMPOSIO_API_KEY) and upload it with wrangler secret put. new mints one for you when it can.
qiforge-cli create-composio-keyqiforge-cli create-user
Creates a new user account (DID + Matrix account) — useful for testing your oracle against multiple identities.
qiforge-cli create-userqiforge-cli logout
qiforge-cli logoutClears stored authentication. Future commands prompt for auth again.
What qiforge-cli new writes
my-oracle/
├── src/
│ ├── index.ts # createOracleWorker({ config, plugins }) + export { UserOracleDO, MatrixGatewayDO }
│ ├── gateway.ts # createGatewayWorker() — the Matrix gateway as its own Worker script
│ ├── config.ts # identity + prompt slots
│ ├── config.test.ts # the composed system prompt carries those slots
│ └── plugins/ # your plugins go here
├── test/ # the Worker the unit tests run in (workerd)
├── .claude/
│ └── skills/qiforge-oracle/ # Claude Code skill (project-local)
├── wrangler.jsonc # oracle script: vars, Durable Objects, rate limit, crons, aliases, minify
├── wrangler.gateway.jsonc # gateway script
├── .dev.vars # the Worker's secrets for wrangler dev (gitignored)
├── .dev.vars.example
├── oracle-credentials.env # the oracle's wallet mnemonic + Matrix credentials (gitignored; back it up)
├── agent-card.json # local copy of the published Agent Card
├── package.json
├── pnpm-workspace.yaml # yjs and langsmith overrides, build-script policy
├── tsconfig.json
├── vitest.config.ts
├── README.md
└── CLAUDE.md # bootstrapping for Claude Code- The runtime.
package.jsonpins@ixo/oracle-runtime-workersto exactly0.37.0(the release with the long-thread isolate-memory fixes) and@ixo/matrix-bot-workers-sdkto the exact version that release depends on. A newer runtime reaches scaffolds through a CLI release. - Two Worker scripts. The oracle script holds the HTTP shell and one Durable Object per user; the gateway script holds only the Matrix bot, so the two never share an isolate's 128 MB heap.
pnpm run deploydeploys the gateway, then the oracle. - Wrangler configs. Both set
"minify": true— keep it on (see deploy → Cloudflare Workers runtime) — plusnodejs_compat, the@matrix-org/matrix-sdk-crypto-wasmandjsdomaliases, andlimits.cpu_ms: 300000. After provisioning,varshold the oracle's DIDs, Matrix user and account room and the network's service URLs. - Secrets.
.dev.varsholdsMATRIX_ORACLE_ADMIN_PASSWORD,MATRIX_RECOVERY_PHRASE,MATRIX_VALUE_PIN, an emptyOPEN_ROUTER_API_KEYand, when one was minted,COMPOSIO_API_KEY. Upload them for a deployment withwrangler secret bulk .dev.vars(oracle script) andwrangler secret put … -c wrangler.gateway.jsoncfor the three Matrix secrets. - Credentials.
oracle-credentials.envis the operator's record — wallet mnemonic, signing mnemonic, Matrix password, PIN. The Worker never reads it;agent-card,setup-signing-key,setup-encryption-keyanddashboard-accesstake it with--env.
The CLI also scaffolds a qiforge-oracle Claude Code skill at .claude/skills/qiforge-oracle/ so any AI agent you point at the project (Claude Code, Cursor, etc.) has dense guidance on the Workers runtime — adding plugins and tools, env vars and secrets, the bundled plugins, testing inside workerd, local dev and deploy. The skill is project-local: it ships inside every scaffolded oracle. See the skill source in the CLI repo.
Related references
- Identity and auth guide — what
create-entity,setup-signing-keyandsetup-encryption-keyset up. - Deploy — wrangler, secrets and the isolate memory limits.
- Environment variables — what goes in the wrangler
varsand.dev.vars. - CLI source — every command's implementation.