Skip to content
Back to projects

Gapline

Featured
April 19, 2026in progress

Gapline is an open-source CLI for local GTFS workflows.

Why this project exists?

GTFS (General Transit Feed Specification) is the standard behind every public transit app, trip planners, maps, realtime arrival boards. Yet the tooling that agencies and data engineers use to produce, validate, and maintain these feeds is stuck in the past:

  1. The tools are fragmented in doing one job and one job only.
  2. Slow Java/Python validators that choke on feeds with millions of rows in stop_times.txt
  3. Cloud-hosted validators that force operators to ship sensitive network data to third parties with no privacy guarantees Gapline collapses this mess into a single, coherent platform — local-first when you need privacy and speed, collaborative when you need traceability and simulation.

The open-source CLI is distributed via cargo install gapline and uses git-style subcommands (validate, read, create, update, delete, run).

  • Comprehensive validation engine: a 6-section gated pipeline with 200+ rules covering file structure, CSV formatting, field typing, foreign keys, primary key uniqueness, and semantic checks like stop-sequence monotonicity or frequency overlap detection. Parsing and rule execution run in parallel to achieve high performance.
  • 17 GTFS file types parsed: agency, stops, routes, trips, stop_times, calendar, calendar_dates, shapes, frequencies, transfers, pathways, levels, feed_info, fare_attributes, :fare_rules, translations, attributions.
  • Referential integrity, enforced: a bidirectional reverse-index across the 12+ foreign-key relationships of GTFS. CRUD operations that would break integrity are rejected with a full dependency chain; cascade deletes require explicit confirmation listing every affected record.
  • Full CRUD with a mini query language: --where filtering, --set for field updates, --confirm for unattended automation in CI pipelines.
  • .hw batch files: session-based scripts with feed / save directives. All operations execute in memory, without repeated disk I/O between steps, all from one file committed alongside your data pipeline.
  • Multi-format output: colored terminal text, support for JSON, XML, CSV and HTML output. Shell completion for bash, zsh, fish.