A CLI tool to display upcoming SF Bay Area transit times using the 511.org API.
go install github.com/tessro/muni@latestOr build from source:
go build -o muni .Create ~/.munirc:
api_key = "your-511-api-key"
[[stops]]
agency = "SF"
stop_code = "15731"
name = "Powell Station Outbound"
[[stops]]
agency = "SF"
stop_code = "15727"
name = "Montgomery Inbound"Get your API key at https://511.org/open-data/token
Stop codes can be found via the 511.org GTFS data or by looking at stop URLs on transit agency websites.
Common agency codes:
SF- SF MuniBA- BARTCT- CaltrainAC- AC Transit
$ muni
Powell Station Outbound
-----------------------
N Judah via Duboce 3*, 12*, 24
Montgomery Inbound
------------------
N Caltrain Depot 5*, 18*
* = real-time
Occupancy is shown when available: [ ] (seats), [== ] (standing),
[===] (full).
Results are cached for 1 minute at ~/.cache/muni/cache.json to help with
the draconian API rate limit (60 req/hr). You will still exceed it if you
use the tool frequently with a lot of stops configured.
MIT