Introduction
gapline is a single Rust binary for the full GTFS Schedule lifecycle: validation, querying, editing, and scripting. It runs offline, is driven entirely from the command line, and is built to slot into CI pipelines.
GTFS in one paragraph
Section titled “GTFS in one paragraph”GTFS Schedule is the open format public-transit agencies use to publish their timetables. A feed is a ZIP archive of CSV files (stops.txt, routes.txt, trips.txt, stop_times.txt, and so on) describing routes, stops, schedules, and fares. If your app shows transit on a map, routes a passenger, or computes an ETA, it consumes a GTFS feed somewhere in the stack.
The problem
Section titled “The problem”Working with GTFS today means juggling several disconnected tools:
- MobilityData
gtfs-validator— Java-based, authoritative, but heavy. Cold-start on the JVM is slow, memory use is in the hundreds of megabytes, and there is no built-in way to edit a feed. - Hand-rolled Python scripts — Every team ends up writing their own pipeline to clean feeds (fix FK violations, update stop coordinates, strip expired calendars). Hard to share, easy to break.
- Web-based validators — Convenient for a one-off check, but they require uploading the feed. Not an option for private data or CI pipelines.
Three tools, three workflows, no shared surface. Switching between them burns time and introduces drift.
What gapline does
Section titled “What gapline does”One binary, three capabilities:
- Validate — Every rule from GTFS Schedule, grouped by severity (
ERROR,WARNING,INFO). Each finding points to file, line, field, and value. - Edit — Read, create, update, and delete records with a concise
--wherequery language. Referential integrity is enforced before anything hits disk. - Script —
.glbatch files chain validation and CRUD operations in a single pass, holding the feed in memory between steps for one atomic save at the end.
Compared to the rest of the ecosystem
Section titled “Compared to the rest of the ecosystem”| gapline | gtfs-validator | transitland-lib | |
|---|---|---|---|
| Runtime | Single static binary | Java / JVM | Go binary or library |
| Validation speed (typical feed) | ~1× | 7–9× slower | comparable |
| RAM on typical feeds | ~8 MB | ~400 MB | ~30 MB |
| CRUD operations | ✅ | ❌ | ❌ |
| Scripting | ✅ (.gl files) | ❌ | partial |
| Offline / local-first | ✅ | ✅ | ✅ |
| Shell completion with dynamic IDs | ✅ | ❌ | ❌ |
| License | GPL-3.0 (core: MIT) | Apache-2.0 | MIT |
When to reach for gapline
Section titled “When to reach for gapline”- You run GTFS validation in CI and care about pipeline time.
- You need to fix a feed programmatically, not just report on it.
- You want a reproducible, committable cleanup pipeline (
.glscript in version control). - Your data cannot leave the machine.
Next step
Section titled “Next step”Ready to try it on a real feed? The Quickstart takes about five minutes.