db-cli

A CLI for Deutsche Bahn.

Usage no npm install needed!

<script type="module">
  import dbCli from 'https://cdn.skypack.dev/db-cli';
</script>

README

db-cli

A command line client for Deutsche Bahn.

npm version build status ISC-licensed gitter channel support me on Patreon

Installing

npm install -g db-cli

Or just run it using npx.

Usage

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

Related

Contributing

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.