Skip to content

CLI reference

Every capability is a canair <subcommand>. These pages are generated from each command's --help (the source of truth), so they never drift from the code.

Regenerate with python3 scripts/gen_cli_reference.py; CI checks they are current.

Commands

Live device

  • canair statuscanair status — show the configured transport, device state, and profile.
  • canair read — Read ECUs/parameters live. Positional STEPs use the multi mini-language.
  • canair monitor — Monitor ECUs/signals live in a scrollable, refreshing view. Positional STEPs use the multi mini-language (same as canair read).
  • canair scan — Scan an ECU. Choose a kind:
  • canair discover — Sweep a range of TX addresses (sends 10 01 to each) to find ECUs.
  • canair raw — Send a raw UDS request (hex in, hex out).
  • canair sniffcanair sniff — passive CAN bus sniffer (raw SLCAN-over-TCP backend).
  • canair io — IOControl (0x2F): interactive TUI, or single actuator command with --did.
  • canair routines — RoutineControl (0x31): interactive TUI, or single command with --rid.
  • canair identity — Query ECU identity data and decode it. Supports UDS (22 F1xx) and KWP2000 (1A 8x/9x) ECUs; the protocol is auto-selected from the profile registry or an on-device probe (override with --protocol).
  • canair dtc — Read stored Diagnostic Trouble Codes with UDS 0x19 (reportDTCByStatusMask), or clear them with UDS 0x14. Clearing mutates ECU fault memory and prompts for confirmation unless --yes is given.
  • canair repl — Drop into an interactive live terminal (REPL) over an ELM327
  • canair lockcanair lock — inspect and clear the device connection mutex.

Analysis

  • canair captures — Query captured data. Choose a kind:
  • canair decode — Decode captured UDS payloads using PID parameter definitions.
  • canair correlate — Find every strong cross-signal relationship across a drive/session.
  • canair hunt — Answer 'which byte carries a signal I already know?' Choose a domain kind:
  • canair investigate — Point this at an unknown signal and get one ranked table telling you
  • canair coverage — Audit PID definitions for decoding gaps.
  • canair research — Report open reverse-engineering work from ecus/ research: sections.

Authoring

  • canair pids — Safely edit ecus/ parameters and research entries (domain A — diagnostic UDS PIDs, freeform WiCAN expressions). The broadcast-frame (domain B) authoring counterpart is canair signals (linear signals/ maps).
  • canair signalscanair signals — view/edit broadcast signal definitions (domain B).
  • canair ecu — Inspect or edit the profile's ECU registry.
  • canair bus — List the active profile's CAN bus segments with their human names, descriptions, and the number of ECUs on each (from can_buses.yaml).
  • canair states — List the active profile's vehicle operating states, or edit the vocabulary (add/rm/rename/set-description/set-predicate/set-implies/set-excludes). Read-only companion of the state auto-suggestion used when recording captures.
  • canair groups — List the active profile's named selector groups, or edit the vocabulary (add/rm/rename/set-description/set-members). Reference a group on the command line with the @ sigil, e.g. canair monitor @charging.
  • canair wican — Build and sync the WiCAN device's AutoPID profile.
  • canair validate — Validate a profile's data files against their schemas and

Import / export

  • canair import — Import external CAN data into the active profile. Choose a kind:
  • canair exportcanair export — export canair data to interchange formats.

Setup

  • canair profile — List, inspect, and create vehicle profiles — the per-vehicle
  • canair configcanair config — view and manage user configuration.
  • canair updatecanair update — update the CLI from its git-clone install.
  • canair completion — Enable canair tab-completion (subcommands, flags, ECU/PID names).

Other

  • canair align — Emit a time-aligned, wide table of several ECU:PID:PARAM signals — one row per reference sample, one column per signal, nearest-joined within a tolerance. The first selector sets the row cadence; the rest join onto it.
  • canair contribute — Open a pull request contributing the active profile upstream.
  • canair bix — Convert byte indices between WiCAN, ISO-TP, Torque, and OBDb notations.
  • canair logscanair logs — view the central rotating diagnostics event log.