Skip to content

tessro/muni

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

muni

A CLI tool to display upcoming SF Bay Area transit times using the 511.org API.

Installation

go install github.com/tessro/muni@latest

Or build from source:

go build -o muni .

Configuration

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

Finding stop codes

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 Muni
  • BA - BART
  • CT - Caltrain
  • AC - AC Transit

Usage

$ 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).

Caching

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.

License

MIT

About

A CLI tool to display upcoming SF Bay Area transit times

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages