https://github.com/felipetodev/bice-cli
https://github.com/felipetodev/bice-cli
bice bun hono mcp-server open-banking playwright
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/felipetodev/bice-cli
- Owner: felipetodev
- Created: 2026-04-11T23:21:10.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-12T04:09:08.000Z (2 months ago)
- Last Synced: 2026-04-12T06:12:10.025Z (2 months ago)
- Topics: bice, bun, hono, mcp-server, open-banking, playwright
- Language: TypeScript
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
▬▬▬▬▬▬▬▬▬▬ ██████ ██ ██████ ███████ ██████ ██ ██
▬▬▬▬▬▬▬▬▬▬ ██ ██ ██ ██ ██ ██ ██ ██
▬▬▬▬▬▬▬▬▬▬ ██████ ██ ██ █████ ██ ██ ██
▬▬▬▬▬▬▬▬▬▬ ██ ██ ██ ██ ██ ██ ██ ██
▬▬▬▬▬▬▬▬▬▬ ██████ ██ ██████ ███████ ██████ ███████ ██
```
[](https://www.npmjs.com/package/bice-cli)
An unofficial **BICE CLI** tool to manage your BICE accounts via terminal commands, REST API and more.
## Installation
```bash
# From npm (requires Bun)
bun add -g bice-cli@latest
# Or clone and install locally
git clone https://github.com/felipetodev/bice-cli.git
cd bice-cli
bun install
npx bice
```
## Setup
```bash
bice login # Example: bice login 123456789 mypassword
```
Or set environment variables:
```bash
export BICE_RUT=123456789
export BICE_PASSWORD=mypassword
```
## CLI Usage
```bash
# Banking
bice login # Log in with bank credentials
bice user # Show user info
bice products # List all products
bice balance # Quick balance check
bice transactions [page] [limit] # View period transactions (default: page=1, limit=40)
bice movements [month] [year] # View historic account movements for a specific month and year (default: current month/year)
bice monthly-summary [periods] # View monthly summary (default: 4 past months)
bice portfolios-summary [date] # View portfolios summary for a specific date (YYYY-MM-DD)
# Session
bice whoami # Show session info and accounts
bice logout # Disconnect and clear session
````
## REST API
```bash
bice server # Start REST API server (port 3002)
```
| Method | Endpoint | Description
|--------|------------------------------------|---------------------------------------------------------|
| GET | /api/user | Get user info |
| GET | /api/whoami | Get session info and accounts |
| GET | /api/products | Get all products |
| GET | /api/transactions | Get transactions |
| GET | /api/transactions?page=&limit= | Get transactions with pagination |
| GET | /api/movements?month=&year= | Get movements for a specific month and year |
| GET | /api/balance | Get balance for all products |
| GET | /api/monthly-summary?periods= | Get monthly summary (default: 4 past months) |
| GET | /api/portfolios-summary?date= | Get portfolios summary for a specific date (YYYY-MM-DD) |
## Tech Stack
- [Bun](https://bun.sh) — Runtime
- [TypeScript](https://www.typescriptlang.org/) — Type safety
- [Zod](https://zod.dev/) — Schema validation
- [Hono](https://hono.dev/) — REST API framework
- [Playwright](https://playwright.dev/) — Browser automation for BICE login
## Security Considerations
> **This tool is intended for local and personal use only.**
> It runs on your machine and communicates directly with BICE services, but handling real banking credentials always involves risk.
- Keep your credentials out of shell history whenever possible (use environment variables or secure prompts instead of plain command arguments).
- Do not commit `.env` files, tokens, or session artifacts to Git. Add local secret files to `.gitignore`.
- Use this CLI only on trusted devices with disk encryption and an up-to-date OS.
- If you run `bice server`, bind it to localhost and avoid exposing it publicly unless you add your own auth and network controls.
- Rotate your password and log out (`bice logout`) if you suspect your machine, terminal session, or logs were exposed.
- Review this code before using it with production credentials; this is an unofficial project and is not affiliated with Banco BICE.
## Credentials
This CLI persists authentication material locally so you can reuse your session between commands. That data is stored in plain JSON files inside the tool directory (for example, `.bice-config.json` and `.bice-checking-account.json`) and is not encrypted by default.
- Restrict local file access with `chmod 600 .bice-config.json .bice-checking-account.json`.
- Run `bice logout` when you finish to remove the active session file.
- Treat these files as sensitive: never commit, upload, or share them.
- Avoid running this tool on shared machines, remote shells, or environments with automatic folder sync unless you trust that setup.
- Assume session cookies/tokens and account metadata can be present in local config, and protect your workstation accordingly.