Skip to content

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

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.

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 --where query language. Referential integrity is enforced before anything hits disk.
  • Script.gl batch files chain validation and CRUD operations in a single pass, holding the feed in memory between steps for one atomic save at the end.
gaplinegtfs-validatortransitland-lib
RuntimeSingle static binaryJava / JVMGo binary or library
Validation speed (typical feed)~1×7–9× slowercomparable
RAM on typical feeds~8 MB~400 MB~30 MB
CRUD operations
Scripting✅ (.gl files)partial
Offline / local-first
Shell completion with dynamic IDs
LicenseGPL-3.0 (core: MIT)Apache-2.0MIT
  • 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 (.gl script in version control).
  • Your data cannot leave the machine.

Ready to try it on a real feed? The Quickstart takes about five minutes.