run
Synopsis
Section titled “Synopsis”gapline run <file.gl>Description
Section titled “Description”run reads a .gl batch file, loads the feed declared by its first feed directive into memory, and executes the listed commands in order. The feed stays in memory between steps; disk is only touched when the script reaches a save directive.
Scripts are sequential and stop-on-error: the first failure halts execution, and the feed is not persisted unless an earlier save had already been reached. This makes .gl files safe to re-run idempotently.
run does not accept CLI flags beyond the global ones — all per-command options live inside the script. Nested run is not supported.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
<file.gl> | Path to the .gl batch file. Required, positional. |
Options
Section titled “Options”run has no command-specific flags. See global flags for the options that apply to every sub-command.
Example
Section titled “Example”# Load the feed once — subsequent commands operate on it in memory.feed ./data/gtfs.zip
# Prune retired routes and anything referencing them.delete trips --where "route_id=OLD_LINE" --confirm
# Normalise the route short name.update routes --where "route_id=R1" --set route_short_name="1" --confirm
# Final validation, machine-readable, written to disk.validate --format json -o report.json
# Atomic write — only reached if every previous step succeeded.save ./data/gtfs-patched.zipRun the script:
gapline run weekly-fix.glExit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | Every command completed. The feed was saved if and only if save was reached. |
1 | A command in the script failed. The feed on disk is unchanged. |
2 | The script itself has a syntax error (unknown directive, malformed line). |
3 | I/O error (script file missing, feed unreadable, save path unwritable). |
See concepts/exit-codes for the complete table.
See also
Section titled “See also”.glsyntax reference — full grammar and directives.- Concepts /
.glsession model — how in-memory state andsaveinteract. - Guides / Writing
.glscripts.