# terminal-cli > Query fleet telematics data using the Terminal CLI - vehicles, drivers, safety events, HOS, trips, locations, and more - Author: MisterJimson - Repository: terminal-api/terminal-cli - Version: 20260122135828 - Stars: 1 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/terminal-api/terminal-cli - Web: https://mule.run/skillshub/@@terminal-api/terminal-cli~terminal-cli:20260122135828 --- --- name: terminal-cli description: Query fleet telematics data using the Terminal CLI - vehicles, drivers, safety events, HOS, trips, locations, and more --- # Terminal CLI Terminal is a unified API for fleet telematics data. It connects to various Telematics Service Providers (TSPs) and normalizes data across vehicles, drivers, safety events, hours of service, trips, and more. The `terminal` CLI lets you query this data from the command line. ## When to Use This Skill Use this skill when the user asks about: - Vehicle locations, trips, or movement - Driver information or activity - Safety events (harsh braking, speeding, collisions) - Hours of Service (HOS) logs or violations - Fault codes or vehicle diagnostics - IFTA fuel tax summaries - Fleet or telematics data in general ## Prerequisites Before running queries, verify the CLI is configured: ```bash terminal config show ``` Most commands require a **connection token** which identifies the specific fleet/TSP connection. If not configured, ask the user to provide one: ```bash terminal config set connection-token con_tkn_xxx ``` ## Available CLI Commands ### Vehicles - `terminal list-vehicles` - List all vehicles - `terminal get-vehicle --id ` - Get specific vehicle details - `terminal list-latest-vehicle-locations` - Current vehicle locations - `terminal list-historical-vehicle-locations --vehicle-id --start-at --end-at ` - Historical locations - `terminal list-historical-vehicle-stats --vehicle-id --start-at --end-at ` - Historical stats (odometer, fuel, engine hours) ### Drivers - `terminal list-drivers` - List all drivers - `terminal get-driver --id ` - Get specific driver ### Safety - `terminal list-safety-events` - List safety events (harsh braking, speeding, etc.) - `terminal get-safety-event --id ` - Get specific safety event details - `terminal get-event-camera-media --event-id ` - Get camera footage for an event ### Hours of Service (HOS) - `terminal list-hoslogs` - List HOS log entries - `terminal list-hosdaily-logs` - List daily HOS summaries - `terminal list-hosavailable-time` - Get available driving time for drivers ### Trips - `terminal list-trips` - List historical trips with start/end locations, distance, duration ### Fault Codes - `terminal list-fault-code-events` - List vehicle fault code events (check engine lights, diagnostic codes) ### IFTA - `terminal get-iftasummary --start-month --end-month ` - Get IFTA fuel tax summary by jurisdiction ### Trailers - `terminal list-trailers` - List trailers - `terminal list-latest-trailer-locations` - Current trailer locations ### Devices - `terminal list-devices` - List ELD/telematics devices ### Groups - `terminal list-groups` - List vehicle/driver groups ### Issues - `terminal list-issues` - List data sync issues - `terminal resolve-issue --id ` - Resolve an issue ### Connections - `terminal list-connections` - List all TSP connections - `terminal get-current-connection` - Get current connection details ### Providers - `terminal list-providers` - List available TSP providers (no connection token required) ## Common Options All list commands support: - `--format json|pretty|table` - Output format (default: json) - `--all` - Auto-paginate to fetch all results - `--limit ` - Limit results per page - `--cursor ` - Pagination cursor Date filtering (where supported): - `--start-at ` - Start date (ISO 8601 format) - `--end-at ` - End date (ISO 8601 format) - `--modified-after ` - Filter by modification date ## Example Queries **"How many safety events for driver X this week?"** ```bash terminal list-safety-events --driver-id drv_xxx --start-at 2024-01-01T00:00:00Z --format table ``` **"Where was vehicle ABC on January 2nd?"** ```bash terminal list-historical-vehicle-locations --vehicle-id vcl_xxx --start-at 2024-01-02T00:00:00Z --end-at 2024-01-02T23:59:59Z --format table ``` **"Which vehicles have active movement?"** ```bash terminal list-latest-vehicle-locations --format table ``` Then filter for vehicles with recent timestamps and non-zero speed. **"Show all HOS violations"** ```bash terminal list-hoslogs --format table ``` Then filter for violation entries. **"What's the IFTA summary for Q4?"** ```bash terminal get-iftasummary --start-month 2024-10 --end-month 2024-12 --format pretty ``` ## Workflow 1. First, verify CLI configuration with `terminal config show` 2. If connection token is missing, ask user to provide it 3. Run appropriate query command(s) 4. Parse JSON output to answer the user's question 5. If data needs filtering/aggregation, process the results 6. Present findings clearly with relevant details ## Troubleshooting If commands fail: - Check `terminal config show` for configuration - Verify API key is set: `terminal config set api-key sk_xxx` - Verify connection token is set: `terminal config set connection-token con_tkn_xxx` - Use `--format pretty` for readable error messages - Try `terminal list-providers` (no auth required) to test connectivity