efa is a command line client for the http://efa.vrr.de/ Web interface. It can request itineraries based on various parameters, such as date/time, preferred train types, or a more precise route. Note that this software is not really useful if you're living outside of Germany.