Documentation

CLI and API reference

The common public commands, executables, import paths, environment settings, and capability tiers in Oracle's published package.

  • API coverage is not execution support.
  • Unsupported and unconfigured routes fail closed instead of returning plausible placeholders.
  • Specialized MEV and restoration tools are intentionally not presented as general user commands here.
Package 0.36.121 executables56 exports

CLI commands

CommandPurpose
oracleOpen native Oracle chat
oracle setup modelConfigure model OAuth or API-key access
oracle chain listList chain selections
oracle chain use <name>Select the active chain
oracle doctorVerify installation and local posture
oracle auth statusShow provider status without credentials
oracle mcp install <target>Install a read and prepare connector
oracle data serveRun the loopback data plane
oracle public serve --port 8799Run the loopback public plane
oracle eval all --mode playwrightRun the deterministic evaluation aggregate

Installed executables

ExecutablePurpose
oracleMain CLI and native chat
oracle-investigateBounded report-only wallet evidence
oracle-dataLocal read-plane server
oracle-publicLoopback public-plane server
oracle-data-mcpMCP stdio read plane
oracle-scanToken, pool, risk, and exit scanner
oracle-routeSwap and bridge route comparison and preparation
oracle-equitiesCross-venue on-chain equities desk
oracle-gatewayAuthenticated messaging transport
oracle-initDry-run or apply profile and attestation setup

The package currently declares 21 executable bins. Specialized MEV and restoration tools are intentionally not presented as general user commands here. See the package manifest for the complete list.

Library imports

javascript
import { data } from "@oracle-agent/oracle";

const prepared = await data.call("hl-perps", "prepareOrder", {
  coin: "ETH",
  side: "buy",
  size: "0.01",
  owner: "0xYourWallet"
});
// Review the returned unsigned artifact before signing.
ImportSurface
@oracle-agent/oracleCommon package root
@oracle-agent/oracle/dataProvider catalog and data calls
@oracle-agent/oracle/scannerChain and token scanner
@oracle-agent/oracle/prepare-routeSame-chain route comparison and unsigned preparation
@oracle-agent/oracle/prepare-bridgeBridge comparison and ordered unsigned preparation
@oracle-agent/oracle/policyGrant validation and cap constants
@oracle-agent/oracle/local-signerExplicit self-host-only signer surface
@oracle-agent/oracle/verified-receiptsPure receipt verification over supplied facts
@oracle-agent/oracle/connectMCP harness configuration snippets

Environment variables

NameDefaultMeaning
ORACLE_CONFIG_DIR~/.config/oracleLocal configuration directory
ORACLE_DATA_HOST127.0.0.1Read-plane bind host, loopback enforced
ORACLE_DATA_PORT8787Read-plane port
ORACLE_PUBLIC_HOST127.0.0.1Public-plane bind host, loopback enforced
ORACLE_ALLOWED_CHAINSunsetOptional chain allowlist
ORACLE_VALUE_CAPS_ENABLEDonPer-transaction value caps
ORACLE_AUTONOMOUS_TRADINGoffAdditional self-hosted unattended-trading gate
ORACLE_REDACT_SECRETStrueRedact recognized secret material before model context

Capability tiers

TierMeaning
read-onlyData only. No execution claim.
quote-onlyCan price an action. No reviewed transaction builder.
prepareReturns a policy-bound unsigned artifact.
intentReturns typed data for a protocol-native or solver order.

API coverage is not execution support. Unsupported and unconfigured routes fail closed instead of returning plausible placeholders.

Server credentials in 0.36.0

Public and hosted requests spend no server keys by default. The operator can opt in named providers with ORACLE_PUBLIC_ALLOW_SERVER_KEY_PROVIDERS, a comma-separated, whitespace-trimmed, case-sensitive list of canonical IDs. Empty is the default; there is no wildcard grant.

The legacy MAD_PUBLIC_ALLOW_SERVER_KEY_PROVIDERS is read only when the Oracle variable is unset or exactly empty. Any other Oracle value takes precedence, even whitespace or commas only, which then grants nothing. Source: credential sink rules (packages/oracle/src/data/http.mjs, revision 12f21dd5).

Request aliasCanonical opt-in ID
0xzerox
1inchoneinch
openseaopensea-nft
magicedenmagiceden-sol

Aliases still normalize on requests, but alias entries in the operator list are refused with the canonical replacement; independent valid entries remain effective.

Voice uses openai or elevenlabs; watched portfolio RPC overrides use evm-rpc. An aggregator grant does not cover its dependencies. Sources: credential sink rules (packages/oracle/src/data/http.mjs, revision 12f21dd5), CHANGELOG (CHANGELOG.md, this source tree).

oracle public serve and the public MCP handler always apply the public allowlist policy, regardless of public-mode environment flags. Setting ORACLE_PUBLIC_ALLOW_SERVER_KEY_PROVIDERS therefore means unauthenticated callers of those surfaces can spend the listed providers' server keys; that is the operator's opt-in.

Verified local CLI/stdio owner entry points and authenticated local HTTP/app requests retain credential access. On local owner surfaces (CLI, desk, app and charts) outside public/hosted mode, an anonymous local request needs owner authentication to spend server credentials; the allowlist does not grant it there.

Missing request scope is anonymous, and HTTP listeners discard launcher authority. Public/hosted mode requires operator opt-in even with owner tokens. Existing authentication, origin checks, caps and operation restrictions still apply.

Sources: credential sink rules (packages/oracle/src/data/http.mjs, revision 12f21dd5), app authority (apps/oracle-app/lib/oracle/swap-server-keys.ts, revision 12f21dd5), public HTTP authority (packages/oracle/src/public-api/http.mjs, revision 12f21dd5), public MCP handler (packages/oracle/bin/oracle-data-mcp.mjs, revision 12f21dd5).

A configured endpoint may contain credentials in its host, path or query. Without authority, Oracle uses a reviewed built-in public default or refuses before upstream work.

Even a keyless private/loopback endpoint can fall back to a third party, exposing requested addresses there. Authenticate as local owner to retain the configured endpoint. Source: credential sink rules (packages/oracle/src/data/http.mjs, revision 12f21dd5), CHANGELOG (CHANGELOG.md, this source tree).