Codex Installation
OpenBroker uses a Codex skill for trading guidance and the openbroker CLI for execution. Its harness-aware installer handles both pieces and immediately starts the recommended restricted API-wallet onboarding flow.
Install for Codex
Run this in a terminal on the machine where Codex is installed:
npx openbroker@latest install --codexThe command installs or updates the Codex skill, installs the persistent openbroker CLI, and starts restricted API-wallet onboarding. It uses $CODEX_HOME when set and otherwise installs the skill under ~/.codex/skills/openbroker.
You can also ask Codex to run the command. Codex may request approval before network access or a global npm installation, depending on the local security policy. Keep the command running while you complete browser approval.
Browser approval
openbroker setup --api-wallet generates a restricted API wallet locally, stores its key in ~/.openbroker/.env with permissions 0600, and prints a URL like:
https://openbroker.dev/approve?agent=0x...When Codex shows the link:
- Open it in your browser.
- Connect the funded master Hyperliquid wallet you want OpenBroker to trade on.
- Verify the agent address and network.
- Approve
ApproveAgentand the 1 bpsApproveBuilderFeetransaction.
The API wallet can place trades but cannot withdraw funds. Your master-wallet private key never needs to be shared with OpenBroker or Codex, and API-wallet access can be revoked from app.hyperliquid.xyz.
The CLI waits for approval for up to ten minutes. If it times out, finish the browser approval and rerun:
openbroker setup --api-walletOpenBroker reuses the incomplete local setup and resumes approval polling instead of generating another API wallet.
Verify setup
After approval, Codex should run:
openbroker account --jsonCheck that:
addressis the funded master Hyperliquid account.signingWalletis the restricted API wallet.walletTypeisapi.- Equity and positions match the intended master account.
If the account unexpectedly shows $0 equity, verify that HYPERLIQUID_ACCOUNT_ADDRESS points to the funded master account. Do not inspect or print the private key while troubleshooting.
Use OpenBroker in Codex
Restart Codex or start a new thread after installation, then invoke the skill explicitly:
$openbroker inspect my Hyperliquid account and explain the safest next action.OpenBroker defaults proposed trades and new automation logic to dry-run previews. Live execution still requires explicit user intent and the normal Codex command approval flow.
Manual fallback
If installation was interrupted, rerun the installer. Existing OpenBroker skill files and incomplete API-wallet setup are safely reused:
npx openbroker@latest install --codexIf you only need to resume onboarding, start it directly:
openbroker setup --api-walletThen complete browser approval, verify with openbroker account --json, and restart Codex.