SBB-TUI: TUI Client for Switzerland's Public Transport Timetables
SBB-TUI: A Terminal Companion for Switzerland’s Public Transport Timetables
In the world of open data and fast, distraction-free tools, SBB-TUI stands out as a lean, purpose-built terminal client for Switzerland’s public transport timetables. Inspired by the familiar Swiss Federal Railways (SBB/CFF/FFS) app, this TUI (Text User Interface) puts the power of live schedules, connections, and journey details at your fingertips without leaving the command line. The project embraces open data, community collaboration, and a design that emphasizes speed, accuracy, and a touch of nerdy charm.
What SBB-TUI Delivers
SBB-TUI is more than a simple lookup tool; it is a focused workspace for planning trips across Switzerland and its neighboring regions. It brings together multiple transport modes—train, tram, bus, boat, cable cars, and even funiculars—into a single, coherent view. The interface presents the essential information in a readable, keyboard-friendly format, with a design language that nods to the SBB brand while keeping a compact terminal aesthetic.
Key capabilities include:
- Any station: Quickly search connections between any Swiss (and neighboring) public transport stations. The system is built to handle point-to-point trips as well as more complex itineraries that involve transfers and multiple legs.
- Any transport: It isn’t limited to trains alone. Expect coverage for trains, trams, buses, boats, cable cars, and even funiculars—ensuring you can plan journeys in a broad range of Swiss transport networks.
- Detailed journey view: When you select a result, you’ll see the full journey with transfers, platform information, any delays, vehicle types, and even walking sections between lines. It’s a comprehensive snapshot of the trip’s logistics.
- Autocompletion of station names: Typing becomes faster and more accurate as you receive suggestions that match common stations and variants.
- CLI flags to pre-fill fields: For quick lookups, you can set default departure or arrival stations, dates, and times from the command line.
- Clickable Google Maps links for walking sections: Seamless integration with maps makes last-mile segments easy to verify and visualize.
- SBB branding and styling: The look-and-feel borrows the familiar SBB cues, with Nerd Font icons recommended for a richer, visually engaging terminal experience. If Nerd Font isn’t available, a Unicode fallback keeps things usable.
Documentation and How-To Library
SBB-TUI ships with a concise, practical documentation structure that mirrors how people actually use terminal tools. The documentation is organized to help new users install, understand usage patterns, configure preferences, and explore options. The sections map to real-world tasks:
- Install
- Usage
- Configuration
- Options
- Why
- Help Wanted
You’ll also find notes about contributing and an invitation to join the ongoing evolution of the project.
Install: How to Get SBB-TUI on Your System
SBB-TUI can be installed through several popular package managers and build routes. Each method is designed to get you up and running quickly, with fallbacks for environments where prebuilt binaries aren’t readily available.
Homebrew
- A straightforward path for macOS users and those who maintain Homebrew environments: brew install necrom4/tap/sbb-tui
Go
- If you prefer to pull a binary directly from the Go toolchain: go install github.com/necrom4/sbb-tui@latest
AUR (Arch User Repository)
- For Arch Linux enthusiasts and users of Yay or similar AUR helpers: yay -S sbb-tui (or equivalent AUR package manager)
Nixpkgs
- For users of the Nix package ecosystem: sbb-tui is available in nixpkgs-unstable, or you can try a temporary installation with: nix-shell -p sbb-tui
Direct binaries and builds
- If you’d rather download a prebuilt executable, you can grab it from the project’s Releases page: https://github.com/Necrom4/sbb-tui/releases
Build from Source
- If you want to build from the repository yourself, you can clone and compile: git clone https://github.com/necrom4/sbb-tui.git cd sbb-tui go build
Note: The project’s initial release is v1.0.0. While v1.x.x is considered experimental/unstable in terms of breaking changes, the project maintains a changelog documenting all changes. This approach balances early feedback with a stable feature set.
Usage: Getting Started with sbb-tui
Once installed, using SBB-TUI is a simple, repeatable workflow designed for speed and reliability.
Step 1: Run sbb-tui Launch the program from your terminal to enter the interactive TUI.
Step 2: Input departure and arrival Use the Tab key to navigate between the departure and arrival fields. Enter your stations to begin a journey search.
Step 3: Add optional information You can specify the date and time, and indicate whether the provided time is for departure or arrival. These fields help constrain results to your planned travel window.
Step 4: View results Press Enter to fetch the timetable results. Use the arrow keys to navigate results and explore each leg of the journey in detail.
Configuration: Personalize Your TUI Experience
SBB-TUI supports a per-user config file to tailor the look and behavior to your preferences. The default path is $HOME/.config/sbb-tui/config.yaml, but the project is friendly to OS-specific conventions as well. For macOS, you’ll also find support for the traditional macOS application support path.
A sample configuration demonstrates a design system that favors high-contrast readability and a clean, compact layout:
ui: nerdfont: true theme: text: "#FFFFFF" textMuted: "#888888" error: "#D82E20" warning: "#D82E20" borderFocused: "#D82E20" borderUnfocused: "#484848" keysFg: "#FFFFFF" keysBg: "#484848" vehicleFg: "#FFFFFF" vehicleBg: "#2E3279" badgeModelFg: "#FFFFFF" badgeModelBg: "#D82E20" badgeCompanyFg: "#484848" badgeCompanyBg: "#FFFFFF" logo: "#FFFFFF"
Alongside this YAML example, the project points to a collection of themes you can explore in the docs. The themes document sits at docs/themes.md and provides inspiration for how to style SBB-TUI in different visual moods.
Options: Command-Line Flags for Power Users
SBB-TUI exposes a compact set of flags to prefill or customize behavior. The typical workflow with flags is to set initial values that save you keystrokes when you run the tool multiple times.
Usage overview
- sbb-tui --help
Flags:
- --arrival: Use arrival time instead of departure time
- --date string: Pre-fill date (DD.MM.YYYY)
- --from string: Pre-fill departure station
- --nerdfont: Use Nerd Font icons (true by default); set to false to fall back to Unicode
- --time string: Pre-fill time (HH:MM)
- --to string: Pre-fill arrival station
- -v, --version: Print version and exit
Why SBB-TUI: The Motivation Behind the Project
The creator’s use case—traveling four hours a day and sometimes working from the train—shaped a clear set of priorities. In remote Swiss regions, loading the SBB website could be slow on a mobile data connection, making it painful to plan next steps. The goal was to provide a fast, responsive tool that fetches only the necessary data and preserves user privacy by avoiding unnecessary data sharing with third parties.
This project aligns with open-source values: it leverages the Swiss public transport API and embraces community collaboration. The developer’s intent was to create a fast, efficient solution that respects user data and can be extended by others who want to contribute.
Open-source enthusiasts will appreciate the project’s transparency around versioning and changes. The changelog documents updates so users can anticipate breaking changes and adaptation steps even within minor version bumps.
Help Wanted: Contribute and Grow
SBB-TUI is described as a living project, with ongoing improvements driven by volunteers who care about open-source tooling for public transport. The repository explicitly welcomes contributors—whether you’re a student, a professional, or simply curious—who want to learn how to collaborate on real-world code and projects. If you’re eager to contribute, you’ll find issues labeled help wanted and good first issue that are suitable for a range of skill levels.
Before contributing, there are guidelines in CONTRIBUTING.md to help you prepare a quality PR. The project encourages new contributors to read, propose changes, and submit patches that improve code quality, tests, and documentation. The invitation is friendly: there’s plenty to do, and the “train” is always rolling.
Star History and Community Activity
SBB-TUI’s ongoing evolution is reflected in its community engagement and activity metrics. A Star History chart summarizes the project’s popularity over time, providing a visual sense of the community’s support and interest. The chart is hosted by an external service and provides a date-based view of stars over time, giving a quick glimpse into project momentum. If you’re curious about the project’s reception, you can explore the Star History link as a way to gauge ongoing community enthusiasm.
Imagery and Visuals: What You’ll See
The project includes a demo image that captures the feel of SBB-TUI in action. This image helps potential users understand how the terminal interface presents station inputs, journey results, and the general layout of information. In the realm of terminal applications, visuals play an important role in conveying how data is organized and navigated.
- Demo interface: The included demo image provides a snapshot of the UI’s aesthetic, which balances clarity with a compact typographic footprint.
- Star History visualization: The star history chart gives a sense of project vitality and ongoing maintenance, indicating that the tool is actively supported and used by a growing audience.
Why This Tool Matters
- Speed and efficiency: The critical advantage of a terminal-based planner is speed. When you need to check connections during a commute or while on the move, a lightweight, fast interface can be dramatically more responsive than a web page, especially on slow networks.
- Data-minimization philosophy: By fetching only the data needed for your query, SBB-TUI aligns with a privacy-conscious approach to information access—an important consideration in the era of pervasive data collection.
- Open-source collaboration: The project embodies the collaborative spirit of the open-source community. Anyone can inspect how the tool works, adapt it to new needs, or contribute improvements.
A Look at the Experience
Using SBB-TUI, you can imagine a workflow where you begin by specifying a departure station, an arrival station, and a travel window. The journey view reveals each leg, indicating transfers, platforms, and potential delays. If you care about walking segments, you’ll see those steps and can verify map routes through Google Maps links that the tool generates. The typographic choices, combined with Nerd Font icons, aim to deliver an aesthetically pleasing and legible terminal experience—one that remains functional even under low-bandwidth conditions.
Conclusion: A Practical, Community-Driven Tool for Swiss Travel
SBB-TUI represents a thoughtful blend of practical, data-driven travel planning and the community-driven ethos of open-source software. It offers a robust set of features that cover practical needs for Swiss public transport travelers: flexible station searches, multi-modal coverage, rich journey details, autocompletion, map integration, and theming suitable for a terminal environment. The documentation is clear and structured to help new users get started quickly, while also supporting power users who may want to customize appearance or prefill common queries through CLI arguments.
For those who want to contribute, there is a clear invitation to engage—whether you’re fixing a bug, adding a feature, or improving the documentation. The project provides a pathway for new contributors to learn, grow, and participate in a real-world, open-source effort.
If you’re a frequent traveler through Switzerland’s diverse landscapes, or you simply enjoy elegant command-line tooling, SBB-TUI offers a compelling workflow that respects your time and your data. It’s a reminder that even in a world of glossy apps and complex web services, small, focused tools can deliver reliable, high-quality experiences—especially when the community rallies around a shared goal.
Images featured in this post
- Demo interface: The project includes a demo image that showcases the terminal UI in action. This helps readers visualize what to expect when using SBB-TUI on their own systems.
- Star History: A chart illustrating the project’s star history is available to give a sense of ongoing community support and activity across releases.
If you’d like to explore more about SBB-TUI, consider checking out the project repository for installation instructions, usage tips, and the latest updates. The tool’s combination of speed, modularity, and open-source collaboration makes it a compelling option for anyone who wants a practical, privacy-respecting way to plan Swiss public transport journeys directly from the terminal. The journey, after all, begins with a single command.
Enjoying this project?
Discover more amazing open-source projects on TechLogHub. We curate the best developer tools and projects.
Repository:https://github.com/Necrom4/sbb-tui
GitHub - Necrom4/sbb-tui: SBB-TUI: TUI Client for Switzerland's Public Transport Timetables
SBB-TUI is an open-source AI assistant...
github - necrom4/sbb-tui