Skip to main content

A CLI and TUI for avios.com — view your Avios balance and transactions from the terminal.

Project description

avios-cli

CI License: MIT Python

A CLI and TUI for avios.com — check your Avios balance, browse your transactions and manage your account without leaving the terminal.

⚠️ Unofficial. This project is not affiliated with, authorised by, or endorsed by Avios, British Airways or IAG Loyalty. It drives the same private endpoints the avios.com website uses, with your own logged-in session. Use at your own risk; it may break at any time and may be against the provider's terms of service.

avios TUI dashboard

The avios tui dashboard (demo data). Regenerate with uv run python scripts/screenshot.py.

Status

Early alpha, built in the open. See the roadmap.

Install

Requires Python 3.10+.

uvx avios-cli --help     # run without installing
# or install it, then use the `avios` command:
pip install avios-cli
avios --help

Or from source, for development:

git clone https://github.com/alexechoi/avios-cli
cd avios-cli
uv sync
uv run avios --help

Log in

avios.com has no credential API — login is Auth0 Universal Login behind hCaptcha and SMS/passkey MFA — so avios login opens a real browser, waits while you finish logging in (password, captcha, SMS code), and captures the session once you land on the dashboard. It needs the login extra:

uvx --from 'avios-cli[login]' avios login

It launches your installed Google Chrome (no extra download). If you don't have Chrome, install Playwright's browser once with uvx --from playwright playwright install chromium.

Prefer not to open a browser? Import the cookie from a Chrome you're already logged into avios.com with:

uvx --from 'avios-cli[login]' avios login --from-browser

This scans all your Chrome profiles and uses whichever one is actually logged into avios.com (it tells you which). If you have several profiles, you can target one directly:

uvx --from 'avios-cli[login]' avios login --from-browser --profile "Profile 1"

Plain uvx avios-cli login won't work — the isolated environment doesn't include the login extra.

Stuck in an endless captcha loop? That's bot detection on the automated browser. Use --from-browser instead: log into avios.com in your normal Chrome (you'll get one normal captcha), then run uvx --from 'avios-cli[login]' avios login --from-browser.

Your session cookie is stored at ~/.config/avios/state.json (mode 600). It expires after ~a day; just run avios login again. Run avios logout to remove it.

Usage

avios balance                  # total / individual / household Avios
avios whoami                   # name, tier, membership, email
avios raw /shell/api/users/current/accounts   # hit any endpoint directly

Add --json to balance or whoami for scriptable output.

Experimental (need the manage-avios app session, which the cookie/SSO login can't yet establish — these currently return "session expired"):

avios transactions --limit 20
avios pending
avios overview

TUI

avios tui

A full-screen dashboard: your balance in the header and a scrollable transactions table. Press r to refresh, q to quit.

Roadmap

  • Project scaffolding, packaging and CI
  • Session + cookie storage layer
  • Typed API client (balance, transactions, accounts, profile)
  • Browser-assisted avios login
  • CLI commands
  • Textual TUI dashboard
  • Reward-flight availability search (coming soon — needs a British Airways capture)

Development

uv sync            # installs the project + the `dev` dependency-group
uv run ruff check .
uv run mypy src
uv run pytest

See CONTRIBUTING.md for the full workflow and CHANGELOG.md for release notes.

Security

No passwords are handled or stored — only your session cookie, kept locally at ~/.config/avios/state.json (mode 600). See SECURITY.md.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

avios_cli-0.1.6.tar.gz (109.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

avios_cli-0.1.6-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file avios_cli-0.1.6.tar.gz.

File metadata

  • Download URL: avios_cli-0.1.6.tar.gz
  • Upload date:
  • Size: 109.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for avios_cli-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5aa4a6bcb252f5e6f7459e9feae25c18e39ca6654cb6d1c1694ebc049327d83b
MD5 d1d065f2966a3bd433881bc57cc46bb4
BLAKE2b-256 9a3618f2191e1807d584286e46ab0bd07a550314501a6a9d446dfee82aa3285e

See more details on using hashes here.

Provenance

The following attestation bundles were made for avios_cli-0.1.6.tar.gz:

Publisher: publish.yml on alexechoi/avios-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file avios_cli-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: avios_cli-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for avios_cli-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0ac7ee4cee0de3b403c5826572fb39db5651d38e71106277a6d00a81a1407b55
MD5 ee78200bf452a0824110de9312e3fd41
BLAKE2b-256 dafb51581460512c22432e30c5db13dd047f528d624abb9ae762f776dc995e94

See more details on using hashes here.

Provenance

The following attestation bundles were made for avios_cli-0.1.6-py3-none-any.whl:

Publisher: publish.yml on alexechoi/avios-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page