TTC CLI

v0.1.7

Real-time Toronto transit — bus & streetcar arrivals, vehicle tracking, alerts, stop search

0· 374·1 current·1 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The skill's name/description (TTC CLI) match the code and bundled data: a Node CLI that exposes live TTC GTFS-RT and static GTFS data. The package installs a 'ttc' binary as declared. One minor inconsistency: registry metadata lists no required config paths, but the postinstall script writes a symlink into ~/.claude/skills, which is an effective modification of user agent config/home directory (this is consistent with the README but wasn't declared in the 'required config paths' field).
Instruction Scope
SKILL.md instructs only to run the ttc binary and documents features (nearby, next, vehicles, alerts). There are no instructions to read unrelated files or exfiltrate secrets. The package includes an optional macOS location helper (CoreLocation) which is compiled during postinstall if swiftc/Xcode tools are present; that behavior is documented in README.
Install Mechanism
The install uses an npm package (@lucasygu/ttc) which is expected for a JS CLI. The package contains a postinstall script that (a) creates a symlink in ~/.claude/skills to register itself as a Claude Code skill and (b) may compile a Swift helper on macOS (execSync of swiftc). Running npm install will execute that postinstall script on the host — typical for npm packages but worth noting because it runs code and writes files on install.
Credentials
No environment variables or credentials are required. The code does not request unrelated secrets. The only filesystem/location access is to the user's home directory (~/.claude/skills) and to compile/copy the macOS helper in the package directory, which is proportional to its claimed integration and macOS location feature.
Persistence & Privilege
always is false and the skill does not request elevated system privileges. However, postinstall will create a persistent symlink at ~/.claude/skills/ttc to register the skill with Claude Code (modifying user agent configuration). This is within the skill's stated goal (AI agent integration) but is a persistent change to the user's home directory that some users may prefer to perform manually.
Assessment
This package is coherent with its description: it's an npm-distributed TTC CLI bundling static GTFS data and accessing TTC's public GTFS-RT feeds. Before installing, consider: (1) the package runs a postinstall script that will create ~/.claude/skills/ttc to register as a Claude Code skill — if you don't want automatic registration, either inspect/modify the package or create that symlink manually after installation; (2) on macOS the postinstall may compile a small Swift helper (requires Xcode Command Line Tools) to enable automatic location — you can skip installing those tools or skip the helper if you prefer; (3) npm postinstall scripts execute arbitrary code during install — only install packages from maintainers you trust or review scripts (scripts/postinstall.js) yourself; (4) the package bundles large static GTFS files locally (storage impact) and includes an update-gtfs script that can fetch fresh data when explicitly run. If you want minimal risk, install in a sandbox/VM or inspect the postinstall script and packaged files before running npm install.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

OSmacOS · Linux · Windows
Binsttc

Install

Node
Bins: ttc
npm i -g @lucasygu/ttc
latestvk97912z89h24ysfyxnvwwmdb2h82hsza
374downloads
0stars
8versions
Updated 1mo ago
v0.1.7
MIT-0
macOS, Linux, Windows

TTC CLI — Toronto Transit Commission

IMPORTANT: Always run commands using the ttc binary directly (e.g. ttc nearby). Never use node src/cli.js or node dist/cli.js — the ttc command is globally installed and always available.

Real-time bus and streetcar tracking for Toronto. Next arrivals, vehicle positions, service alerts, and stop search — all from the terminal.

Prerequisites

  • Node.js 22+
  • No authentication required — all feeds are public

Quick Reference

ttc next "king spadina"           # Next arrivals at a stop
ttc next 8126                     # By stop code
ttc route 504                     # Route info + active vehicles
ttc vehicles 504                  # Live positions on a route
ttc alerts                        # Service alerts
ttc alerts --broad                # Include subway alerts
ttc nearby                        # Auto-detect location (macOS)
ttc nearby 43.6453,-79.3806       # Or provide coordinates
ttc stops 504                     # Active stops on a route
ttc routes                        # List all surface routes
ttc routes --type streetcar       # Filter by type
ttc search "broadview station"    # Fuzzy stop search
ttc status                        # System overview
ttc loop 3m nearby                # Live monitor (refreshes every 3m)

Commands

ttc next <stop>

Show next arrivals at a stop. Accepts stop name (fuzzy matched), stop ID, or stop code.

ttc route <number>

Show route info: type (bus/streetcar), directions/headsigns, active vehicle count, alerts.

ttc vehicles [route]

Live vehicle positions. Shows fleet number, route, status, current stop, and occupancy.

ttc alerts [route]

Service disruptions and alerts. Use --broad for subway alerts too.

ttc nearby [lat,lng]

Find nearest stops and their upcoming arrivals. Default 500m radius. On macOS, auto-detects your location if no coordinates are provided.

ttc routes

List all surface routes. Filter with --type bus or --type streetcar.

ttc search <query>

Fuzzy search for stops by name. Strips noise words (St, Ave, At) for better matching.

ttc stops <route>

List currently active stops on a route (derived from live vehicle and prediction data).

ttc status

System overview: active vehicles, active routes, alert count, static data freshness.

Global Options

All commands support:

  • --json — Output as JSON for agent/script consumption

ttc loop <interval> <command> [args...]

Re-run any ttc command on an interval. Clears screen and refreshes automatically. Ctrl+C to stop.

Interval format: 30s, 3m, 1h, or just seconds (e.g. 180).

ttc loop 3m next "king spadina"    # Watch arrivals while getting ready
ttc loop 5m alerts                 # Monitor disruptions during storms
ttc loop 2m vehicles 504           # Track vehicles approaching your stop
ttc loop 30s nearby                # Refresh nearby arrivals as you walk

Data Sources

  • Real-time: GTFS-RT protobuf feeds from bustime.ttc.ca (no auth)
  • Static: Pre-bundled stop/route/trip data from Open Toronto GTFS
  • Coverage: Surface transit only (buses + streetcars). Subway alerts available via --broad.

Comments

Loading comments...