← 返回
开发者工具 中文

TTC CLI

Real-time Toronto transit — bus & streetcar arrivals, vehicle tracking, alerts, stop search
实时多伦多公交和有轨电车到站信息、车辆追踪、警报通知、站点搜索
lucasygu
开发者工具 clawhub v0.1.7 2 版本 100000 Key: 无需
★ 0
Stars
📥 720
下载
💾 5
安装
2
版本
#latest

概述

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

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

ttc route

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

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

ttc stops

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 [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.

版本历史

共 2 个版本

  • v0.1.7 当前
    2026-03-29 13:14 安全 安全
  • v0.1.5
    2026-03-11 10:53

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,780
developer-tools

Agent Browser

matrixy
专为AI智能体优化的无头浏览器自动化CLI,支持无障碍树快照和基于引用的元素选择。
★ 427 📥 118,164
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,072