CLI for the Brex APIs at https://platform.brexapis.com.
This project was cloned from mercury-cli and then reworked to use Brex endpoints from:
- Authentication: https://developer.brex.com/openapi/authentication
- Transactions: https://developer.brex.com/openapi/transactions
- Team: https://developer.brex.com/openapi/team
- Payments: https://developer.brex.com/openapi/payments
- Webhooks: https://developer.brex.com/openapi/webhooks
bun install
bun run buildRun locally:
bun ./sources/main.ts --helpStore an API access token locally:
brex login --token <ACCESS_TOKEN>
# or
cat token.txt | brex login --token-stdinToken/config location:
~/.brex/token~/.brex/config.json
Check status:
brex statusbrex accounts list --type all
brex accounts list --type cash --cursor <cursor>
brex accounts get <account-id> --type cashbrex transactions <account-id> --type cash --limit 50
brex transactions <account-id> --type card --cursor <cursor>
brex transactions get <account-id> <transaction-id> --type cashbrex transfer --from <cash-account-id> --to <counterparty-id> --amount 125.50 --idempotency-key <key>
brex transfer get <transfer-id>
brex transfer list --status PROCESSING --limit 20brex recipients list --limit 50
brex recipients add --name "Vendor A" --account 123456789 --routing 021000021 --account-type CHECKING
brex recipients get <counterparty-id>
brex recipients delete <counterparty-id>brex cards list --user-id <user-id>
brex cards get <card-id>
brex users list --cursor <cursor>
brex users get <user-id>
brex organization# Primary card account
brex statements --scope primary
brex statements get <statement-id> --scope primary
# Additional card account
brex statements --scope additional --account-id <card-account-id>
brex statements get <statement-id> --scope additional --account-id <card-account-id>brex webhooks list
brex webhooks create --url https://example.com/webhooks/brex --events PAYMENT_COMPLETED,TRANSFER_COMPLETED
brex webhooks get <webhook-id>
brex webhooks update <webhook-id> --status ACTIVE
brex webhooks delete <webhook-id>
brex events list --event-type PAYMENT_COMPLETED --limit 25
brex events get <event-id>brex transactions sendis intentionally not used for outbound payments. Usebrex transfer.brex categoriesis currently a placeholder because there is no direct categories endpoint wired in this CLI.
This is an unofficial CLI. Verify scopes, permissions, and request payload requirements in Brex docs before production use.