Skip to main content

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 (see choo 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

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

choo-0.1.1.tar.gz (35.1 kB view details)

Uploaded Source

Built Distribution

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

choo-0.1.1-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

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

Hashes for choo-0.1.1.tar.gz
Algorithm Hash digest
SHA256 91327379dd354535f07bd6a77f10930a27d266bdb790964eac43851237e58e78
MD5 4718d20c8e84dc5dedaa5919785000fc
BLAKE2b-256 3bf562034120f0bf538ecb5eef3cb26eca418a0eb5213c81462ea14891afb2c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for choo-0.1.1.tar.gz:

Publisher: publish.yml on tomviner/choo

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

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

Hashes for choo-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 19d1848616de58072ad2a0891fb6676df45f12a18c72dcca7b96573e66f529c1
MD5 9328c2d069f83fb37f35249712f51dd3
BLAKE2b-256 142d1b74a089dec20f3e777ae422afa17da695f0d3cc67f6e5ff2fee6349176e

See more details on using hashes here.

Provenance

The following attestation bundles were made for choo-0.1.1-py3-none-any.whl:

Publisher: publish.yml on tomviner/choo

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