db-cli
A CLI for Deutsche Bahn train departures and journeys
Description
db-cli is a command-line client for Deutsche Bahn, the German railway service. It lets you look up train departures from any station and search for connections between two stations, all from the terminal. Supports filtering by transportation type (ICE, IC, RE, S-Bahn, bus, etc.), custom time windows, and station lookup by name or number. Built on top of the Deutsche Bahn API.
Install
npm install -g db-cliAI Summary
Command-line client for querying Deutsche Bahn train departures and journey connections.
Capabilities
- + Look up live departures from any Deutsche Bahn station
- + Search journey connections between two stations
- + Filter by transportation type (ICE, IC, RE, RB, S-Bahn, bus, etc.)
- + Specify custom departure times and time windows
- + Look up stations by name or station number
- + Use current location to find nearby stations (macOS only)
Use When
- → You need to quickly check train departures from a German station
- → You want to find connections between two Deutsche Bahn stations from the terminal
- → You prefer CLI tools over opening the DB Navigator app or website
Avoid When
- x You need to book tickets (this tool only shows schedules)
- x You need train schedules outside of Germany
- x You need real-time delay information beyond departure data
Usage Patterns
Check departures from a station
db-dep 'Berlin Hbf' Shows upcoming departures from Berlin Hauptbahnhof
Search for a journey
db-journey 'Berlin Hbf' 'München Hbf' Finds connections from Berlin to Munich
Departures with custom time
db-dep 'Köln Hbf' --when 'tomorrow 8am' Shows departures from Cologne tomorrow morning
Filter by transport type
db-journey 'Hamburg Hbf' 'Frankfurt Hbf' --products ICE,IC Shows only long-distance train connections