Bridge.xyz stablecoin infrastructure CLI. Built with incur.
One incur router CLI (cli.ts) with subcommand groups for each Bridge API domain. cli.fetch provides HTTP API + MCP for free.
src/
├── cli.ts # incur router CLI — all commands
├── bin.ts # Entry point — cli.serve()
├── index.ts # Library exports
└── core/
├── client.ts # Bridge API fetch wrapper (auth, base URL)
├── customers.ts # Customers API
├── wallets.ts # Wallets API
├── transfers.ts # Transfers API
├── liquidation.ts # Liquidation addresses API
├── external-accounts.ts # External bank accounts API
├── plaid-link.ts # Plaid Link flow (link_token, local server, public_token exchange)
├── virtual-accounts.ts # Virtual accounts API
├── prefunded-accounts.ts # Prefunded accounts API
└── exchange-rates.ts # Exchange rates API
- incur subcommand groups:
customers,wallets,transfers,liquidation,external-accounts,virtual-accounts,prefunded-accounts,configureas sub-CLIs - core/client.ts: thin fetch wrapper, reads API key from
~/.config/bridgerton/config.jsonorBRIDGE_API_KEYenv var - Auto-detect:
sk-test-*→ sandbox (https://api.sandbox.bridge.xyz/v0),sk-live-*→ production (https://api.bridge.xyz/v0) - Plaid Link:
external-accounts createdefaults to Plaid Link (browser-based bank linking). Pass--accountNumber,--routingNumber,--accountOwnerNamefor manual creation - npm package: published as
bridgerton
bun install
bun run build # tsc + chmod + bun link
bun run typecheck # tsc --noEmitBRIDGE_API_KEY— Bridge API key (required, auto-detects sandbox vs production from key prefix)
This project uses changesets for versioning. Every user-facing change (feat, fix, refactor) MUST include a changeset.
Since changeset add is interactive (TUI), create changeset files manually:
# File: .changeset/<descriptive-name>.md
---
"bridgerton": patch # or minor, major
---
Description of the change.- One changeset per logical change (don't bundle unrelated changes)
patchfor fixes/refactors,minorfor new features,majorfor breaking changes- To release:
bunx changeset version && bun run build && bunx changeset publish
- Atomic commits, conventional messages (
feat:,fix:,refactor:,chore:,docs:) - Always push after committing