TUI client for Switzerland's public transports timetables, inspidered by the SBB/CFF/FFS app.
- 📍 Any station: search connections between any Swiss (and neighbouring) public transport stations
- 🚆 Any transport: train, tram, bus, boat, cable cars (and even funiculars!)
- 🧾 Detailed journey view with: transfers, platforms, delays, vehicle information and walk sections
- ➡️ Autocompletion of station names
- 🚩 CLI flags to pre-fill fields for quick lookups
- 🧭 Clickable Google Maps links for walking sections
- <+> SBB brand styling with Nerd Font icons (Nerd Font recommended, Unicode fallback via
--no-nerdfont)
# homebrew
brew install necrom4/tap/sbb-tui
# go
go install github.com/necrom4/sbb-tui
# aur
yay -S sbb-tuior download your preferred executable from Releases
git clone https://github.com/necrom4/sbb-tui.git
cd sbb-tui
go build- Run
sbb-tui - Input departure and arrival locations (navigate with
tab). - Add optional information such as date, time, and whether those are for departure or arrival.
- Press
Enterto view the results (navigate with arrows).
Add your optional config at $HOME/.config/sbb-tui/config.yaml
OS default config paths are also supported (such as
~/Library/Application Support/sbb-tui/config.yamlin macOS)
# default configuration
theme:
text: "#FFFFFF"
errorText: "#D82E20"
ghostText: "#888888"
activeBorder: "#D82E20"
inactiveBorder: "#484848"
warningFlag: "#D82E20"
keysFg: "#FFFFFF"
keysBg: "#484848"
vehicleFg: "#FFFFFF"
vehicleBg: "#2E3279"
modelFg: "#FFFFFF"
modelBg: "#D82E20"
companyFg: "#484848"
companyBg: "#FFFFFF"
logo: "#FFFFFF"More themes can be found at docs/themes.md
# sbb-tui --help
sbb-tui - Swiss SBB/CFF/FFS timetable app for the terminal
Usage:
sbb-tui [flags]
Flags:
--arrival Use arrival time instead of departure time
--date string Pre-fill date (DD.MM.YYYY)
--from string Pre-fill departure station
--no-nerdfont Use Unicode fallback icons instead of Nerd Font icons
--time string Pre-fill time (HH:MM)
--to string Pre-fill arrival station
-v, --version Print version and exitI travel 4 hours a day and often work from the train, passing through remote regions of Switzerland where loading the SBB website alone can take up to an entire minute before I've even had a chance to search for my next connection (back when I started building this, my cellular data plan provided me with 500kb/s at most in the city). On top of that, I love open source and disliked handing data over to corporations unnecessarily, so I loved the idea of a faster solution that only fetched the necessary data, the one I requested. One day, while exploring the idea of building my first TUI, I stumbled upon the incredible Swiss public transport API and I knew I'd found the perfect occasion to start!
SBB-TUI is in constant improvement thanks to the work of many volunteers passionate about this little tool. This project is a very good playground for those who want to learn to collaborate in open source projects and improve the way they architecture their code and commit it. Wether you're a novice or a professional, don't be scared to hop on the train!
There's plenty of Issues of different complexity levels, many tagged with help wanted or good first issue.
So if you're up for the challenge, read CONTRIBUTING.md, create your PR, and start coding!