Atomic CLI for MTA system train departures (NYC Subway, LIRR, Metro-North)
No dependencies. No config. Just trains.
Most train apps are bloated. This is one shell script.
Via Homebrew:
brew tap gumadeiras/tap
brew install gotrainVia npm:
npm install -g gotrainOne-liner (Universal Bash):
curl -sL https://github.com/raw/gumadeiras/gotrain-cli/main/install.sh | bash# Search stations
gotrain stations penn # Search for "penn"
gotrain stations # List all stations
# Departures & Arrivals
gotrain departures MNR-149 # Departures from New Haven
gotrain departures nh --to MNR-1 # Filter departures to Grand Central (using alias)
gotrain arrivals MNR-1 # Arrivals at Grand Central
gotrain arrivals MNR-1 --from nh # Filter arrivals from New Haven
# Service alerts
gotrain alerts # Active service alerts
# Favorites
gotrain favs add MNR-149 nh # Add with alias 'nh'
gotrain favs rm nh # Remove by alias
gotrain favs # List favorite stations$ gotrain stations "new haven"
π₯ MNR β New Haven (CT) Lines: New Haven βΏ ID: MNR-149
π₯ MNR β New Haven-State St (CT) Lines: New Haven βΏ ID: MNR-150
$ gotrain departures MNR-149
Departures for New Haven (MNR-149)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
10:39 AM EST β Grand Central (Off Peak) [Line: New Haven]
β On Time Track 1 β’ Ride 2h 04m (Train #1539)
11:24 AM EST β Grand Central (Off Peak) [Line: New Haven]
β On Time Track 2 β’ Ride 2h 01m (Train #1545)
$ gotrain arrivals MNR-1 --from nh
Arrivals for Grand Central (MNR-1)
Origin: New Haven (MNR-149)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
12:43 PM EST β Grand Central (Off Peak) [Line: New Haven]
β On Time No Track β’ Dep 10:39 AM EST β’ Ride 2h 04m (Train #1539)
$ gotrain favorite add MNR-149 home
Added MNR-149 to favorites (Alias: home) β
$ gotrain departures home
π¦ Departures for New Haven (MNR-149)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
...
$ gotrain alerts
β οΈ Uptown [4][5] trains are running with delays...
No description....| Command | Description |
|---|---|
stations [query] |
Search/list stations |
departures <id> [--to <id>] |
Show departures (optional destination filter) |
arrivals <id> [--from <id>] |
Show arrivals (optional origin filter) |
alerts [--station <id>] [--all] |
Active service alerts (optional station filter, all alerts) |
| `favs [add | rm] [id] [alias]` |
This tool is available as a ClawdHub skill! Use it from any chat where Clawdbot is connected.
- Skill:
gotrainon ClawdHub
Powered by MetroFlow API β real-time MTA transit data.
PRs are welcome! If you find any bugs or have feature requests, please open an issue.
- Development: Run
npm testandnpm run buildto verify changes locally. - Style: Keep the CLI small and direct.
./scripts/committer "message" path...: stage only the listed paths and create a commit./scripts/release check 1.2.1: verify synced release versions and run the release test gates./scripts/release run 1.2.1: bump versions, run tests, package artifacts, tag, push, wait for the release workflow, publish npm, and update Homebrew
Release CI publishes to npm with trusted publishing.
MIT π§
