Get the FREE Ultimate OpenClaw Setup Guide →
M

Trimet

Scanned

@mjrussell

npx machina-cli add skill @mjrussell/trimet --openclaw
Files (1)
SKILL.md
2.3 KB

TriMet CLI

CLI for TriMet Portland transit data. Check arrivals, plan trips, and view alerts.

Installation

npm install -g trimet-cli

Setup

  1. Get free API key from https://developer.trimet.org/
  2. Set environment variable: export TRIMET_APP_ID="your-key"

Commands

Arrivals

trimet arrivals <stop-id>              # Real-time arrivals
trimet arrivals 8383 --line 90         # Filter by route
trimet arrivals 8383 --json

Trip Planning

trimet trip -f <from> -t <to>
trimet trip -f 8383 -t 9969
trimet trip -f "Pioneer Square" -t "PDX Airport"
trimet trip -f 8383 -t 9969 --arrive-by "5:30 PM"
trimet trip -f 8383 -t 9969 --depart-at "2:00 PM"
trimet trip -f 8383 -t 9969 --json

Next Departures

trimet next -f <from> -t <to>          # Simplified view
trimet next -f 8383 -t 9969 -c 5       # Show 5 options
trimet next -f 8383 -t 9969 --line 90  # Filter by route

Service Alerts

trimet alerts                          # All alerts
trimet alerts --route 90               # Alerts for route
trimet alerts --json

Common Stop IDs

  • Pioneer Courthouse Square: 8383 (westbound), 8384 (eastbound)
  • PDX Airport: 10579
  • Portland Union Station: 7787
  • Beaverton TC: 9969

Usage Examples

User: "When's the next MAX?"

trimet arrivals 8383

User: "How do I get to the airport?"

trimet trip -f "Pioneer Square" -t "PDX Airport"

User: "I need to be downtown by 5pm"

trimet trip -f <user-location-stop> -t 8383 --arrive-by "5:00 PM"

User: "Are there any delays on the Blue Line?"

trimet alerts --route 100

User: "Next trains to Beaverton"

trimet next -f 8383 -t 9969

Route Numbers

  • MAX Blue Line: 100
  • MAX Red Line: 90
  • MAX Yellow Line: 190
  • MAX Orange Line: 290
  • MAX Green Line: 200

Notes

  • Stop IDs are displayed at TriMet stops and on trimet.org
  • Addresses work for trip planning (e.g., "Pioneer Square, Portland")
  • Times support natural formats ("5:30 PM", "17:30")

Source

git clone https://clawhub.ai/mjrussell/trimetView on GitHub

Overview

TriMet CLI exposes Portland transit data through real-time arrivals, trip planning, and service alerts. It helps riders efficiently navigate buses, MAX trains, and other TriMet services by querying the TriMet API with an API key.

How This Skill Works

Install the trimet-cli tool, set your TriMet API key via TRIMET_APP_ID, and run commands like arrivals, trip, next, or alerts to fetch live data. The CLI communicates with TriMet APIs and supports options such as --json, --line, and --arrive-by to tailor results.

When to Use It

  • When checking real-time arrivals at a stop (e.g., 8383 Pioneer Courthouse Square)
  • When planning trips between Portland stops or to the airport (e.g., Pioneer Square to PDX Airport)
  • When reviewing the next departures and filtering by route (trimet next, --line, --c)
  • When tracking service alerts for a route or line (trimet alerts --route 90)
  • When you want times in natural formats (e.g., 5:00 PM or 17:30) for planning

Quick Start

  1. Step 1: npm install -g trimet-cli
  2. Step 2: Get free API key from https://developer.trimet.org/ and export TRIMET_APP_ID="your-key"
  3. Step 3: Try a command like trimet arrivals 8383 or trimet trip -f "Pioneer Square" -t "PDX Airport"

Best Practices

  • Obtain a TriMet API key and export TRIMET_APP_ID as an environment variable
  • Use correct stop IDs (e.g., 8383 for Pioneer Courthouse Square) for accuracy
  • Use --json for machine-readable output when integrating with apps
  • Combine --arrive-by or --depart-at with --from/--to to plan precise trips
  • Refer to Route Numbers (e.g., MAX Blue Line 100, Red Line 90) to filter results

Example Use Cases

  • User: "When's the next MAX?" → trimet arrivals 8383
  • User: "How do I get to the airport?" → trimet trip -f "Pioneer Square" -t "PDX Airport"
  • User: "I need to be downtown by 5pm" → trimet trip -f <user-location-stop> -t 8383 --arrive-by "5:00 PM"
  • User: "Are there any delays on the Blue Line?" → trimet alerts --route 100
  • User: "Next trains to Beaverton" → trimet next -f 8383 -t 9969

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers