release: 0.9.0 — fetch, pay/transfer amounts, tapes - #39
Conversation
* Updated docs to include the .env local environmental variables * Added options for credentials to all commands * Updated the credential properties casing to be more consistent * Updated missing credential param casing * Added inline credential details to readme * added credentials-file option * Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Added details on using custom .credentials file * Added reference functions * Corrected copilot suggestions * updated tapes and added script to generate them * Added reference functions to README * Added the online simulate command * Added tape for simulate and corrected readme * Corrected response from simulator as docs are incorrect * Refactored api and reduced duplicate code * fixed disable command output and recreated gifs * Added additional error handling per command * New command (#29) * Added the basics of a new command * Improved deploy env handling * Updated package version * Updated new command * Updated output for new command and added code review improvements * cleaned up error handling * Added the generate command * Added additional improvements to the generate code * Updated command to ai instead of gen * Added openaiKey to credentials and bumped version * Added register and login commands * updated tapes and corrected login and register endpoints * updated version * Improved readme details * Added related projects * Updated formatting and included the new gifs * bumped version * updated assets and moved instructions into the ai function for now * chore pr review changes --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Allowed unsigned certs for corporate networks * fixed for corporate * added additional tooling to the bank command * Added transfer, pay and beneficiaries commands * Added new table views and added beneficiaries and transfers to bank command * Updated Readme with new commands * cleaned up error messages * refactoring * refactoring * small improvements * Added workflows and mock pb * bumped version * updated tapes * Added inquirer * bumped version * corrected tests * moved rejectAuthorized to ENV * Update .github/copilot-instructions.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* updated errors with error codes * made improvements to allow the disabling of the spinner animation * implemented changes to improve the codebase and upgrade packages * improved file reading and writing * updated jsdocs * removed unused code * improved the cardKey handling * removed duplicate logic * added error codes to the readme * Cleaned up error handling * added tests and other small improvements * added testing to readme * improved command help text * improved the output formats * added yaml outtput * improved error handling on required values * added file validation * further improvements * allowed normalised filenames * piping * added history * added autocomplete * added unix error codes * added command categories * Added improved command descriptions * added validation * added aliases * added standard confirmations for all destructive commands * added config profiles and atomic writes * Added rate limiting support * added support for large file uploads * corrected tests after the large upload changes * added generate docs command * updated the dependencies * removed unused md files * Added initial improvements identified from CLIG * added suport for temp dir * added the ability to customize the editor used * improved handling of terminals not supporting emojis * improved the security posture on keys * corrected lit errors * improved the AI instruction sets * added an example CI_CD file * added coderabbit improvements * copilot suggestions * coderabbit improvements * further improvements from coderabbit * corrected errors * Improve spinner lifecycle and CLI error handling. Ensure spinners always clear cleanly across commands, normalize Investec API failures into CliError messages, and tighten table rendering/verbose behavior for cleaner terminal output. Made-with: Cursor * Add phased CLI improvement plan document. Capture prioritized workstreams for spinner/error hardening, command refactoring, utils modularization, and integration testing. Made-with: Cursor * Add utility baseline tests and PB auth error normalization. Cover debug/spinner/error helper behavior in unit tests and normalize Programmable Banking auth failures to consistent CliError output. Made-with: Cursor * Add shared spinner wrapper and migrate core list commands. Introduce withSpinner() for standardized spinner lifecycle handling and refactor accounts/cards commands to use it for cleaner control flow and guaranteed cleanup. Made-with: Cursor * Migrate balances and transactions to shared spinner wrapper. Use withSpinner() for consistent spinner lifecycle handling and cleaner command flow in balance and transaction fetch commands. Made-with: Cursor * Migrate remaining list commands to withSpinner wrapper. Apply shared spinner lifecycle handling to beneficiaries, countries, currencies, and merchants commands for consistent cleanup and reduced boilerplate. Made-with: Cursor * Migrate write commands to withSpinner lifecycle wrapper. Apply shared spinner handling to fetch/logs/upload/env/published/publish commands and tighten guarded writes for strict type safety. Made-with: Cursor * Migrate remaining spinner-heavy commands to withSpinner. Refactor deploy, disable, toggle, run, and ai commands to use shared spinner lifecycle management for consistent cleanup and simpler control flow. Made-with: Cursor * Add outcome-aware spinner helper for command status flows. Introduce withSpinnerOutcome() and migrate transfer/upload-env to shared success-fail spinner handling instead of manual start/succeed/fail blocks. Made-with: Cursor * Add shared list-output runner and migrate accounts/cards. Introduce runListCommand() to centralize empty/list output behavior and refactor accounts/cards commands plus tests to use the shared helper. Made-with: Cursor * Migrate remaining list commands to shared list runner. Refactor beneficiaries, countries, currencies, and merchants commands to use runListCommand for consistent list output behavior and reduced duplication. Made-with: Cursor * Add shared write runner and migrate fetch/logs commands. Introduce runWriteCommand() for common file write progress/success output and refactor fetch/logs plus tests to use the new abstraction. Made-with: Cursor * Migrate env and published commands to shared write runner. Use runWriteCommand() for consistent write progress and final size output when saving env variables and published code. Made-with: Cursor * Add shared read-upload runner and migrate upload/publish. Introduce runReadUploadCommand() to unify read-and-upload spinner flow and refactor upload and publish commands plus tests to use the helper. Made-with: Cursor * Migrate balances and transactions to shared list runner. Use runListCommand() for transaction and balance output flow and update tests to assert list-runner integration. Made-with: Cursor * Standardize env-list output and expand shared-runner tests. Route env-list structured output through runListCommand and add direct utility coverage for list/read-upload/outcome runners plus command coverage for env-list. Made-with: Cursor * Begin Phase 3 utils extraction with runtime and API error modules. Move runtime flag helpers and Investec error normalization into dedicated utility modules while preserving existing imports through utils.ts re-exports. Made-with: Cursor * Extract terminal, spinner, output, and runner helpers from utils. Split terminal detection, spinner lifecycle, output formatting, and command runner utilities into dedicated modules while keeping utils.ts as a compatibility re-export surface. Made-with: Cursor * Extract API initialization and credential validation utilities. Move Card/PB API initialization and credential validation logic into dedicated modules and keep utils.ts as a compatibility export surface. Made-with: Cursor * Extract command history utilities into dedicated module. Move history path/read/log logic and entry typing into utils/history.ts while preserving existing imports through utils.ts re-exports. Made-with: Cursor * Extract update-check and version notification utilities. Move npm version lookup, update cache handling, and notification rendering into utils/update.ts while preserving public access via utils.ts re-exports. Made-with: Cursor * Extract credentials and profile storage into dedicated module. Move credentials IO, atomic writes, and profile management into utils/credentials-store.ts and update history/update modules to import atomic writes directly from the new module. Made-with: Cursor * Extract retry and rate-limit handling into dedicated module. Move rate-limit detection, formatting, and exponential-backoff retry logic into utils/retry.ts while preserving existing imports through utils.ts re-exports. Made-with: Cursor * Extract file path and permission validation utilities. Move path normalization, extension validation, and read/write permission checks into utils/file-validation.ts while preserving existing imports via utils.ts re-exports. Made-with: Cursor * Extract core input validation helpers into dedicated module. Move account and amount validation logic into utils/input-validation.ts while preserving existing usage via utils.ts re-exports. Made-with: Cursor * Extract security and CLI error orchestration utilities. Move environment secret warning logic and CLI error handling/context wrappers into dedicated modules while keeping utils.ts as the compatibility export surface. Made-with: Cursor * Extract interaction and editor helper utilities. Move paging, temp/module path helpers, editor launching, and destructive-operation confirmation into utils/interaction.ts while keeping utils.ts compatibility re-exports. Made-with: Cursor * Add --no-spinner compatibility and deprecate legacy spinner flag. Support --no-spinner by normalizing it to existing spinner-disable behavior, emit a deprecation warning for --spinner/-s, and include the new flag in generated command docs/completion metadata. Made-with: Cursor * Harden spinner flag compatibility with targeted normalization tests. Extract spinner flag normalization into a dedicated utility for testability and add tests covering --no-spinner mapping plus deprecation detection for legacy --spinner/-s usage. Made-with: Cursor * Add integration safety-net tests for core command flows. Introduce command-level integration coverage for accounts/cards piped output and deploy/fetch spinner cleanup on errors to catch regressions in terminal-mode behavior. Made-with: Cursor * Apply lint-driven cleanup and stabilize recent refactor outputs. Run project-wide Biome fixes, resolve remaining lint blockers in publish/upload/output helpers, and align formatting/import order updates across affected command, utility, config, and template files. Made-with: Cursor * Expand utility test coverage for extracted modules. Add focused tests for security, file validation, interaction, and retry utilities to improve regression detection after the utils modularization work. Made-with: Cursor * Harden credentials loading, output safety, and history redaction. Fix JSON credentials-file import handling for ESM and relative paths, tighten write-permission validation behavior, route update notices to stderr, and add focused regression tests for credentials loading, file permissions, update output, and history sanitization. Made-with: Cursor * Improve CI stability and extend destructive command test coverage. Suppress update notifications for machine-readable output modes, replace environment-specific file paths in utility tests with portable temp files, and add focused pay/transfer command tests for confirmation and prompt-driven flows. Made-with: Cursor * Harden release automation and add snap distribution pipeline. This improves CI/release safety with tighter workflow permissions and concurrency, adds packaged binary smoke testing, and automates Snap build/publish with documented credential setup for GitHub Actions. Made-with: Cursor * Apply lint-driven formatting cleanup across utils and tests. This normalizes import ordering and line wrapping in utility and test modules to keep style output consistent after recent refactors. Made-with: Cursor * Expand command coverage for run and upload-env flows. Add focused tests for run command environment parsing and missing-env handling, plus upload-env success/error scenarios and default card key behavior to reduce regression risk in high-impact command paths. Made-with: Cursor * Broaden command test coverage across reference data, writes, and tooling. Add tests for simulate, register, config/profile flows, enable/disable, env/published/logs output paths, countries/currencies/merchants/beneficiaries, new project scaffolding, and docs generation to reduce regression risk in high-impact CLI paths. Made-with: Cursor * Fix CI TypeScript errors and add Husky pre-push verification. Harden loadCredentialsFile JSON import typing for tsc, use NodeJS.ErrnoException for write permission checks, add husky with pre-push running verify:ci, and wire prepare script so installs configure git hooks. Made-with: Cursor * Load credentials JSON without dynamic import; add PERMISSION_DENIED error code. Read credentials files with readFile and JSON.parse to avoid Vitest/Vite dynamic-import URL warnings, support optional default-wrapped JSON, and map EACCES/EPERM to E4017 with correct exit handling and CLI tips. Made-with: Cursor * chore: align Node.js to 22+ (engines, CI, docs) - Set engines.node to >=22.0.0 in package.json and lockfile - Run CI and release workflows on Node 22.x - Update README, .cursorrules, and Copilot instructions Made-with: Cursor * test: Phase 1 output and Investec error coverage - Add printTable/formatOutput tests (narrow terminal, NO_COLOR, piped JSON) - Add normalizeInvestecError unit tests at utils/investec-errors - Extend resolveSpinnerState cases (TTY on, DEBUG disables spinner) - Biome import order fixes in existing command tests Made-with: Cursor * Fix pkg smoke test by bundling cli-table3 without createRequire. createRequire(import.meta.url) fails in the esbuild CJS bundle inside pkg because import.meta.url is undefined there, which broke CI packaging-smoke when running --version. Made-with: Cursor * Target Node 24 for standalone binaries and esbuild bundle. pkg scripts, package.json pkg.targets, pkg.config.json, and release/snap/CI packaging workflows now use node24-* targets; esbuild uses node24. Release and snap jobs use Node 24.x when building binaries. Made-with: Cursor * Require Node 24 and drop Node 22 from CI. CI matrix and npm publish use Node 24.x only; engines and @types/node align with >=24. Documentation and Cursor rules updated accordingly. Made-with: Cursor * Use snap base core24 for the ipb snap. Moves the snap runtime from Ubuntu 22.04 (core22) to Ubuntu 24.04 (core24). Made-with: Cursor * refactor: shared spinner lifecycle for pay/simulate/auth flows - pay: isStdoutPiped-aware title, withSpinner around payMultiple + withRetry - simulate: addApiCredentialOptions, SimulateCommandOptions, withSpinner for cloud execute - register/login/bank: addSpinnerVerboseOptions and withSpinner for HTTP calls - login: getSafeText for token saved message - test: integration-safety mocks terminal isStdoutPiped; piped/TTY and spinner cases - test: pay stubs isStdoutPiped and createSpinner for stable output Made-with: Cursor * refactor: run command uses resolveSpinnerState and addSpinnerVerboseOptions - Respect --spinner/--no-spinner, verbose, and piped stdout for local emulator - Skip title box when stdout is piped; getSafeText on spinner labels - Shell completion lists --spinner for run/r Made-with: Cursor * refactor: ai and new commands use shared spinner lifecycle - ai: resolveSpinnerState, withSpinner around generateCode and file writes - ai: skip title when piped; static utils imports; getSafeText on success lines - new: addSpinnerVerboseOptions, withSpinner for rm+cp when forcing overwrite - index: wrap ai/new with addSpinnerVerboseOptions; completion adds --spinner - test: new stubs isStdoutPiped, createSpinner, withSpinner Made-with: Cursor * refactor: config and docs use shared spinner lifecycle - config: runWithConfigSpinner for deleteProfile, writeProfile, writeCredentialsFile - docs: addSpinnerVerboseOptions, piped-aware title, withSpinner for gen+write - docsCommand accepts DocsCommandOptions (verbose, spinner) - test: config/docs utils mocks for isStdoutPiped, createSpinner, withSpinner Made-with: Cursor * fix(completion): include docs command in bash/zsh generators - Add docs to completion command list (was missing) - Add docs-specific --output hint (globals still append shared flags) Made-with: Cursor * feat(completion): bash tab completion for config profile subcommands - After config|cfg, complete profile, edit, and credential/global flags - After "config profile", complete list, ls, set, show, delete, rm - Zsh script unchanged (still offers config flags only) Made-with: Cursor * feat(cli): offline tapes, update-skip env, and Phase A tests - Add IPB_MOCK_APIS so mock PB/Card APIs work without DEBUG verbose output - Add IPB_NO_UPDATE_CHECK to skip npm version checks (tapes and offline runs) - Wire npm run tapes to fixture creds, strict shell, mock APIs, no update fetch - Document env vars in env list; export isMockApisEnabled and isUpdateCheckDisabled Tests: credentials file ESM-style default unwrap; update banner gated for piped/json/yaml/--output; stderr-only showUpdateNotification; mock/spinner cases. Refresh VHS-generated assets under assets/ for the new tape environment. Made-with: Cursor * feat(cli): disable AI/auth commands; unify config profile helpers - Hide ai, bank, register, login; they throw E4018 (COMMAND_DISABLED) for scripts - Add config-subcommands module for profile list/set/show/delete and config edit - Wire ipb config profile * and config edit to shared helpers; set.ts uses same paths - Drop generateCommand/bankCommand from cmds barrel export; update completion and help - Document OPENAI_API_KEY/SANDBOX_KEY as reserved while AI/login are disabled Tests: config-subcommands suite; extend config tests; add logs/published tests; remove register command tests. Regenerate GENERATED_README.md. Made-with: Cursor * docs: align README and generated docs with disabled AI/auth commands - README: replace AI/Bank how-tos with disabled-command note; fix TOC; refresh testing/env sections - Remove stale TEST_SUGGESTIONS.md; add IMPROVEMENT_PLAN maintenance note - Skip hidden commands in docs generator (isCommandHidden); test coverage - Regenerate GENERATED_README.md via filtered command list Made-with: Cursor * docs: replace improvement plan with current status summary Archive original phases as completed; add summary table, definition-of-done notes, and optional follow-ups instead of an outdated task backlog. Made-with: Cursor * revert(tapes): restore DEBUG-only script; drop fixtures; refresh assets - scripts/tapes.sh: export DEBUG=true again (no fixtures, IPB_MOCK_APIS, or strict bash) - Remove tapes/fixtures credentials; adjust IPB_MOCK_APIS env-list wording - Update VHS-generated GIFs under assets/ after re-recording with system ipb Made-with: Cursor * chore(scripts): remove empty placeholder scripts Drop unused zero-byte advanced-fix-tests, fix-spinner-mock, fix-tests, test-accounts, and verify-process-emitter files. Made-with: Cursor * docs(readme): remove AI, register/login, and sandbox key references Made-with: Cursor
- Add src/runtime-credentials.ts for credentialLocation, credentials, printTitleBox, and optionCredentials (cmds and api no longer import index) - Re-export from index.ts for backward compatibility - Point function-calls and utils/api at runtime-credentials - Remove dead _determineExitCode from utils.ts; drop duplicate configureChalk call at utils module load - Update Vitest mocks to stub runtime-credentials instead of index - Document follow-up phases in IMPROVEMENT_PLAN.md Made-with: Cursor
- Add ERROR_CODES.UNSUPPORTED_OPERATION; fetch uses it and INVESTEC_API_ERROR - credentials-store: throwCredentialPathError for async read/load (ENOENT, permission, invalid JSON) - determineExitCode: EXIT_CODE_BY_CLI_CODE for all ERROR_CODES so E4016 is not treated as HTTP 401; export determineExitCode from utils barrel - completion: CliError(INVALID_INPUT) + determineExitCode for exit status - Tests: cli-errors, credentials-store edge cases, fetch code assertions - Commands: static isStdoutPiped/readStdin imports (no dynamic utils import) - IMPROVEMENT_PLAN: mark phases 2–3 done Made-with: Cursor
- Mock node-fetch for register/login; OpenAI client for bank/ai - Assert credential write and error codes on failure paths - Mark IMPROVEMENT_PLAN phase 4 done (shared mock harness still optional) Made-with: Cursor
- Extract shell completion generators to src/completion.ts; index imports generateCompletionScript - withCommandContext: generic tuple/return typing (no explicit any) - docs: CommanderCommandInternals + asCommanderInternals for _hidden/_args - security: document why INVESTEC_CLIENT_ID is omitted from secret env list; test that it is not reported as a secret - test/helpers/cli-mocks.ts: getRuntimeCredentialsMock, testCredentials, createSpinnerControlMock; migrate key tests to async vi.mock factories - test/utils/completion.test.ts for bash/zsh output and invalid shell - IMPROVEMENT_PLAN: phase 5 complete Made-with: Cursor
Move all subcommand definitions, shared credential/spinner option helpers, and disabled hidden commands into registerCliCommands(program, deps). index.ts keeps program setup, global options, help categories, parse/history, and update checks. Config edit receives default credentials path via deps. Made-with: Cursor
- Add .markdownlint.json (MD013/MD033/MD060 off for badges, HTML, tables) - Add .markdownlint-cli2.yaml with gitignore + ignore GENERATED_README.md - Add .markdownlintignore for VS Code markdownlint - Auto-fix blanks around fences/lists in README, CI_CD_EXAMPLES, DISTRIBUTION Made-with: Cursor
- lint:md / lint:md:fix use local markdownlint-cli2 - Run lint:md in npm run ci after Biome Made-with: Cursor
Provide a copyable skills/ipb guide so any agent can operate the CLI safely (setup, workflows, JSON output, disabled commands), with a Cursor symlink under .cursor/skills. Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: read CLI version from package.json and map rate limits to exit 5 Avoid release drift from a hardcoded version string, and stop treating rate-limit failures as validation errors in scripts. Co-authored-by: Cursor <cursoragent@cursor.com> * chore: bump to 0.8.4 and patch js-yaml advisory Raise js-yaml to ^4.3.1 (audit clean), update markdownlint-cli2, and refresh the lockfile. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
Make getting started easier with tutorials, how-tos, reference, and explanation sections, and document local development, version bumps, and releases for contributors. Co-authored-by: Cursor <cursoragent@cursor.com>
Fix fetch calling missing getSavedCode, coerce Commander string amounts for pay/transfer, harden tape generation (build/link/chmod + interruptible suite), refresh demo GIFs, and bump to 0.9.0. Co-authored-by: Cursor <cursoragent@cursor.com>
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 35666463 | Triggered | Generic CLI Secret | 6bef7b0 | README.md | View secret |
| 18153406 | Triggered | Generic Password | 6bef7b0 | src/errors.ts | View secret |
| 15735003 | Triggered | Generic CLI Secret | 35d9e1d | tapes/set.tape | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…40) * Updated docs to include the .env local environmental variables * Added options for credentials to all commands * Updated the credential properties casing to be more consistent * Updated missing credential param casing * Added inline credential details to readme * added credentials-file option * Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Added details on using custom .credentials file * Added reference functions * Corrected copilot suggestions * updated tapes and added script to generate them * Added reference functions to README * Added the online simulate command * Added tape for simulate and corrected readme * Corrected response from simulator as docs are incorrect * Refactored api and reduced duplicate code * fixed disable command output and recreated gifs * Added additional error handling per command * New command (#29) * Added the basics of a new command * Improved deploy env handling * Updated package version * Updated new command * Updated output for new command and added code review improvements * cleaned up error handling * release: 0.9.0 — fetch, pay/transfer amounts, tapes (#39) * Feature/ai gen (#32) * Updated docs to include the .env local environmental variables * Added options for credentials to all commands * Updated the credential properties casing to be more consistent * Updated missing credential param casing * Added inline credential details to readme * added credentials-file option * Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Added details on using custom .credentials file * Added reference functions * Corrected copilot suggestions * updated tapes and added script to generate them * Added reference functions to README * Added the online simulate command * Added tape for simulate and corrected readme * Corrected response from simulator as docs are incorrect * Refactored api and reduced duplicate code * fixed disable command output and recreated gifs * Added additional error handling per command * New command (#29) * Added the basics of a new command * Improved deploy env handling * Updated package version * Updated new command * Updated output for new command and added code review improvements * cleaned up error handling * Added the generate command * Added additional improvements to the generate code * Updated command to ai instead of gen * Added openaiKey to credentials and bumped version * Added register and login commands * updated tapes and corrected login and register endpoints * updated version * Improved readme details * Added related projects * Updated formatting and included the new gifs * bumped version * updated assets and moved instructions into the ai function for now * chore pr review changes --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * New functionality (#34) * Allowed unsigned certs for corporate networks * fixed for corporate * added additional tooling to the bank command * Added transfer, pay and beneficiaries commands * Added new table views and added beneficiaries and transfers to bank command * Updated Readme with new commands * cleaned up error messages * refactoring * refactoring * small improvements * Added workflows and mock pb * bumped version * updated tapes * Added inquirer * bumped version * corrected tests * moved rejectAuthorized to ENV * Update .github/copilot-instructions.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * tweaked styling * Updated the readme and tapes * Improvements (#35) * updated errors with error codes * made improvements to allow the disabling of the spinner animation * implemented changes to improve the codebase and upgrade packages * improved file reading and writing * updated jsdocs * removed unused code * improved the cardKey handling * removed duplicate logic * added error codes to the readme * Cleaned up error handling * added tests and other small improvements * added testing to readme * improved command help text * improved the output formats * added yaml outtput * improved error handling on required values * added file validation * further improvements * allowed normalised filenames * piping * added history * added autocomplete * added unix error codes * added command categories * Added improved command descriptions * added validation * added aliases * added standard confirmations for all destructive commands * added config profiles and atomic writes * Added rate limiting support * added support for large file uploads * corrected tests after the large upload changes * added generate docs command * updated the dependencies * removed unused md files * Added initial improvements identified from CLIG * added suport for temp dir * added the ability to customize the editor used * improved handling of terminals not supporting emojis * improved the security posture on keys * corrected lit errors * improved the AI instruction sets * added an example CI_CD file * added coderabbit improvements * copilot suggestions * coderabbit improvements * further improvements from coderabbit * corrected errors * Improve spinner lifecycle and CLI error handling. Ensure spinners always clear cleanly across commands, normalize Investec API failures into CliError messages, and tighten table rendering/verbose behavior for cleaner terminal output. Made-with: Cursor * Add phased CLI improvement plan document. Capture prioritized workstreams for spinner/error hardening, command refactoring, utils modularization, and integration testing. Made-with: Cursor * Add utility baseline tests and PB auth error normalization. Cover debug/spinner/error helper behavior in unit tests and normalize Programmable Banking auth failures to consistent CliError output. Made-with: Cursor * Add shared spinner wrapper and migrate core list commands. Introduce withSpinner() for standardized spinner lifecycle handling and refactor accounts/cards commands to use it for cleaner control flow and guaranteed cleanup. Made-with: Cursor * Migrate balances and transactions to shared spinner wrapper. Use withSpinner() for consistent spinner lifecycle handling and cleaner command flow in balance and transaction fetch commands. Made-with: Cursor * Migrate remaining list commands to withSpinner wrapper. Apply shared spinner lifecycle handling to beneficiaries, countries, currencies, and merchants commands for consistent cleanup and reduced boilerplate. Made-with: Cursor * Migrate write commands to withSpinner lifecycle wrapper. Apply shared spinner handling to fetch/logs/upload/env/published/publish commands and tighten guarded writes for strict type safety. Made-with: Cursor * Migrate remaining spinner-heavy commands to withSpinner. Refactor deploy, disable, toggle, run, and ai commands to use shared spinner lifecycle management for consistent cleanup and simpler control flow. Made-with: Cursor * Add outcome-aware spinner helper for command status flows. Introduce withSpinnerOutcome() and migrate transfer/upload-env to shared success-fail spinner handling instead of manual start/succeed/fail blocks. Made-with: Cursor * Add shared list-output runner and migrate accounts/cards. Introduce runListCommand() to centralize empty/list output behavior and refactor accounts/cards commands plus tests to use the shared helper. Made-with: Cursor * Migrate remaining list commands to shared list runner. Refactor beneficiaries, countries, currencies, and merchants commands to use runListCommand for consistent list output behavior and reduced duplication. Made-with: Cursor * Add shared write runner and migrate fetch/logs commands. Introduce runWriteCommand() for common file write progress/success output and refactor fetch/logs plus tests to use the new abstraction. Made-with: Cursor * Migrate env and published commands to shared write runner. Use runWriteCommand() for consistent write progress and final size output when saving env variables and published code. Made-with: Cursor * Add shared read-upload runner and migrate upload/publish. Introduce runReadUploadCommand() to unify read-and-upload spinner flow and refactor upload and publish commands plus tests to use the helper. Made-with: Cursor * Migrate balances and transactions to shared list runner. Use runListCommand() for transaction and balance output flow and update tests to assert list-runner integration. Made-with: Cursor * Standardize env-list output and expand shared-runner tests. Route env-list structured output through runListCommand and add direct utility coverage for list/read-upload/outcome runners plus command coverage for env-list. Made-with: Cursor * Begin Phase 3 utils extraction with runtime and API error modules. Move runtime flag helpers and Investec error normalization into dedicated utility modules while preserving existing imports through utils.ts re-exports. Made-with: Cursor * Extract terminal, spinner, output, and runner helpers from utils. Split terminal detection, spinner lifecycle, output formatting, and command runner utilities into dedicated modules while keeping utils.ts as a compatibility re-export surface. Made-with: Cursor * Extract API initialization and credential validation utilities. Move Card/PB API initialization and credential validation logic into dedicated modules and keep utils.ts as a compatibility export surface. Made-with: Cursor * Extract command history utilities into dedicated module. Move history path/read/log logic and entry typing into utils/history.ts while preserving existing imports through utils.ts re-exports. Made-with: Cursor * Extract update-check and version notification utilities. Move npm version lookup, update cache handling, and notification rendering into utils/update.ts while preserving public access via utils.ts re-exports. Made-with: Cursor * Extract credentials and profile storage into dedicated module. Move credentials IO, atomic writes, and profile management into utils/credentials-store.ts and update history/update modules to import atomic writes directly from the new module. Made-with: Cursor * Extract retry and rate-limit handling into dedicated module. Move rate-limit detection, formatting, and exponential-backoff retry logic into utils/retry.ts while preserving existing imports through utils.ts re-exports. Made-with: Cursor * Extract file path and permission validation utilities. Move path normalization, extension validation, and read/write permission checks into utils/file-validation.ts while preserving existing imports via utils.ts re-exports. Made-with: Cursor * Extract core input validation helpers into dedicated module. Move account and amount validation logic into utils/input-validation.ts while preserving existing usage via utils.ts re-exports. Made-with: Cursor * Extract security and CLI error orchestration utilities. Move environment secret warning logic and CLI error handling/context wrappers into dedicated modules while keeping utils.ts as the compatibility export surface. Made-with: Cursor * Extract interaction and editor helper utilities. Move paging, temp/module path helpers, editor launching, and destructive-operation confirmation into utils/interaction.ts while keeping utils.ts compatibility re-exports. Made-with: Cursor * Add --no-spinner compatibility and deprecate legacy spinner flag. Support --no-spinner by normalizing it to existing spinner-disable behavior, emit a deprecation warning for --spinner/-s, and include the new flag in generated command docs/completion metadata. Made-with: Cursor * Harden spinner flag compatibility with targeted normalization tests. Extract spinner flag normalization into a dedicated utility for testability and add tests covering --no-spinner mapping plus deprecation detection for legacy --spinner/-s usage. Made-with: Cursor * Add integration safety-net tests for core command flows. Introduce command-level integration coverage for accounts/cards piped output and deploy/fetch spinner cleanup on errors to catch regressions in terminal-mode behavior. Made-with: Cursor * Apply lint-driven cleanup and stabilize recent refactor outputs. Run project-wide Biome fixes, resolve remaining lint blockers in publish/upload/output helpers, and align formatting/import order updates across affected command, utility, config, and template files. Made-with: Cursor * Expand utility test coverage for extracted modules. Add focused tests for security, file validation, interaction, and retry utilities to improve regression detection after the utils modularization work. Made-with: Cursor * Harden credentials loading, output safety, and history redaction. Fix JSON credentials-file import handling for ESM and relative paths, tighten write-permission validation behavior, route update notices to stderr, and add focused regression tests for credentials loading, file permissions, update output, and history sanitization. Made-with: Cursor * Improve CI stability and extend destructive command test coverage. Suppress update notifications for machine-readable output modes, replace environment-specific file paths in utility tests with portable temp files, and add focused pay/transfer command tests for confirmation and prompt-driven flows. Made-with: Cursor * Harden release automation and add snap distribution pipeline. This improves CI/release safety with tighter workflow permissions and concurrency, adds packaged binary smoke testing, and automates Snap build/publish with documented credential setup for GitHub Actions. Made-with: Cursor * Apply lint-driven formatting cleanup across utils and tests. This normalizes import ordering and line wrapping in utility and test modules to keep style output consistent after recent refactors. Made-with: Cursor * Expand command coverage for run and upload-env flows. Add focused tests for run command environment parsing and missing-env handling, plus upload-env success/error scenarios and default card key behavior to reduce regression risk in high-impact command paths. Made-with: Cursor * Broaden command test coverage across reference data, writes, and tooling. Add tests for simulate, register, config/profile flows, enable/disable, env/published/logs output paths, countries/currencies/merchants/beneficiaries, new project scaffolding, and docs generation to reduce regression risk in high-impact CLI paths. Made-with: Cursor * Fix CI TypeScript errors and add Husky pre-push verification. Harden loadCredentialsFile JSON import typing for tsc, use NodeJS.ErrnoException for write permission checks, add husky with pre-push running verify:ci, and wire prepare script so installs configure git hooks. Made-with: Cursor * Load credentials JSON without dynamic import; add PERMISSION_DENIED error code. Read credentials files with readFile and JSON.parse to avoid Vitest/Vite dynamic-import URL warnings, support optional default-wrapped JSON, and map EACCES/EPERM to E4017 with correct exit handling and CLI tips. Made-with: Cursor * chore: align Node.js to 22+ (engines, CI, docs) - Set engines.node to >=22.0.0 in package.json and lockfile - Run CI and release workflows on Node 22.x - Update README, .cursorrules, and Copilot instructions Made-with: Cursor * test: Phase 1 output and Investec error coverage - Add printTable/formatOutput tests (narrow terminal, NO_COLOR, piped JSON) - Add normalizeInvestecError unit tests at utils/investec-errors - Extend resolveSpinnerState cases (TTY on, DEBUG disables spinner) - Biome import order fixes in existing command tests Made-with: Cursor * Fix pkg smoke test by bundling cli-table3 without createRequire. createRequire(import.meta.url) fails in the esbuild CJS bundle inside pkg because import.meta.url is undefined there, which broke CI packaging-smoke when running --version. Made-with: Cursor * Target Node 24 for standalone binaries and esbuild bundle. pkg scripts, package.json pkg.targets, pkg.config.json, and release/snap/CI packaging workflows now use node24-* targets; esbuild uses node24. Release and snap jobs use Node 24.x when building binaries. Made-with: Cursor * Require Node 24 and drop Node 22 from CI. CI matrix and npm publish use Node 24.x only; engines and @types/node align with >=24. Documentation and Cursor rules updated accordingly. Made-with: Cursor * Use snap base core24 for the ipb snap. Moves the snap runtime from Ubuntu 22.04 (core22) to Ubuntu 24.04 (core24). Made-with: Cursor * refactor: shared spinner lifecycle for pay/simulate/auth flows - pay: isStdoutPiped-aware title, withSpinner around payMultiple + withRetry - simulate: addApiCredentialOptions, SimulateCommandOptions, withSpinner for cloud execute - register/login/bank: addSpinnerVerboseOptions and withSpinner for HTTP calls - login: getSafeText for token saved message - test: integration-safety mocks terminal isStdoutPiped; piped/TTY and spinner cases - test: pay stubs isStdoutPiped and createSpinner for stable output Made-with: Cursor * refactor: run command uses resolveSpinnerState and addSpinnerVerboseOptions - Respect --spinner/--no-spinner, verbose, and piped stdout for local emulator - Skip title box when stdout is piped; getSafeText on spinner labels - Shell completion lists --spinner for run/r Made-with: Cursor * refactor: ai and new commands use shared spinner lifecycle - ai: resolveSpinnerState, withSpinner around generateCode and file writes - ai: skip title when piped; static utils imports; getSafeText on success lines - new: addSpinnerVerboseOptions, withSpinner for rm+cp when forcing overwrite - index: wrap ai/new with addSpinnerVerboseOptions; completion adds --spinner - test: new stubs isStdoutPiped, createSpinner, withSpinner Made-with: Cursor * refactor: config and docs use shared spinner lifecycle - config: runWithConfigSpinner for deleteProfile, writeProfile, writeCredentialsFile - docs: addSpinnerVerboseOptions, piped-aware title, withSpinner for gen+write - docsCommand accepts DocsCommandOptions (verbose, spinner) - test: config/docs utils mocks for isStdoutPiped, createSpinner, withSpinner Made-with: Cursor * fix(completion): include docs command in bash/zsh generators - Add docs to completion command list (was missing) - Add docs-specific --output hint (globals still append shared flags) Made-with: Cursor * feat(completion): bash tab completion for config profile subcommands - After config|cfg, complete profile, edit, and credential/global flags - After "config profile", complete list, ls, set, show, delete, rm - Zsh script unchanged (still offers config flags only) Made-with: Cursor * feat(cli): offline tapes, update-skip env, and Phase A tests - Add IPB_MOCK_APIS so mock PB/Card APIs work without DEBUG verbose output - Add IPB_NO_UPDATE_CHECK to skip npm version checks (tapes and offline runs) - Wire npm run tapes to fixture creds, strict shell, mock APIs, no update fetch - Document env vars in env list; export isMockApisEnabled and isUpdateCheckDisabled Tests: credentials file ESM-style default unwrap; update banner gated for piped/json/yaml/--output; stderr-only showUpdateNotification; mock/spinner cases. Refresh VHS-generated assets under assets/ for the new tape environment. Made-with: Cursor * feat(cli): disable AI/auth commands; unify config profile helpers - Hide ai, bank, register, login; they throw E4018 (COMMAND_DISABLED) for scripts - Add config-subcommands module for profile list/set/show/delete and config edit - Wire ipb config profile * and config edit to shared helpers; set.ts uses same paths - Drop generateCommand/bankCommand from cmds barrel export; update completion and help - Document OPENAI_API_KEY/SANDBOX_KEY as reserved while AI/login are disabled Tests: config-subcommands suite; extend config tests; add logs/published tests; remove register command tests. Regenerate GENERATED_README.md. Made-with: Cursor * docs: align README and generated docs with disabled AI/auth commands - README: replace AI/Bank how-tos with disabled-command note; fix TOC; refresh testing/env sections - Remove stale TEST_SUGGESTIONS.md; add IMPROVEMENT_PLAN maintenance note - Skip hidden commands in docs generator (isCommandHidden); test coverage - Regenerate GENERATED_README.md via filtered command list Made-with: Cursor * docs: replace improvement plan with current status summary Archive original phases as completed; add summary table, definition-of-done notes, and optional follow-ups instead of an outdated task backlog. Made-with: Cursor * revert(tapes): restore DEBUG-only script; drop fixtures; refresh assets - scripts/tapes.sh: export DEBUG=true again (no fixtures, IPB_MOCK_APIS, or strict bash) - Remove tapes/fixtures credentials; adjust IPB_MOCK_APIS env-list wording - Update VHS-generated GIFs under assets/ after re-recording with system ipb Made-with: Cursor * chore(scripts): remove empty placeholder scripts Drop unused zero-byte advanced-fix-tests, fix-spinner-mock, fix-tests, test-accounts, and verify-process-emitter files. Made-with: Cursor * docs(readme): remove AI, register/login, and sandbox key references Made-with: Cursor * refactor: extract runtime-credentials, break index import cycle - Add src/runtime-credentials.ts for credentialLocation, credentials, printTitleBox, and optionCredentials (cmds and api no longer import index) - Re-export from index.ts for backward compatibility - Point function-calls and utils/api at runtime-credentials - Remove dead _determineExitCode from utils.ts; drop duplicate configureChalk call at utils module load - Update Vitest mocks to stub runtime-credentials instead of index - Document follow-up phases in IMPROVEMENT_PLAN.md Made-with: Cursor * fix: CliError exit mapping, credential file errors, fetch codes - Add ERROR_CODES.UNSUPPORTED_OPERATION; fetch uses it and INVESTEC_API_ERROR - credentials-store: throwCredentialPathError for async read/load (ENOENT, permission, invalid JSON) - determineExitCode: EXIT_CODE_BY_CLI_CODE for all ERROR_CODES so E4016 is not treated as HTTP 401; export determineExitCode from utils barrel - completion: CliError(INVALID_INPUT) + determineExitCode for exit status - Tests: cli-errors, credentials-store edge cases, fetch code assertions - Commands: static isStdoutPiped/readStdin imports (no dynamic utils import) - IMPROVEMENT_PLAN: mark phases 2–3 done Made-with: Cursor * test: add coverage for bank, register, login, and ai commands - Mock node-fetch for register/login; OpenAI client for bank/ai - Assert credential write and error codes on failure paths - Mark IMPROVEMENT_PLAN phase 4 done (shared mock harness still optional) Made-with: Cursor * refactor: completion module, cli test helpers, phase 5 polish - Extract shell completion generators to src/completion.ts; index imports generateCompletionScript - withCommandContext: generic tuple/return typing (no explicit any) - docs: CommanderCommandInternals + asCommanderInternals for _hidden/_args - security: document why INVESTEC_CLIENT_ID is omitted from secret env list; test that it is not reported as a secret - test/helpers/cli-mocks.ts: getRuntimeCredentialsMock, testCredentials, createSpinnerControlMock; migrate key tests to async vi.mock factories - test/utils/completion.test.ts for bash/zsh output and invalid shell - IMPROVEMENT_PLAN: phase 5 complete Made-with: Cursor * refactor: extract Commander registration to register-cli-commands Move all subcommand definitions, shared credential/spinner option helpers, and disabled hidden commands into registerCliCommands(program, deps). index.ts keeps program setup, global options, help categories, parse/history, and update checks. Config edit receives default credentials path via deps. Made-with: Cursor * chore: add markdownlint config and fix MD031/MD032 spacing - Add .markdownlint.json (MD013/MD033/MD060 off for badges, HTML, tables) - Add .markdownlint-cli2.yaml with gitignore + ignore GENERATED_README.md - Add .markdownlintignore for VS Code markdownlint - Auto-fix blanks around fences/lists in README, CI_CD_EXAMPLES, DISTRIBUTION Made-with: Cursor * chore: add markdownlint-cli2 devDependency and lint:md scripts - lint:md / lint:md:fix use local markdownlint-cli2 - Run lint:md in npm run ci after Biome Made-with: Cursor * docs: add portable ipb agent skill for CLI usage (#37) Provide a copyable skills/ipb guide so any agent can operate the CLI safely (setup, workflows, JSON output, disabled commands), with a Cursor symlink under .cursor/skills. Co-authored-by: Cursor <cursoragent@cursor.com> * fix: CLI version sync and rate-limit exit code (#36) * fix: read CLI version from package.json and map rate limits to exit 5 Avoid release drift from a hardcoded version string, and stop treating rate-limit failures as validation errors in scripts. Co-authored-by: Cursor <cursoragent@cursor.com> * chore: bump to 0.8.4 and patch js-yaml advisory Raise js-yaml to ^4.3.1 (audit clean), update markdownlint-cli2, and refresh the lockfile. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> * docs: restructure README with Divio and add CONTRIBUTING (#38) Make getting started easier with tutorials, how-tos, reference, and explanation sections, and document local development, version bumps, and releases for contributors. Co-authored-by: Cursor <cursoragent@cursor.com> * fix: fetch getCode, coerce CLI amounts, and ship 0.9.0 Fix fetch calling missing getSavedCode, coerce Commander string amounts for pay/transfer, harden tape generation (build/link/chmod + interruptible suite), refresh demo GIFs, and bump to 0.9.0. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
ipb fetchto callgetCode(was looking for missinggetSavedCode)pay/transferviavalidateAmount, with CLIparseAsyncregression testsnpm run tapes(build → chmod → link, interruptible suite) and refresh demo GIFs/tapesTest plan
npm run build && node bin/index.js --versionprints0.9.0IPB_MOCK_APIS=1 ipb fetch -f /tmp/x.js -c 1111111saves codeIPB_MOCK_APIS=1 ipb pay mock-account-id b1 100.00 test --yessucceedsIPB_MOCK_APIS=1 ipb transfer mock-account-id mock-account-id 100.00 test --yessucceedsnpx vitest --run test/cmds/pay-transfer-cli-args.test.ts test/utils/input-validation.test.ts test/cmds/fetch.test.tsMade with Cursor