Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 101 additions & 1 deletion GENERATED_README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# IPB CLI Command Reference

> This documentation is auto-generated from the CLI command definitions.
> Last generated: 2026-03-24T17:50:02.946Z
> Last generated: 2026-08-05T10:41:08.758Z

## Table of Contents

Expand Down Expand Up @@ -29,6 +29,7 @@
- [pay](#pay)
- [transactions](#transactions-aliases-tx)
- [beneficiaries](#beneficiaries)
- [mau](#mau)
- [new](#new)
- [completion](#completion)
- [docs](#docs)
Expand All @@ -51,6 +52,10 @@ Configure authentication credentials. Set API keys, client credentials, and card
- `--card-key <cardKey>` (required) - Set your card key for the Investec API
- `--openai-key <openaiKey>` (required) - Set your OpenAI API key for AI code generation
- `--sandbox-key <sandboxKey>` (required) - Set your sandbox key for AI generation
- `--mau-api-key <mauApiKey>` (required) - Set Mauritius (MAU) API key
- `--mau-client-id <mauClientId>` (required) - Set Mauritius (MAU) client ID
- `--mau-client-secret <mauClientSecret>` (required) - Set Mauritius (MAU) client secret
- `--mau-host <mauHost>` (required) - Set Mauritius (MAU) API host

**Subcommands:**

Expand Down Expand Up @@ -361,6 +366,101 @@ List all beneficiaries. Shows all registered beneficiaries linked to your Invest
**Usage:** `ipb beneficiaries`


## mau

Mauritius (MAU) Open Banking commands. Uses separate MAU credentials (mauClientId, mauClientSecret, mauApiKey).

**Usage:** `ipb mau`

**Subcommands:**

### accounts

List Mauritius Investec accounts. Shows account IDs, numbers, currencies, and profile names.

**Usage:** `ipb mau accounts`

**Options:**

- `--mau-api-key <mauApiKey>` (required) - API key for the Investec Mauritius (MAU) API
- `--mau-client-id <mauClientId>` (required) - Client ID for the Investec Mauritius (MAU) API
- `--mau-client-secret <mauClientSecret>` (required) - Client secret for the Investec Mauritius (MAU) API
- `--mau-host <mauHost>` (required) - Custom host for the Investec Mauritius (MAU) API

### balances

Get Mauritius account balance information including available balance and encumbrances.

**Usage:** `ipb mau balances <accountId>`

**Arguments:**

- `<accountId>` (required) - Numeric Mauritius account ID

**Options:**

- `--mau-api-key <mauApiKey>` (required) - API key for the Investec Mauritius (MAU) API
- `--mau-client-id <mauClientId>` (required) - Client ID for the Investec Mauritius (MAU) API
- `--mau-client-secret <mauClientSecret>` (required) - Client secret for the Investec Mauritius (MAU) API
- `--mau-host <mauHost>` (required) - Custom host for the Investec Mauritius (MAU) API

### transactions

Get Mauritius account transactions for a required date range (--from / --to, YYYY-MM-DD).

**Usage:** `ipb mau transactions <accountId>`

**Arguments:**

- `<accountId>` (required) - Numeric Mauritius account ID

**Options:**

- `--mau-api-key <mauApiKey>` (required) - API key for the Investec Mauritius (MAU) API
- `--mau-client-id <mauClientId>` (required) - Client ID for the Investec Mauritius (MAU) API
- `--mau-client-secret <mauClientSecret>` (required) - Client secret for the Investec Mauritius (MAU) API
- `--mau-host <mauHost>` (required) - Custom host for the Investec Mauritius (MAU) API
- `--from <fromDate>` (required) - Start date (YYYY-MM-DD)
- `--to <toDate>` (required) - End date (YYYY-MM-DD)

### documents

List available Mauritius account documents (e.g. statements) for a date range.

**Usage:** `ipb mau documents <accountId>`

**Arguments:**

- `<accountId>` (required) - Numeric Mauritius account ID

**Options:**

- `--mau-api-key <mauApiKey>` (required) - API key for the Investec Mauritius (MAU) API
- `--mau-client-id <mauClientId>` (required) - Client ID for the Investec Mauritius (MAU) API
- `--mau-client-secret <mauClientSecret>` (required) - Client secret for the Investec Mauritius (MAU) API
- `--mau-host <mauHost>` (required) - Custom host for the Investec Mauritius (MAU) API
- `--from <fromDate>` (required) - Start date (YYYY-MM-DD)
- `--to <toDate>` (required) - End date (YYYY-MM-DD)

### statement

Download a Mauritius account statement PDF for a document date. Defaults to statement-<accountId>-<date>.pdf.

**Usage:** `ipb mau statement <accountId> <documentDate>`

**Arguments:**

- `<accountId>` (required) - Numeric Mauritius account ID
- `<documentDate>` (required) - Document date (YYYY-MM-DD)

**Options:**

- `--mau-api-key <mauApiKey>` (required) - API key for the Investec Mauritius (MAU) API
- `--mau-client-id <mauClientId>` (required) - Client ID for the Investec Mauritius (MAU) API
- `--mau-client-secret <mauClientSecret>` (required) - Client secret for the Investec Mauritius (MAU) API
- `--mau-host <mauHost>` (required) - Custom host for the Investec Mauritius (MAU) API


## new

Create a new project with scaffolding. Generates a new project directory with template files and directory structure for card code development.
Expand Down
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ ipb config --client-id <id> --client-secret <secret> --api-key <key>
# Optional card key / host — see ipb config --help
ipb config --card-key <card-key>

# Mauritius (MAU) credentials (separate from ZA PB/Card)
ipb config --mau-client-id <id> --mau-client-secret <secret> --mau-api-key <key>

# Named profiles
ipb config --profile production --client-id <id> --client-secret <secret> --api-key <key>
ipb config --profile staging --client-id <id> --client-secret <secret> --api-key <key>
Expand All @@ -190,6 +193,19 @@ Use a profile on any command:
```sh
ipb cards --profile staging
ipb deploy --profile production -f main.js -c <card-key>
ipb mau accounts --profile production
```

### How to use Mauritius (MAU) Open Banking

MAU uses the same OAuth shape as ZA APIs but **separate credentials** (`mauClientId`, `mauClientSecret`, `mauApiKey`, optional `mauHost`).

```sh
ipb mau accounts
ipb mau balances 5331
ipb mau transactions 5331 --from 2024-01-01 --to 2024-01-31
ipb mau documents 5331 --from 2025-01-01 --to 2025-01-31
ipb mau statement 5331 2025-01-31 --output statement.pdf
```

Edit in your editor (`EDITOR`, default `nano` / `notepad.exe`):
Expand Down Expand Up @@ -352,7 +368,8 @@ Information-oriented lookup. Authoritative flags: `ipb <command> --help` or [GEN
| `env` / `upload-env` | Card environment variables |
| `logs` (`log`) | Execution logs |
| `enable` / `disable` | Toggle code on a card |
| `accounts` (`acc`) / `balances` (`bal`) / `transactions` (`tx`) | Account data |
| `accounts` (`acc`) / `balances` (`bal`) / `transactions` (`tx`) | Account data (ZA PB) |
| `mau` | Mauritius Open Banking (`accounts`, `balances`, `transactions`, `documents`, `statement`) |
| `beneficiaries` / `transfer` / `pay` | Beneficiaries and payments |
| `countries` / `currencies` / `merchants` | Reference data |
| `completion` / `docs` / `env-list` | Shell completion, docs dump, env catalogue |
Expand All @@ -362,6 +379,7 @@ These commands are **disabled** and return an error: `ai`, `bank`, `register`, `
### Shared options (most API commands)

- Auth: `--client-id`, `--client-secret`, `--api-key`, `--host`, `--credentials-file`, `--profile`
- MAU auth: `--mau-client-id`, `--mau-client-secret`, `--mau-api-key`, `--mau-host`
- Output: `--json`, `--yaml`, `--output <file>`, `-v` / `--verbose`
- Spinner: `--no-spinner` (preferred); `-s` / `--spinner` is deprecated
- Destructive: `--yes` where supported
Expand All @@ -378,6 +396,7 @@ ipb env-list --json
Common categories:

- **API:** `INVESTEC_HOST`, `INVESTEC_CLIENT_ID`, `INVESTEC_CLIENT_SECRET`, `INVESTEC_API_KEY`, `INVESTEC_CARD_KEY`
- **MAU API:** `INVESTEC_MAU_HOST`, `INVESTEC_MAU_CLIENT_ID`, `INVESTEC_MAU_CLIENT_SECRET`, `INVESTEC_MAU_API_KEY`
- **Behaviour:** `DEBUG`, `REJECT_UNAUTHORIZED`, `NO_COLOR`, `FORCE_COLOR`, `EDITOR`, `PAGER`, `TMPDIR`, `IPB_NO_UPDATE_CHECK`

### Exit codes
Expand Down Expand Up @@ -409,6 +428,8 @@ Messages look like `Error (E####): …`.
| `E4010` | File not found |
| `E4012` | Missing account ID |
| `E4014` | Rate limit exceeded |
| `E4019` | Unsupported operation |
| `E4020` | Missing or invalid date range (MAU `--from` / `--to`) |
| `E5001` | Deploy / API operation failed |

Quick fixes: missing card key → `ipb cards` then `-c`; bad auth → `ipb config`; missing `.env.<env>` → create the file or change `-e`.
Expand Down
Binary file modified assets/accounts.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/balances.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/beneficiaries.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cards.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/deploy.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/env.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/fetch.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/logs.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/new.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/pay.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/publish.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/published.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/run.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/simulate.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/toggle.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/transactions.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/transfer.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/upload-env.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/upload.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 24 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "investec-ipb",
"version": "0.9.3",
"version": "0.10.0",
"main": "bin/index.js",
"bin": {
"ipb": "./bin/index.js"
Expand Down Expand Up @@ -65,13 +65,14 @@
"cli-table3": "^0.6.5",
"commander": "^14.0.2",
"dotenv": "^17.2.3",
"investec-card-api": "^0.2.1",
"investec-pb-api": "^0.3.10",
"investec-card-api": "^0.2.3",
"investec-mau-api": "^0.1.0",
"investec-pb-api": "^0.3.12",
"js-yaml": "^4.3.1",
"node-fetch": "^3.3.2",
"openai": "^4.104.0",
"ora": "^9.0.0",
"programmable-card-code-emulator": "^2.0.0",
"programmable-card-code-emulator": "^2.0.1",
"zod": "^3.25.76"
},
"devDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions scripts/tapes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@ if ! ipb --version >/dev/null 2>&1; then
fi

tapes=(
accounts
balances
beneficiaries
cards
deploy
env
fetch
logs
new
pay
publish
published
run
simulate
toggle
upload-env
upload
accounts
beneficiaries
balances
transactions
pay
transfer
upload-env
upload
)

for name in "${tapes[@]}"; do
Expand Down
Loading