salbus
Salamanca's city buses in real time from the terminal. Every subcommand prints JSON and, with no subcommand, it opens an interface with stop search, arrivals and a live map.
I wanted to know how long until the bus without opening the website. It is still in development: it works, but it keeps changing from one week to the next. salbus makes the same anonymous requests the official site makes from the browser and gives them back two ways: as JSON, for scripts and other tools, and as a terminal interface for me to look at.

Usage#
salbus # terminal interface
salbus stops gran via # find stops by name or number
salbus arrivals 28 # next buses at stop 28
salbus watch 28 # one JSON line whenever arrivals change
salbus positions -l 7 # where the line 7 buses are right nowOutput goes to stdout as JSON and errors to stderr, so it pipes into jq:
salbus arrivals 28 | jq -r '.arrivals[] | "\(.minutes) min L\(.line) \(.destination)"'Terminal interface#
| Tab | What it shows |
|---|---|
| Stops | Search that ignores accents and case, and where the stop sits in the city |
| Arrivals | One card per saved stop, refreshed every 30 s |
| Map | Streets, river, stops and live buses, refreshed every 5 s, with zoom and drag |


You can drive it with the keyboard or the mouse, and it comes in Spanish and English with a light and a dark theme. The map is drawn with braille characters over OpenStreetMap data.
Sn4pe/salamanca-busSalamanca's city buses in real time: JSON CLI and TUI. Unofficial.Rust