@gabrielahn/gtfs-viz-cli
v1.4.0
Published
Lightweight GTFS data visualizer and editor — CLI
Maintainers
Readme
@gabrielahn/gtfs-viz-cli
Lightweight GTFS data visualizer and editor. Browse, edit, and export transit feeds from the terminal with a local DuckDB database and browser dashboard.
GitHub | Web App | DuckDB Extension | Agent Skills
Features
- Import GTFS zips — data stored locally in DuckDB
- Browse stations, stops, routes, and pathways with filters
- Edit stations, stops, routes, and pathway connections
- Compare trip schedules and route shapes
- Export edited data back to GTFS CSV
- Browser dashboard with maps, tables, and flow editor
- AI agent skills for coding assistants
Install
npm install -g @gabrielahn/gtfs-viz-cliRequires DuckDB CLI (duckdb on PATH or DUCKDB_BIN).
Quick Start
gtfs-viz import /path/to/feed.zip # Import GTFS zip
gtfs-viz stations --name "Park" # Filter stations
gtfs-viz routes --type Bus # Filter routes
gtfs-viz station "Park Street" # Open dashboard
gtfs-viz route "Red Line" # Route info dashboard
gtfs-viz station "Park Street" --data # Print data in terminal
gtfs-viz examples # See all commandsCommands
| Command | Description |
| --- | --- |
| import <feed.zip> | Import GTFS zip into local DuckDB |
| stations [--name --pathways --wheelchair] | Browse stations with filters |
| stops [--name --location-type --wheelchair] | Browse stops with filters |
| routes [--route-id --route-name --type] | Browse routes with filters |
| station <name\|id> | Station info (dashboard or --data) |
| stop-info <name\|id> | Stop map with popup (dashboard or --data) |
| route <name\|id> | Route info (dashboard or --data) |
| station_connections <name\|id> | Connection flow graph |
| station_pathways <name\|id> | Station parts and pathways |
| station_routes <name\|id> | Timed routes between parts |
| station_shortest_route <name\|id> | Fastest entrance-to-exit route |
| add_connection / update_connection / delete_connection | Edit pathways |
| add_node / update_node / delete_node | Edit stops |
| export [--output --no-stops --no-pathways --no-routes] | Export edited GTFS as CSV |
| query --sql <sql> | Run SQL |
| edit_table [pathways\|stops\|routes] | View pending edits |
| stop | Stop dashboard session and clear session state |
| restart | Stop session and remove local DuckDB/feed import |
| examples | Show usage examples |
| clean | Remove all local data |
Output modes: no flags opens the dashboard. --data for terminal table, --format json for JSON, --url to open dashboard and print URL, --url-only to print URL without opening, --view <view> to pick a specific page (e.g. --view map).
Local Development
To test the CLI from the monorepo without publishing:
# From the repo root:
yarn install --ignore-engines
yarn cli:install-local # Build all packages, install CLI globally
gtfs-viz --help
# Or symlink instead of install:
yarn cli:link
gtfs-viz --help
# Or run without installing:
yarn build
yarn cli import /path/to/feed.zip
yarn cli stationsDuckDB Extension
The CLI uses the same GTFS DuckDB extension as the web app. See the extension docs for the full macro reference.
Agent Skills
Install reference docs for AI coding agents (Claude Code, Cursor, etc.):
gtfs-viz install-skillInstalls: SKILL.md | commands.md | tables.md | procedures.md | gtfs-schedule-reference.md | examples.sql
