avios-cli 0.2.1__tar.gz → 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. {avios_cli-0.2.1 → avios_cli-0.4.1}/CHANGELOG.md +64 -1
  2. {avios_cli-0.2.1 → avios_cli-0.4.1}/PKG-INFO +59 -19
  3. avios_cli-0.4.1/README.md +176 -0
  4. avios_cli-0.4.1/SECURITY.md +32 -0
  5. avios_cli-0.4.1/docs/dashboard.svg +216 -0
  6. avios_cli-0.4.1/docs/reward-flights.svg +223 -0
  7. {avios_cli-0.2.1 → avios_cli-0.4.1}/pyproject.toml +1 -1
  8. avios_cli-0.4.1/scripts/screenshot.py +149 -0
  9. avios_cli-0.4.1/src/avios/__init__.py +6 -0
  10. avios_cli-0.4.1/src/avios/accounts.py +174 -0
  11. avios_cli-0.4.1/src/avios/aggregate.py +118 -0
  12. {avios_cli-0.2.1 → avios_cli-0.4.1}/src/avios/auth.py +57 -35
  13. avios_cli-0.4.1/src/avios/cli.py +707 -0
  14. {avios_cli-0.2.1 → avios_cli-0.4.1}/src/avios/client.py +5 -0
  15. {avios_cli-0.2.1 → avios_cli-0.4.1}/src/avios/endpoints.py +3 -0
  16. avios_cli-0.4.1/src/avios/finnair.py +262 -0
  17. avios_cli-0.4.1/src/avios/programmes.py +66 -0
  18. avios_cli-0.4.1/src/avios/rewards.py +370 -0
  19. {avios_cli-0.2.1 → avios_cli-0.4.1}/src/avios/session.py +69 -15
  20. avios_cli-0.4.1/src/avios/tui/app.py +119 -0
  21. avios_cli-0.4.1/src/avios/tui/rewards.py +380 -0
  22. avios_cli-0.4.1/src/avios/tui/styles.tcss +94 -0
  23. avios_cli-0.4.1/src/avios/tui/widgets.py +51 -0
  24. avios_cli-0.4.1/tests/fixtures/reward_search.rsc +3 -0
  25. avios_cli-0.4.1/tests/test_accounts.py +136 -0
  26. avios_cli-0.4.1/tests/test_aggregate.py +140 -0
  27. {avios_cli-0.2.1 → avios_cli-0.4.1}/tests/test_auth.py +30 -27
  28. avios_cli-0.4.1/tests/test_cli.py +585 -0
  29. avios_cli-0.4.1/tests/test_finnair.py +252 -0
  30. avios_cli-0.4.1/tests/test_rewards.py +142 -0
  31. {avios_cli-0.2.1 → avios_cli-0.4.1}/tests/test_session.py +32 -0
  32. avios_cli-0.4.1/tests/test_tui.py +280 -0
  33. avios_cli-0.2.1/README.md +0 -136
  34. avios_cli-0.2.1/SECURITY.md +0 -31
  35. avios_cli-0.2.1/docs/dashboard.svg +0 -190
  36. avios_cli-0.2.1/scripts/screenshot.py +0 -52
  37. avios_cli-0.2.1/src/avios/__init__.py +0 -6
  38. avios_cli-0.2.1/src/avios/cli.py +0 -263
  39. avios_cli-0.2.1/src/avios/tui/app.py +0 -104
  40. avios_cli-0.2.1/src/avios/tui/styles.tcss +0 -21
  41. avios_cli-0.2.1/src/avios/tui/widgets.py +0 -30
  42. avios_cli-0.2.1/tests/test_cli.py +0 -197
  43. avios_cli-0.2.1/tests/test_tui.py +0 -88
  44. {avios_cli-0.2.1 → avios_cli-0.4.1}/.editorconfig +0 -0
  45. {avios_cli-0.2.1 → avios_cli-0.4.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  46. {avios_cli-0.2.1 → avios_cli-0.4.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  47. {avios_cli-0.2.1 → avios_cli-0.4.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  48. {avios_cli-0.2.1 → avios_cli-0.4.1}/.github/dependabot.yml +0 -0
  49. {avios_cli-0.2.1 → avios_cli-0.4.1}/.github/workflows/ci.yml +0 -0
  50. {avios_cli-0.2.1 → avios_cli-0.4.1}/.github/workflows/publish.yml +0 -0
  51. {avios_cli-0.2.1 → avios_cli-0.4.1}/.gitignore +0 -0
  52. {avios_cli-0.2.1 → avios_cli-0.4.1}/.pre-commit-config.yaml +0 -0
  53. {avios_cli-0.2.1 → avios_cli-0.4.1}/.python-version +0 -0
  54. {avios_cli-0.2.1 → avios_cli-0.4.1}/CONTRIBUTING.md +0 -0
  55. {avios_cli-0.2.1 → avios_cli-0.4.1}/LICENSE +0 -0
  56. {avios_cli-0.2.1 → avios_cli-0.4.1}/src/avios/config.py +0 -0
  57. {avios_cli-0.2.1 → avios_cli-0.4.1}/src/avios/models.py +0 -0
  58. {avios_cli-0.2.1 → avios_cli-0.4.1}/src/avios/tui/__init__.py +0 -0
  59. {avios_cli-0.2.1 → avios_cli-0.4.1}/src/avios/tui/art.py +0 -0
  60. {avios_cli-0.2.1 → avios_cli-0.4.1}/tests/conftest.py +0 -0
  61. {avios_cli-0.2.1 → avios_cli-0.4.1}/tests/fixtures/balance.json +0 -0
  62. {avios_cli-0.2.1 → avios_cli-0.4.1}/tests/fixtures/transactions.json +0 -0
  63. {avios_cli-0.2.1 → avios_cli-0.4.1}/tests/test_client.py +0 -0
  64. {avios_cli-0.2.1 → avios_cli-0.4.1}/tests/test_models.py +0 -0
  65. {avios_cli-0.2.1 → avios_cli-0.4.1}/uv.lock +0 -0
@@ -6,6 +6,66 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.4.1] - 2026-07-27
10
+
11
+ ### Fixed
12
+ - **Finnair balance/transactions failed with 403 immediately after login.** Login
13
+ captured the API key from the first `api.finnair.com` request (`getgauth`), which
14
+ uses a *different* `x-api-key` than the loyalty balance/transactions endpoints —
15
+ so every data call sent the wrong key and was refused. Login now captures
16
+ credentials only from a loyalty API request (`/d/loyalty-service/legacy/current/api/`),
17
+ which carries the key those endpoints accept. Fixes #28.
18
+ - A Finnair `403 Forbidden` is no longer mislabelled "session expired"; the message
19
+ now names the real cause (likely a stale/wrong API key) and includes the response.
20
+ Fixes #29.
21
+
22
+ ## [0.4.0] - 2026-07-27
23
+
24
+ ### Added
25
+ - **British Airways reward-flight availability.** `avios flights ORIGIN DEST`
26
+ supports exact-date and month-calendar searches, cabin/passenger filters,
27
+ available-only output by default, `--show-unavailable`, and scriptable JSON.
28
+ - Return journeys run two independent one-way searches with the route reversed
29
+ for the inbound leg.
30
+ - Typed reward calendar, day, flight, and cabin-availability models plus an
31
+ isolated parser for avios.com's authenticated React Server Components stream.
32
+ - The Textual app now has Dashboard and Reward Flights tabs. The search tab keeps
33
+ network work off the event loop and renders outbound/inbound results separately.
34
+
35
+ ### Changed
36
+ - BA browser-assisted login warms the separate `spend-avios` flight-search app
37
+ before saving cookies.
38
+
39
+ ### Security
40
+ - Reward-search action tokens from the private RSC response are ignored and never
41
+ stored; tests use a small sanitized fixture rather than the captured HAR.
42
+
43
+ ## [0.3.0] - 2026-07-27
44
+
45
+ ### Added
46
+ - **Multiple accounts, one per programme.** Log into several Avios programmes and
47
+ keep their sessions side by side: `avios login [programme]` (default `ba`),
48
+ `avios logout [programme]` (or `avios logout` for all), and a new `avios accounts`
49
+ roster showing each balance and status. Programmes: British Airways (`ba`),
50
+ Iberia (`iberia`), Aer Lingus (`aerlingus`), Finnair Plus (`finnair`).
51
+ - **Combined views.** `balance` sums every account into a combined total (a single
52
+ account keeps the individual/household detail); `transactions`/`pending` merge
53
+ across accounts newest-first with a Programme column. `--account/-a` filters any
54
+ data command to one programme.
55
+ - **Multi-account TUI.** `avios tui` shows a combined balance header (per-programme
56
+ breakdown) and a Programme column, loading every account concurrently.
57
+ - **Finnair Plus** via Finnair's CAS/OAuth browser login + loyalty API (balance,
58
+ profile, transactions); token-backed account storage alongside cookie accounts.
59
+ - Programme-aware browser login (per-programme login URL + isolated Chrome profile)
60
+ and a shared, backend-aware aggregation layer (`aggregate.py`) used by the CLI
61
+ and TUI. Per-account failures are captured, so one expired session never hides
62
+ the others.
63
+
64
+ ### Changed
65
+ - Sessions are now stored per programme at `~/.config/avios/accounts/<programme>.json`
66
+ (mode `600`); the old single `state.json` is migrated to `accounts/ba.json` on
67
+ first run.
68
+
9
69
  ## [0.2.1] - 2026-07-27
10
70
 
11
71
  ### Fixed
@@ -127,7 +187,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
127
187
  - Reward-flight **availability** search is not yet implemented (needs a British
128
188
  Airways capture).
129
189
 
130
- [Unreleased]: https://github.com/alexechoi/avios-cli/compare/v0.2.1...HEAD
190
+ [Unreleased]: https://github.com/alexechoi/avios-cli/compare/v0.4.1...HEAD
191
+ [0.4.1]: https://github.com/alexechoi/avios-cli/compare/v0.4.0...v0.4.1
192
+ [0.4.0]: https://github.com/alexechoi/avios-cli/compare/v0.3.0...v0.4.0
193
+ [0.3.0]: https://github.com/alexechoi/avios-cli/compare/v0.2.1...v0.3.0
131
194
  [0.2.1]: https://github.com/alexechoi/avios-cli/compare/v0.2.0...v0.2.1
132
195
  [0.2.0]: https://github.com/alexechoi/avios-cli/compare/v0.1.6...v0.2.0
133
196
  [0.1.6]: https://github.com/alexechoi/avios-cli/compare/v0.1.5...v0.1.6
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: avios-cli
3
- Version: 0.2.1
4
- Summary: A CLI and TUI for avios.com — view your Avios balance and transactions from the terminal.
3
+ Version: 0.4.1
4
+ Summary: A CLI and TUI for Avios balances, transactions, and BA reward-flight availability.
5
5
  Project-URL: Homepage, https://github.com/alexechoi/avios-cli
6
6
  Project-URL: Repository, https://github.com/alexechoi/avios-cli
7
7
  Project-URL: Issues, https://github.com/alexechoi/avios-cli/issues
@@ -39,18 +39,24 @@ Description-Content-Type: text/markdown
39
39
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
40
40
  [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
41
41
 
42
- A **CLI and TUI for [avios.com](https://www.avios.com)** — check your Avios balance,
43
- browse your transactions and manage your account without leaving the terminal.
42
+ A **CLI and TUI for your Avios programmes** — check balances, browse transactions,
43
+ and search British Airways reward-flight availability without leaving the terminal.
44
+ British Airways, Iberia, and Aer Lingus use avios.com; Finnair Plus uses Finnair's
45
+ own OAuth and loyalty API.
44
46
 
45
47
  > ⚠️ **Unofficial.** This project is not affiliated with, authorised by, or endorsed by
46
- > Avios, British Airways or IAG Loyalty. It drives the same private endpoints the
47
- > avios.com website uses, with your own logged-in session. Use at your own risk; it may
48
- > break at any time and may be against the provider's terms of service.
48
+ > Avios, British Airways, Finnair or IAG Loyalty. It drives the same private endpoints
49
+ > the providers' websites use, with your own logged-in session. Use at your own risk;
50
+ > it may break at any time and may be against the provider's terms of service.
49
51
 
50
52
  ![avios TUI dashboard](docs/dashboard.svg)
51
53
 
52
54
  <sub>The <code>avios tui</code> dashboard (demo data). Regenerate with <code>uv run python scripts/screenshot.py</code>.</sub>
53
55
 
56
+ ![avios reward-flight search](docs/reward-flights.svg)
57
+
58
+ <sub>Direct BA reward-seat availability by date and cabin (synthetic demo data).</sub>
59
+
54
60
  ## Status
55
61
 
56
62
  Early alpha, built in the open. See the [roadmap](#roadmap).
@@ -84,6 +90,7 @@ on the dashboard. It needs the **`login` extra**:
84
90
 
85
91
  ```bash
86
92
  uvx --from 'avios-cli[login]' avios login
93
+ uvx --from 'avios-cli[login]' avios login finnair
87
94
  ```
88
95
 
89
96
  It launches your installed **Google Chrome** (no extra download). If you don't have
@@ -113,22 +120,42 @@ browser. Use `--from-browser` instead: log into avios.com in your normal Chrome
113
120
  (you'll get one normal captcha), then run
114
121
  `uvx --from 'avios-cli[login]' avios login --from-browser`.
115
122
 
116
- Your session cookie is stored at `~/.config/avios/state.json` (mode `600`). It
117
- expires after ~a day; just run `avios login` again. Run `avios logout` to remove it.
123
+ Finnair uses a different CAS/OAuth flow. `avios login finnair` opens the Finnair Plus
124
+ balance page, lets you complete password and MFA in the real browser, and captures the
125
+ OAuth session from the authenticated loyalty request. `--from-browser` is not available
126
+ for Finnair because browser-cookie import cannot read that token.
127
+
128
+ Each programme session is stored at `~/.config/avios/accounts/<programme>.json`
129
+ (mode `600`). Sessions expire; just log in to that programme again. Use
130
+ `avios logout <programme>` for one account or `avios logout` for all accounts.
131
+ For BA, browser-assisted login also opens the reward-flight finder briefly so its
132
+ separate `spend-avios` session is captured.
118
133
 
119
134
  ## Usage
120
135
 
136
+ Commands span **all logged-in accounts** by default and show a combined total; add
137
+ `--account/-a <programme>` to focus on one.
138
+
121
139
  ```bash
122
- avios balance # total / individual / household Avios
123
- avios transactions --limit 20 # recent transactions (date, description, Avios, type)
124
- avios pending # pending Avios
140
+ avios accounts # every logged-in account: balance + status
141
+ avios balance # per-account balances + combined total
142
+ avios transactions --limit 20 # recent transactions, merged across accounts
143
+ avios pending # pending Avios, merged across accounts
144
+ avios balance --account iberia # just one programme
125
145
  avios overview # dashboard summary
126
146
  avios whoami # name, tier, membership, email
127
147
  avios raw /shell/api/users/current/accounts # hit any endpoint directly
148
+
149
+ # Direct British Airways reward-seat availability:
150
+ avios flights LON ABZ --date 2026-11-05
151
+ avios flights LON ABZ --date 2026-11-05 --return-date 2026-11-12
152
+ avios flights LON ABZ --month 2026-11 --cabin economy --cabin business
153
+ avios flights LON ABZ --month 2026-11 --return-month 2026-12 --json
128
154
  ```
129
155
 
130
- Add `--json` to `balance`, `transactions`, `pending` or `whoami` for scriptable
131
- output. Non-BA Avios programmes can set `AVIOS_OPCO` (default `BAEC`).
156
+ Add `--json` to `accounts`, `balance`, `transactions`, `pending`, `whoami`, or
157
+ `flights` for scriptable output. With a single account, `balance` keeps the
158
+ individual/household breakdown.
132
159
 
133
160
  ## TUI
134
161
 
@@ -136,8 +163,19 @@ output. Non-BA Avios programmes can set `AVIOS_OPCO` (default `BAEC`).
136
163
  avios tui
137
164
  ```
138
165
 
139
- A full-screen dashboard: your balance in the header and a scrollable transactions
140
- table. Press `r` to refresh, `q` to quit.
166
+ A tabbed full-screen application:
167
+
168
+ - **Dashboard** — combined balance header and transactions across every account.
169
+ - **Reward Flights** — BA date/calendar search with optional reverse-route return,
170
+ cabin/passenger controls, and independent outbound/inbound result tables.
171
+
172
+ Press `r` to refresh the dashboard and `q` to quit. Reward searches run only when
173
+ you press Search or Enter.
174
+
175
+ Reward search is an unofficial, availability-only view. It currently supports
176
+ direct BA flights, three-letter airport/city codes, and seat counts by cabin. It
177
+ does not price, book, or show taxes/fees or connecting flights. Return journeys
178
+ are two independent one-way searches.
141
179
 
142
180
  ## Roadmap
143
181
 
@@ -147,7 +185,8 @@ table. Press `r` to refresh, `q` to quit.
147
185
  - [x] Browser-assisted `avios login`
148
186
  - [x] CLI commands
149
187
  - [x] Textual TUI dashboard
150
- - [ ] Reward-flight **availability** search _(coming soon — needs a British Airways capture)_
188
+ - [x] Multiple accounts (BA, Iberia, Aer Lingus, Finnair) with combined views
189
+ - [x] British Airways reward-flight **availability** search (CLI + TUI)
151
190
 
152
191
  ## Development
153
192
 
@@ -163,8 +202,9 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for the full workflow and
163
202
 
164
203
  ## Security
165
204
 
166
- No passwords are handled or stored — only your session cookie, kept locally at
167
- `~/.config/avios/state.json` (mode `600`). See [SECURITY.md](SECURITY.md).
205
+ No passwords are handled or stored — only programme session cookies or OAuth tokens,
206
+ kept locally under `~/.config/avios/accounts/` (mode `600`). See
207
+ [SECURITY.md](SECURITY.md).
168
208
 
169
209
  ## License
170
210
 
@@ -0,0 +1,176 @@
1
+ # avios-cli
2
+
3
+ [![CI](https://github.com/alexechoi/avios-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/alexechoi/avios-cli/actions/workflows/ci.yml)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
6
+
7
+ A **CLI and TUI for your Avios programmes** — check balances, browse transactions,
8
+ and search British Airways reward-flight availability without leaving the terminal.
9
+ British Airways, Iberia, and Aer Lingus use avios.com; Finnair Plus uses Finnair's
10
+ own OAuth and loyalty API.
11
+
12
+ > ⚠️ **Unofficial.** This project is not affiliated with, authorised by, or endorsed by
13
+ > Avios, British Airways, Finnair or IAG Loyalty. It drives the same private endpoints
14
+ > the providers' websites use, with your own logged-in session. Use at your own risk;
15
+ > it may break at any time and may be against the provider's terms of service.
16
+
17
+ ![avios TUI dashboard](docs/dashboard.svg)
18
+
19
+ <sub>The <code>avios tui</code> dashboard (demo data). Regenerate with <code>uv run python scripts/screenshot.py</code>.</sub>
20
+
21
+ ![avios reward-flight search](docs/reward-flights.svg)
22
+
23
+ <sub>Direct BA reward-seat availability by date and cabin (synthetic demo data).</sub>
24
+
25
+ ## Status
26
+
27
+ Early alpha, built in the open. See the [roadmap](#roadmap).
28
+
29
+ ## Install
30
+
31
+ Requires Python 3.10+.
32
+
33
+ ```bash
34
+ uvx avios-cli --help # run without installing
35
+ # or install it, then use the `avios` command:
36
+ pip install avios-cli
37
+ avios --help
38
+ ```
39
+
40
+ Or from source, for development:
41
+
42
+ ```bash
43
+ git clone https://github.com/alexechoi/avios-cli
44
+ cd avios-cli
45
+ uv sync
46
+ uv run avios --help
47
+ ```
48
+
49
+ ## Log in
50
+
51
+ avios.com has no credential API — login is Auth0 Universal Login behind hCaptcha and
52
+ SMS/passkey MFA — so `avios login` opens a real browser, **waits while you finish
53
+ logging in** (password, captcha, SMS code), and captures the session once you land
54
+ on the dashboard. It needs the **`login` extra**:
55
+
56
+ ```bash
57
+ uvx --from 'avios-cli[login]' avios login
58
+ uvx --from 'avios-cli[login]' avios login finnair
59
+ ```
60
+
61
+ It launches your installed **Google Chrome** (no extra download). If you don't have
62
+ Chrome, install Playwright's browser once with
63
+ `uvx --from playwright playwright install chromium`.
64
+
65
+ Prefer not to open a browser? Import the cookie from a Chrome you're already logged
66
+ into avios.com with:
67
+
68
+ ```bash
69
+ uvx --from 'avios-cli[login]' avios login --from-browser
70
+ ```
71
+
72
+ This scans **all your Chrome profiles** and uses whichever one is actually logged
73
+ into avios.com (it tells you which). If you have several profiles, you can target
74
+ one directly:
75
+
76
+ ```bash
77
+ uvx --from 'avios-cli[login]' avios login --from-browser --profile "Profile 1"
78
+ ```
79
+
80
+ Plain `uvx avios-cli login` won't work — the isolated environment doesn't include
81
+ the `login` extra.
82
+
83
+ **Stuck in an endless captcha loop?** That's bot detection on the automated
84
+ browser. Use `--from-browser` instead: log into avios.com in your normal Chrome
85
+ (you'll get one normal captcha), then run
86
+ `uvx --from 'avios-cli[login]' avios login --from-browser`.
87
+
88
+ Finnair uses a different CAS/OAuth flow. `avios login finnair` opens the Finnair Plus
89
+ balance page, lets you complete password and MFA in the real browser, and captures the
90
+ OAuth session from the authenticated loyalty request. `--from-browser` is not available
91
+ for Finnair because browser-cookie import cannot read that token.
92
+
93
+ Each programme session is stored at `~/.config/avios/accounts/<programme>.json`
94
+ (mode `600`). Sessions expire; just log in to that programme again. Use
95
+ `avios logout <programme>` for one account or `avios logout` for all accounts.
96
+ For BA, browser-assisted login also opens the reward-flight finder briefly so its
97
+ separate `spend-avios` session is captured.
98
+
99
+ ## Usage
100
+
101
+ Commands span **all logged-in accounts** by default and show a combined total; add
102
+ `--account/-a <programme>` to focus on one.
103
+
104
+ ```bash
105
+ avios accounts # every logged-in account: balance + status
106
+ avios balance # per-account balances + combined total
107
+ avios transactions --limit 20 # recent transactions, merged across accounts
108
+ avios pending # pending Avios, merged across accounts
109
+ avios balance --account iberia # just one programme
110
+ avios overview # dashboard summary
111
+ avios whoami # name, tier, membership, email
112
+ avios raw /shell/api/users/current/accounts # hit any endpoint directly
113
+
114
+ # Direct British Airways reward-seat availability:
115
+ avios flights LON ABZ --date 2026-11-05
116
+ avios flights LON ABZ --date 2026-11-05 --return-date 2026-11-12
117
+ avios flights LON ABZ --month 2026-11 --cabin economy --cabin business
118
+ avios flights LON ABZ --month 2026-11 --return-month 2026-12 --json
119
+ ```
120
+
121
+ Add `--json` to `accounts`, `balance`, `transactions`, `pending`, `whoami`, or
122
+ `flights` for scriptable output. With a single account, `balance` keeps the
123
+ individual/household breakdown.
124
+
125
+ ## TUI
126
+
127
+ ```bash
128
+ avios tui
129
+ ```
130
+
131
+ A tabbed full-screen application:
132
+
133
+ - **Dashboard** — combined balance header and transactions across every account.
134
+ - **Reward Flights** — BA date/calendar search with optional reverse-route return,
135
+ cabin/passenger controls, and independent outbound/inbound result tables.
136
+
137
+ Press `r` to refresh the dashboard and `q` to quit. Reward searches run only when
138
+ you press Search or Enter.
139
+
140
+ Reward search is an unofficial, availability-only view. It currently supports
141
+ direct BA flights, three-letter airport/city codes, and seat counts by cabin. It
142
+ does not price, book, or show taxes/fees or connecting flights. Return journeys
143
+ are two independent one-way searches.
144
+
145
+ ## Roadmap
146
+
147
+ - [x] Project scaffolding, packaging and CI
148
+ - [x] Session + cookie storage layer
149
+ - [x] Typed API client (balance, transactions, accounts, profile)
150
+ - [x] Browser-assisted `avios login`
151
+ - [x] CLI commands
152
+ - [x] Textual TUI dashboard
153
+ - [x] Multiple accounts (BA, Iberia, Aer Lingus, Finnair) with combined views
154
+ - [x] British Airways reward-flight **availability** search (CLI + TUI)
155
+
156
+ ## Development
157
+
158
+ ```bash
159
+ uv sync # installs the project + the `dev` dependency-group
160
+ uv run ruff check .
161
+ uv run mypy src
162
+ uv run pytest
163
+ ```
164
+
165
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for the full workflow and
166
+ [CHANGELOG.md](CHANGELOG.md) for release notes.
167
+
168
+ ## Security
169
+
170
+ No passwords are handled or stored — only programme session cookies or OAuth tokens,
171
+ kept locally under `~/.config/avios/accounts/` (mode `600`). See
172
+ [SECURITY.md](SECURITY.md).
173
+
174
+ ## License
175
+
176
+ [MIT](LICENSE)
@@ -0,0 +1,32 @@
1
+ # Security Policy
2
+
3
+ ## How avios-cli handles your credentials
4
+
5
+ - **No passwords are ever handled or stored.** Login happens in a real browser
6
+ (the programme's normal login and MFA); avios-cli only captures the resulting
7
+ **session cookie or OAuth token**.
8
+ - Sessions are stored locally under `~/.config/avios/accounts/` with file mode
9
+ `600` (owner read/write only). Each credential is sent only to its programme's
10
+ API in the requests you make.
11
+ - `avios logout` deletes stored sessions. They also expire on the server side.
12
+ - `AVIOS_COOKIE` may be set to supply a cookie via the environment instead of the
13
+ stored file — avoid committing it or storing it in shell history.
14
+ - Reward-flight search sends the same saved BA cookie only to `www.avios.com`.
15
+ The RSC response's short-lived action tokens are neither exposed nor persisted.
16
+
17
+ ## Unofficial software
18
+
19
+ avios-cli is **not affiliated with Avios, British Airways, Finnair or IAG
20
+ Loyalty** and uses private, undocumented endpoints. Using it may breach the
21
+ provider's terms of service and could affect your account. Use at your own risk.
22
+
23
+ ## Reporting a vulnerability
24
+
25
+ Please **do not** open a public issue for security problems. Instead, use GitHub's
26
+ private vulnerability reporting:
27
+ **Security → Report a vulnerability** on the repository, or open a private draft
28
+ advisory. We'll acknowledge within a few days.
29
+
30
+ ## Supported versions
31
+
32
+ This is pre-1.0 software; only the latest release on `main` is supported.