Skip to content
← Projects

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.

2026repo00
rustratatuiclap#cli#tui#salamanca#transit

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.

The Stops tab in salbus: the search box with the list of stops and the lines that serve each one, and on the right the city map with the selected stop.
The Stops tab, which works offline from the bundled stop list.

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 now

Output 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#

TabWhat it shows
StopsSearch that ignores accents and case, and where the stop sits in the city
ArrivalsOne card per saved stop, refreshed every 30 s
MapStreets, river, stops and live buses, refreshed every 5 s, with zoom and drag
Searching "gran via" in salbus: five stops on Gran Vía with the lines that serve each one, one of them starred as saved, and the selected stop placed on the map.
Search ignores accents and case. The star marks a saved stop.
The salbus map zoomed in on the centre of Salamanca: streets, the river Tormes, stops, labels for Plaza Mayor, Hospital and Estación de tren, a saved stop marked with a star and an empty lines-in-service panel.
The map, zoomed in on the centre. Taken without live data, which is why there are no buses.

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