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.
CLI commands
| Command | Purpose |
|---|---|
| oracle | Open native Oracle chat |
| oracle setup model | Configure model OAuth or API-key access |
| oracle chain list | List chain selections |
| oracle chain use <name> | Select the active chain |
| oracle doctor | Verify installation and local posture |
| oracle auth status | Show provider status without credentials |
| oracle mcp install <target> | Install a read and prepare connector |
| oracle data serve | Run the loopback data plane |
| oracle public serve --port 8799 | Run the loopback public plane |
| oracle eval all --mode playwright | Run the deterministic evaluation aggregate |
Installed executables
| Executable | Purpose |
|---|---|
| oracle | Main CLI and native chat |
| oracle-investigate | Bounded report-only wallet evidence |
| oracle-data | Local read-plane server |
| oracle-public | Loopback public-plane server |
| oracle-data-mcp | MCP stdio read plane |
| oracle-scan | Token, pool, risk, and exit scanner |
| oracle-route | Swap and bridge route comparison and preparation |
| oracle-equities | Cross-venue on-chain equities desk |
| oracle-gateway | Authenticated messaging transport |
| oracle-init | Dry-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
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.| Import | Surface |
|---|---|
| @oracle-agent/oracle | Common package root |
| @oracle-agent/oracle/data | Provider catalog and data calls |
| @oracle-agent/oracle/scanner | Chain and token scanner |
| @oracle-agent/oracle/prepare-route | Same-chain route comparison and unsigned preparation |
| @oracle-agent/oracle/prepare-bridge | Bridge comparison and ordered unsigned preparation |
| @oracle-agent/oracle/policy | Grant validation and cap constants |
| @oracle-agent/oracle/local-signer | Explicit self-host-only signer surface |
| @oracle-agent/oracle/verified-receipts | Pure receipt verification over supplied facts |
| @oracle-agent/oracle/connect | MCP harness configuration snippets |
Environment variables
| Name | Default | Meaning |
|---|---|---|
| ORACLE_CONFIG_DIR | ~/.config/oracle | Local configuration directory |
| ORACLE_DATA_HOST | 127.0.0.1 | Read-plane bind host, loopback enforced |
| ORACLE_DATA_PORT | 8787 | Read-plane port |
| ORACLE_PUBLIC_HOST | 127.0.0.1 | Public-plane bind host, loopback enforced |
| ORACLE_ALLOWED_CHAINS | unset | Optional chain allowlist |
| ORACLE_VALUE_CAPS_ENABLED | on | Per-transaction value caps |
| ORACLE_AUTONOMOUS_TRADING | off | Additional self-hosted unattended-trading gate |
| ORACLE_REDACT_SECRETS | true | Redact recognized secret material before model context |
Capability tiers
| Tier | Meaning |
|---|---|
| read-only | Data only. No execution claim. |
| quote-only | Can price an action. No reviewed transaction builder. |
| prepare | Returns a policy-bound unsigned artifact. |
| intent | Returns 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 alias | Canonical opt-in ID |
|---|---|
| 0x | zerox |
| 1inch | oneinch |
| opensea | opensea-nft |
| magiceden | magiceden-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).