Brobizz Usage
Command-line tool for showing Brobizz trips and account usage.
Quick Start
From this repository:
nix develop
uv sync --extra dev
uv run brobizz-usage auth login
uv run brobizz-usage trips
That is the normal flow. Login runs in headless Chromium and asks for:
- Brobizz/Auth0 email
- Password
- One-time-code channel:
SMS|email, defaultSMS - The received one-time code
After login, tokens are saved securely in your user config directory and reused automatically.
Install As A Tool
For regular use outside the development shell:
uv tool install .
uvx playwright install chromium
brobizz-usage auth login
brobizz-usage trips
Common Commands
Show recent trips as terminal cards:
brobizz-usage trips
Show trips as JSON:
brobizz-usage trips --json
Show account details:
brobizz-usage account
Log out:
brobizz-usage auth logout
Login Options
You can prefill login values to skip prompts:
brobizz-usage auth login --username you@example.com
brobizz-usage auth login --username you@example.com --password 'secret'
brobizz-usage auth login --username you@example.com --password 'secret' --otp-channel sms
For scripts, avoid putting the password in shell history:
printf '%s\n' 'secret' | brobizz-usage auth login --username you@example.com --password-stdin --otp-channel sms
auth login is headless by default, which is suitable for servers. To debug the browser flow visually:
brobizz-usage auth login --browser-login
Trip Options
brobizz-usage trips -n 10
brobizz-usage trips --full
brobizz-usage trips --search "Storebaelt"
brobizz-usage trips --include-payment-records
brobizz-usage trips --json
Options:
--number,-n: number of latest trip cards to show. Defaults to5.--full: show additional scalar fields on each visible card.--search: filter transactions by search text.--include-payment-records: include standalone payments, vouchers, and drafts.--json: output raw trips and usage records as JSON.
Account Options
brobizz-usage account
brobizz-usage account --account-id ACCOUNT_ID
If --account-id is omitted, the CLI uses currentAccountId, then defaultAccountId, then the first usable accountIds value.
Cache
API responses are cached on disk for one hour by default.
brobizz-usage --no-cache trips
brobizz-usage --cache-ttl 300 trips
brobizz-usage --force-login trips
Options:
--no-cache: bypass cached API responses.--cache-ttl: set cache lifetime in seconds.--force-login: ignore saved tokens and log in again before the command.
Inspect the cache directory:
python -c 'from brobizz_usage import get_user_data_path; print(get_user_data_path("cache", ensure_exists=True))'
Python API
from brobizz_usage import BrobizzClient
client = BrobizzClient()
person = client.get_current_person()
account = client.get_account(person["currentAccountId"])
transactions = client.get_all_transactions(search_string="Storebaelt")
Development
Run tests:
uv run pytest
The tests mock token state, HTTP sessions, and CLI clients. They do not run live browser login or live Brobizz API calls.
Captured payloads are not required by the package. If you save samples locally, keep them under the app's XDG data directory:
python -c 'from brobizz_usage import get_user_data_path; print(get_user_data_path(ensure_exists=True))'
Metadata
Release files for brobizz-usage 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| brobizz_usage-0.1.0.tar.gz | 249.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| brobizz_usage-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 265.6 kB
Release files / brobizz_usage-0.1.0.tar.gz
| Download URL | brobizz_usage-0.1.0.tar.gz |
|---|---|
| Size | 249.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05c24c8bf72c3e0b309728106b3aba1a7159fa0de5d82cbc285af01503d31796
|
|
BLAKE2b-256 checksum How to use checksums |
3930ee70eb01b4cc05deb6d6201542c3853446d402d22824844f703c22565b22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.11","id":"zokor","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / brobizz_usage-0.1.0-py3-none-any.whl
| Download URL | brobizz_usage-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31a3ae02b8d0d6efd6533b782cdbf786b541959a4e6ce2ec24df44f5dbd81d58
|
|
BLAKE2b-256 checksum How to use checksums |
832e48ac5a8fdd43a00b9850675560543d9334ba6480cbf0e28844220b60b036
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.11","id":"zokor","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|