UK train times from your terminal
Project description
choo
UK train times from your terminal.
Install
uvx choo
Or install permanently:
pip install choo
Quick start
# 1. Get API credentials (free at https://api.rtt.io/)
choo auth
# 2. Set up aliases
choo alias set home HIB
choo alias set work KGX
# 3. Go
choo # home -> work (default)
choo home work # same thing, explicit
choo KGX YRK # King's Cross to York
Commands
choo / choo next FROM TO
Show next trains between two stations.
choo PAD BRI # Paddington to Bristol
choo next PAD BRI --at 08:30 # departing around 08:30
choo next PAD BRI --on tomorrow # tomorrow's trains
choo next PAD BRI --count 5 # show 5 results
choo board STATION
Departure board for a station.
choo board KGX
choo board KGX --to YRK # filter to York services
choo board KGX --arrivals # arrivals instead of departures
choo service UID
Full calling pattern for a service.
choo service G54821
choo service G54821 --on 2025-03-15
choo alias
Manage station aliases.
choo alias set home HIB
choo alias set work KGX
choo alias list
choo alias remove work
choo auth
Interactive setup for RTT API credentials. Saves to ~/.config/choo/auth.
choo --version
Print version and exit.
Flags
| Flag | Short | Description |
|---|---|---|
--at |
-t |
Time filter (HH:MM) |
--on |
-d |
Date filter (today, tomorrow, day name, or ISO date) |
--count |
-n |
Number of results (default: 3) |
--arrivals |
Show arrivals instead of departures | |
--json |
Output raw JSON | |
--verbose |
-v |
Enable debug logging |
Station resolution
Stations can be specified as:
- CRS codes:
KGX,PAD,BRI - Aliases:
home,work(seechoo alias) - Fuzzy names:
kings cross,paddington— choo uses fuzzy matching and will suggest corrections for ambiguous or unknown input
Configuration
Config directory: ~/.config/choo/ (follows XDG via platformdirs)
auth— API credentials (user:password)aliases.json— saved station aliases
Environment variables (override config files):
| Variable | Description |
|---|---|
CHOO_AUTH |
API credentials (user:password), highest priority |
RTT_AUTH |
API credentials, fallback |
CHOO_ALIAS_HOME |
Override the home alias (any CHOO_ALIAS_* works) |
Credits
- Train data from the RealTimeTrains API
- Station data from davwheat/uk-railway-stations (ODbL)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file choo-0.1.1.tar.gz.
File metadata
- Download URL: choo-0.1.1.tar.gz
- Upload date:
- Size: 35.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91327379dd354535f07bd6a77f10930a27d266bdb790964eac43851237e58e78
|
|
| MD5 |
4718d20c8e84dc5dedaa5919785000fc
|
|
| BLAKE2b-256 |
3bf562034120f0bf538ecb5eef3cb26eca418a0eb5213c81462ea14891afb2c6
|
Provenance
The following attestation bundles were made for choo-0.1.1.tar.gz:
Publisher:
publish.yml on tomviner/choo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
choo-0.1.1.tar.gz -
Subject digest:
91327379dd354535f07bd6a77f10930a27d266bdb790964eac43851237e58e78 - Sigstore transparency entry: 1201233605
- Sigstore integration time:
-
Permalink:
tomviner/choo@360f95c8a9e9ace23ec253d13a5e13d53978bfdf -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/tomviner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@360f95c8a9e9ace23ec253d13a5e13d53978bfdf -
Trigger Event:
release
-
Statement type:
File details
Details for the file choo-0.1.1-py3-none-any.whl.
File metadata
- Download URL: choo-0.1.1-py3-none-any.whl
- Upload date:
- Size: 38.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19d1848616de58072ad2a0891fb6676df45f12a18c72dcca7b96573e66f529c1
|
|
| MD5 |
9328c2d069f83fb37f35249712f51dd3
|
|
| BLAKE2b-256 |
142d1b74a089dec20f3e777ae422afa17da695f0d3cc67f6e5ff2fee6349176e
|
Provenance
The following attestation bundles were made for choo-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on tomviner/choo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
choo-0.1.1-py3-none-any.whl -
Subject digest:
19d1848616de58072ad2a0891fb6676df45f12a18c72dcca7b96573e66f529c1 - Sigstore transparency entry: 1201233606
- Sigstore integration time:
-
Permalink:
tomviner/choo@360f95c8a9e9ace23ec253d13a5e13d53978bfdf -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/tomviner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@360f95c8a9e9ace23ec253d13a5e13d53978bfdf -
Trigger Event:
release
-
Statement type: