A command line client for Deutsche Bahn.
npm install -g db-cli
Or just run it using npx
.
db-dep [station] [options]
Arguments:
station Station number (like 8000191) or search string (like "Karlsruhe Hbf").
Options:
--location -l Use current location. OS X only.
--duration -d Show departures for the next n minutes. Default: 15
--when -w A date & time string like "tomorrow 2 pm". Default: now
--products -p Allowed transportation types.
Default: ICE,IC,EC,RE,RB,IR,S,B,F,U,T,Taxi
db-journey [origin] [destination] [options]
Arguments:
origin Station number (e.g. 8000191) or query (e.g. "Karlsruhe Hbf").
destination Station number (e.g. 8000191) or query (e.g. "Karlsruhe Hbf").
Options:
--results -r The number of journeys to show. Default: 4
--products -p Allowed transportation types.
Default: ICE,IC,EC,RE,RB,IR,S,B,F,U,T,Taxi
--when -w A date & time string like "tomorrow 2 pm". Default: now
- db-hafas – JavaScript client for the DB HAFAS API.
- hafas-cli – Build a command line interface for any HAFAS endpoint.
1.db.transport.rest
Deutsche Bahn public transport API- db-prices – Find the cheapest routes using the DB Sparpreise API.
- db-stations – An offline list of all DB stations.
- vbb-cli – A CLI for Berlin & Brandenburg public transport.
If you have a question or have difficulties using db-cli
, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.