Skip to content

CLI Reference

The continuous-gtfs CLI runs pipelines locally for development and testing.

continuous-gtfs dag

Show the resolved DAG for a pipeline folder.

continuous-gtfs dag <pipeline_dir>
continuous-gtfs dag <pipeline_dir> --json

Example:

$ continuous-gtfs dag sound-transit/
DAG: 16 steps
  1. clear_1line_short_name [builtin] ['trips.txt']
  2. clear_2line_short_name [builtin] ['trips.txt']
  3. remove_inactive_calendars [builtin] ['calendar.txt']
  4. remove_llr_calendar [builtin] ['calendar.txt'] (after: remove_inactive_calendars)
  ...

With --json, outputs ReactFlow-compatible JSON (nodes + edges) for visualization.

continuous-gtfs schedule

Run the schedule pipeline on a GTFS zip file.

continuous-gtfs schedule <zip_file> <pipeline_dir> [options]
Option Description
-o, --output FILE Write output GTFS zip to file
--env NAME Environment name (default: production)

Example:

$ continuous-gtfs schedule data/schedule.zip sound-transit/ -o output.zip
Schedule pipeline: 632.6ms
  Input:  22 files, 178485 rows
  Output: 22 files, 178461 rows
  ingest: 105.3ms
  validate_input: 20.8ms
  transform: 22.1ms
  validate_output: 12.4ms
  package: 472.0ms
  Written to output.zip

Pipeline stages

Stage Description
ingest Extract zip to Polars DataFrames (all string columns)
validate_input Check required files, required fields, referential integrity
transform Execute the step DAG
validate_output Re-validate after transforms
package Re-zip DataFrames to GTFS zip

continuous-gtfs realtime

Run the realtime pipeline on a protobuf file.

continuous-gtfs realtime <pb_file> <pipeline_dir> [options]
Option Description
-o, --output FILE Write output protobuf to file
--json-output FILE Write output JSON to file
--env NAME Environment name (default: production)

Example:

$ continuous-gtfs realtime data/rt/vehicle_positions.pb sound-transit-rt/ -o out.pb --json-output out.json
RT pipeline: 5.5ms
  Input:  16 entities (4705 bytes)
  Output: 16 entities
    PB:   4705 bytes
    JSON: 23620 bytes
  PB written to out.pb
  JSON written to out.json

Pipeline stages

Stage Description
decode Parse protobuf bytes into FeedMessage
transform Execute the step DAG
encode PB Serialize FeedMessage to protobuf bytes
encode JSON Serialize FeedMessage to JSON string