Local repository for reading balances from already authenticated Alfa-Bank, VTB, and T-Bank web sessions through Chrome DevTools Protocol, without sending logins, passwords, cookies, or tokens to external services.
Main entry points:
- works with
alpha,vtb, andtbank; - launches separate persistent Chrome bridge profiles;
- opens bank pages and connects to them through CDP;
- waits for manual authentication if a bank requires login;
- extracts balances for accounts and cards;
- for credit cards, also extracts debt, available amount, limit, payment due dates, and grace-period details when those fields are present on the details page;
- writes summary and raw scan files outside the repository;
- closes bridge Chrome by default at the end of
sync.
Target pages:
- Alfa:
https://web.alfabank.ru/dashboard - VTB:
https://online.vtb.ru/home/all-products - T-Bank:
https://www.tbank.ru/mybank/
.
├── README.md
├── package.json
├── scripts/
│ ├── bank-balance-bridge.mjs
│ ├── bankscan
│ └── banktree
└── skills/
└── bank-balance-bridge/
├── SKILL.md
└── agents/
└── openai.yaml
Key files:
- scripts/bank-balance-bridge.mjs — main bridge for Alfa, VTB, and T-Bank
- scripts/bankscan — short wrapper for launching from any directory
- scripts/banktree — helper for local
git worktreeworkflows
- macOS
- Node.js
>=22 - Google Chrome
zshfor thebankscanwrapper script
Runtime state and results are stored outside the repository:
~/.codex/state/bank-balance-bridge/balances-summary.json~/.codex/state/bank-balance-bridge/output/*.json~/.codex/state/bank-balance-bridge/profiles/alpha~/.codex/state/bank-balance-bridge/profiles/tbank~/.codex/state/bank-balance-bridge/profiles/vtb
This is intentional so real banking data never lives in git.
In the summary:
banks.<bank>.balancescontains the general list of discovered balances;banks.<bank>.creditCardscontains extended credit-card details: debt, available amount, limit, payment due dates, grace period, and related masked card numbers.
From the repository root:
node scripts/bank-balance-bridge.mjs open allIn the bridge Chrome windows that open, sign in to the banks once.
After that, the normal run is:
node scripts/bank-balance-bridge.mjs sync allOr with the short command:
bankscanBy default, sync and bankscan:
- open the required windows;
- wait if login is required;
- keep the same running command alive until login completes, so no second command is needed after authorization;
- scan the banks;
- close bridge Chrome.
Common variants:
bankscan
bankscan alpha
bankscan tbank
bankscan vtb
bankscan open all
bankscan scan all --reload
bankscan watch all --interval 300
bankscan --no-close-browser
bankscan --no-wait-for-loginWrapper behavior:
- with no arguments:
sync all alpha|vtb|tbank|all:sync <bank>- for those sync-style entrypoints,
bankscanexplicitly keeps--wait-for-loginenabled unless--no-wait-for-loginis passed - any other arguments: direct passthrough to
bank-balance-bridge.mjs
If ~/Documents/MyScripts is already in PATH, the most convenient option is a symlink:
ln -sf "/Users/bulatmotygullin/Documents/BankScan/scripts/bankscan" "$HOME/Documents/MyScripts/bankscan"If the current shell still does not see the command:
source ~/.zshrcAvailable from the repository root:
npm run open
npm run scan
npm run scan:reload
npm run sync
npm run sync:alpha
npm run sync:tbank
npm run sync:vtb
npm run help
npm run worktree -- helpFor this project, the primary checkout stays at:
/Users/bulatmotygullin/Documents/BankScan
All additional worktree checkouts for feature branches must live under a single shared directory inside Documents:
/Users/bulatmotygullin/Documents/BankScan/worktrees
Rules:
- keep
mainin the primary checkout, not in a separate feature worktree; - one feature = one local branch = one separate
worktree; - do not create a neighboring folder in
~/Documentssuch asBankScan-worktrees; - feature branches are for local development only and are not pushed to GitHub;
- after finishing a feature, validate the changes in its
worktreefirst, then get approval before merging intomain; only after the local merge should an updatedmainbe published, if that is actually needed.
Basic commands:
scripts/banktree root
scripts/banktree add feature/vtb-parser
scripts/banktree list
scripts/banktree remove feature/vtb-parserThe same through npm:
npm run worktree -- add feature/vtb-parserImportant notes about symlinks and testing:
~/Documents/MyScripts/bankscanshould stay pointed at the stable checkout onmain;- if you change the wrapper or bridge in a feature worktree, run scripts/bankscan or
node scripts/bank-balance-bridge.mjsdirectly from thatworktree, not through the global symlink; - the
~/.codex/skills/bank-balance-bridgesymlink should also usually stay onmain; temporarily repointing it to a feature worktree only makes sense if you are intentionally testing skill-file changes.
- do not commit
balances-summary.jsonor raw scan files; - do not store real balances, tokens, cookies, or exported pages in the repository;
- use bridge profiles only for this automation;
- do not leave debug-enabled Chrome running longer than needed;
- do not point the bridge at the standard
~/Library/Application Support/Google/Chrome: Chrome 136+ ignores remote debugging when started against the standard user data directory.
- banks can change their markup and break the extraction heuristics;
- T-Bank is scanned from the main internet-bank screen at
https://www.tbank.ru/mybank/, where the bank shows cards and accounts after login; - VTB is especially sensitive to reload/navigation, so the bridge already contains dedicated handling for it;
- a successful scan depends on authentication being completed inside the bridge profile itself;
- if the bank expires the session server-side, the automation cannot bypass a new login.
The repository includes a local copy of the current skill:
If you want Codex to use the repository version of the skill instead of an external copy, you can create a symlink:
rm -rf "$HOME/.codex/skills/bank-balance-bridge"
ln -s "/Users/bulatmotygullin/Documents/BankScan/skills/bank-balance-bridge" "$HOME/.codex/skills/bank-balance-bridge"After that, in Codex you can ask, for example:
Use $bank-balance-bridge and check the balances
or simply:
Check balances in Alfa, VTB, and T-Bank
Expected workflow for Codex:
- use
bankscanas the main entry point; - wait for manual authentication if needed;
- if
bankscanis still running and waiting for authorization, keep that same run alive and do not ask the user to send a second “I authorized” message; - read the result from
~/.codex/state/bank-balance-bridge/balances-summary.json; - for credit cards, read not only
balancesbut alsocreditCards; - do not ask the user to share passwords, SMS codes, cookies, or tokens;
- for repository changes, keep one feature in one local branch and one separate
worktreeunder/Users/bulatmotygullin/Documents/BankScan/worktrees; - do not push feature branches;
- ask the user before merging a finished feature into
main.