Coinbase operations toolkit: cb for trade planning and order lifecycle management, hdb for ledger ingestion/reconciliation and tax-facing analytics, hdb-portal for local read-only web analysis, plus shared TypeScript modules for authenticated API access and reusable CLI infrastructure.
cb: trading operations CLI (quotes, sizing, plan workflows, order lifecycle) (src/apps/cb)hdb: accounting/data CLI (imports, snapshots, lots, reconciliation, exports) (src/apps/hdb)hdb-portal: local web portal forhdbanalysis (src/apps/hdb-portal)shared: reusable Coinbase/auth/env/log/schema modules (src/shared)helper-env-check: env/credential validation binary (src/shared/bin/validate-env.ts)
Use explicit relative imports with .js specifiers under NodeNext.
- Node.js
>=20 - npm
npm install
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/helper"
cp .env.example "${XDG_CONFIG_HOME:-$HOME/.config}/helper/.env"Set this value in the env file:
HELPER_COINBASE_CREDENTIALS_PATH=/absolute/path/to/coinbase-credentials.json
HELPER_ALLOW_LIVE_EXCHANGE=trueCreate Coinbase App API credentials using: https://docs.cdp.coinbase.com/coinbase-app/authentication-authorization/api-key-authentication
When creating the key in CDP, select the ECDSA signature algorithm (ES256).
Build and link binaries locally:
npm run build
npm linkcb --helphdb --helphelper-env-check --help
From source:
npm run dev -- --help(runscb)npm run dev:hdb -- --help(runshdb)
cb CLI READMEsrc/apps/hdb/README.mdsrc/apps/hdb/README.postgres.mdsrc/apps/hdb-portal/README.mdsrc/shared/README.mdCONTRIBUTING.md
npm run lint
npm run typecheck
npm run test
npm run buildIntegration smoke checks (readonly mode + sanitized env):
npm run test:integration:smokeOverride readonly env file path when needed:
INTEGRATION_ENV_FILE=/absolute/path/to/.env.readonly npm run test:integration:smokeApache-2.0