- Terminal UI captures input and passes it into the command registry.
- The registry resolves the command using explicit namespaces
wormhole:quote), the active protocoluse 1inch), or fuzzy matching (fuzzy matching is not enabled currently). - The execution context provides wallet state, per-protocol cache, and command history.
- Protocol plugins call API routes and SDK/HTTP clients to fetch quotes or build transactions.
- Results are rendered in the terminal, with history and analytics updated.
- Terminal UI
src/components/cli.tsx,src/app/page.tsx) handles input, history, multi-tab state, and wallet connection. - Command registry
src/core/command-registry.ts) resolves core commands, protocol commands, and aliases; it also powers fuzzy search. - Execution context
src/core/types.ts) tracks the active protocol, per-protocol state, wallet status, and history. - Core commands include
help,use,exit,history,wallet,whoami,balance,price, andchart(seesrc/core/commands.ts).
- Each protocol lives in
src/plugins/[protocol]/withindex.ts,commands.ts, andtypes.ts. - The plugin loader
src/plugins/plugin-loader.ts) initializes plugins and registers their commands. - The template in
src/plugins/_template/README.mddocuments the standard plugin layout and bootstrapping flow.
- API routes live under
src/app/api/[protocol]/[action]/route.ts. - Standard response format:
{ success: true, data }or{ success: false, error }. - Security hardening includes API-key auth, rate limiting, and an RPC method allowlist (see
AUDIT_IMPLEMENTATION_SUMMARY.mdandSECURITY_FIXES.md).
- Wormhole
src/lib/wormhole.ts,src/lib/wormhole-sdk.ts) - Stargate
src/lib/stargate.ts) - LiFi
src/lib/lifi.ts) - Uniswap v4
src/plugins/uniswap-v4/lib/) - Faucet services
src/lib/faucet/) - Coin data
src/lib/coingecko-client.ts,src/plugins/coinpaprika/api/client.ts)
- 1inch (DEX aggregator): swap/quote/chain/token support, gas endpoint, charts, and price data; RPC proxy is read-only and allowlisted.
- LiFi (bridge aggregator): quote → step transaction → execute → status via a dedicated proxy app; commands wrap the proxy endpoints.
- Wormhole (bridge): multi-route discovery, quote caching, and bridge execution with client-side signing.
- Stargate (bridge): quote returns approve + bridge steps; CLI executes transactions in order; stablecoin focus.
- Faucet (testnet distribution): request/status/history with database-backed rate limiting and audit logging.
- CoinPaprika (market data):
cprice,coinsearch, andcchartfor 56k+ assets and OHLCV charts. - Uniswap v4 (WIP): swap command builds Universal Router calldata; signing happens client-side.
- Aave v3 (planned): markets/reserves/rates/position/health plus supply/borrow flows using contract helpers and GraphQL.
- Swap/bridge tracking writes transaction and volume data to Prisma models and exposes
/api/analytics/*endpoints. - Charts support built-in analytics panels and CoinPaprika OHLCV via
cchartorchart --protocol coinpaprika. - Price routing supports
price --protocolwith automatic fallback from 1inch to CoinPaprika.
- In-memory state lives inside the execution context per terminal tab.
- Persistent state uses PostgreSQL via Prisma for the faucet and analytics tracking systems.
- Deployment details and migration steps live in
prisma/README.md,FAUCET_SETUP.md, andFAUCET_SUMMARY.md.
- Audit fixes applied: API auth + rate limits, RPC allowlist, production log redaction, and safer state updates.
- Known follow-ups: analytics endpoint protection and distributed rate limiting are documented for continued hardening.
- Plugin execution remains client-side today; moving command execution server-side is a documented future milestone.
ARCHITECTURE.md— full system architecture referenceTOOLING.md— contributor-focused tooling mapREADME.md— project overview, setup, and usageFIBERED-MONOID-SPEC.md— formal command model (covered next page)src/app/api/README.md— API route conventionssrc/plugins/README.md— plugin development guidesrc/plugins/_template/README.md— plugin template walkthroughsrc/plugins/wormhole/ARCHITECTURE.md— Wormhole integration detailssrc/plugins/stargate/ARCHITECTURE.md— Stargate integration detailssrc/plugins/lifi/ARCHITECTURE.md— LiFi integration detailssrc/plugins/faucet/ARCHITECTURE.md— Faucet integration detailssrc/plugins/uniswap-v4/architecture.md— Uniswap v4 plugin plansrc/plugins/aave-v3/ARCHITECTURE.md— Aave v3 plugin planCOINPAPRIKA_IMPLEMENTATION.md— CoinPaprika integration detailsCHART_INTEGRATION.md— OHLCV chart supportPRICE_COMMAND_UPDATE.md— price routing changesSWAP_TRACKING_IMPLEMENTATION.md— analytics and tracking systemFAUCET_SETUP.md— faucet setup guideFAUCET_SUMMARY.md— faucet implementation summaryprisma/README.md— database deployment guideproduction-audit-report.md— audit findingsAUDIT_IMPLEMENTATION_SUMMARY.md— applied fixesSECURITY_FIXES.md— security hardening notesCHANGELOG.md— version history and planned work