π TfL CLI

A fast and minimal terminal app to check Transport for London (TfL) status and live departures, written in Go.

β¨ Features
- Live status of TfL lines (Tube, Overground, Elizabeth Line, DLR)
- Real-time departures for any TfL station
- Config management to set preferences, such as home and work stations
π¦ Installation
go install github.com/jamesalexatkin/tfl-cli@latest
π Usage
Line status (all lines)
tfl-cli status
TODO - Line status (single line)
tfl-cli status victoria
Live departures from a station
tfl-cli station 'Liverpool Street'
Help
tfl-cli h
tfl-cli help
tfl-cli -h
tfl-cli --help
βοΈ Configuration
The first time you run the app, a default .tfl.env file will be generated.
You will need to configure API credentials here before fetching any data. These can be generated by signing up for a free account on TfL's API portal.
Options
| Key |
Description |
app_id |
(Required) Your TfL API App ID for increased rate limits. |
app_key |
(Required) Your TfL API Key. Used together with app_id. |
departure_board_width |
Sets the character width for the departure board display. Handy for wide or narrow terminals. |
num_departures |
Sets the number of departures to display on a departure board. |
home_station |
Sets your default "home" station. Use with the station command. |
work_station |
Sets your default "work" station. Use with the station command. |
π οΈ Built with
π€ Contributing
Pull requests welcome! If you have ideas or bug reports, feel free to open an issue.
π License
MIT Β© 2025 James Atkin