1
0
Fork 0
A simple command-line timetable for Swiss public transport
Find a file
2026-02-01 00:06:01 +01:00
vendor chore(deps): Vendor dependencies 2026-02-01 00:03:07 +01:00
.gitignore Initial commit 2025-08-10 12:49:17 +02:00
CHANGELOG.md chore(release): prepare for v0.2.0 2026-02-01 00:06:01 +01:00
go.mod Initial commit 2025-08-10 12:49:17 +02:00
go.sum Initial commit 2025-08-10 12:49:17 +02:00
LICENSE chore: Add license 2026-01-31 22:54:30 +01:00
main.go feat: Add version info 2026-01-31 23:06:43 +01:00
Makefile chore(release): prepare for v0.2.0 2026-02-01 00:06:01 +01:00
README.md feat: Add version info 2026-01-31 23:06:43 +01:00

abfahrt 🚂 🚆 🚄 🚅 🚍 🚊 🚢 🚡

abfahrt is a small cli tool to find public transport connections in Switzerland. It uses routing-data from transport.opendata.ch.

Example

you@some ~> abfahrt Basel Bern

  │ Basel SBB (14:56) --------------- [ 1h0m ] --------------- Bern (15:56)  

    • 🚄 IC6	Basel SBB (14:56, 7!)  ⟼  Bern (15:56, 6)

  │ Basel SBB (15:03) --------------- [ 1h18m ] --------------- Bern (16:21)  

    • 🌍 EC000173	Basel SBB (15:03, 6)  ⟼  Olten (15:28, 12)
    • 🚃 IR35	Olten (15:36, 9)  ⟼  Bern (16:21, 50)

  │ Basel SBB (15:16) --------------- [ 1h8m ] --------------- Bern (16:24)  

    • 🚃 IR27	Basel SBB (15:16, 15)  ⟼  Olten (15:48, 12)
    • 🚃 IR16	Olten (15:56, 8)  ⟼  Bern (16:24, 12)

  │ Basel SBB (15:28) --------------- [ 58m ] --------------- Bern (16:26)  

    • 🚄 IC61	Basel SBB (15:28, 10)  ⟼  Bern (16:26, 7)

Usage

Usage of abfahrt:
  -arrival
	    time is arrival time
  -date string
	    date for your journey, formated as YYYY-MM-DD (default: current date)
  -from string
	    start of your yourney
  -full
	    display full and detailed information
  -in duration
	    time offset for your yourney, for example 1h
  -time string
	    time for your journey, formated as hh:mm (default: current time)
  -to string
	    start of your yourney
  -transport string
	    Transportation types (comma-separated: train,tram,ship,bus,cableway)
  -version
      show version information
  -via string
	    intermediate stops, separated by ','
  • At minimum, -from and -to have to be specified
  • -in can be used to make relative timeadjustments, use - to search for connections in the past
  • If only two arguments are given, they are treated as -from and -to

Install

go install go.lks.li/abfahrt@latest