Synopsis
Description
crucihil discover automates the process of creating a rig TOML configuration. It:
- Probes the local system for CAN interfaces, USB adapters (PEAK, IXXAT), and Ethernet interfaces
- Asks for a brief hardware description (optional — can be skipped or passed via
--describe) - Generates a ready-to-use rig TOML using an AI model
- Validates the generated TOML against the Pydantic schema
- Confirms before writing — you review the TOML and approve the write
crucihil init). All three paths produce the same TOML format.
Options
Directory to write the generated rig TOML into. Created if it does not exist. Short form:
-d.AI provider:
anthropic, openai, or gemini. If omitted, auto-detected from environment variables. Short form: -p.Hardware description passed directly to the AI. Skips the interactive prompt. Example:
--describe "Nvidia Orin NX, two CAN buses (can0 powertrain 500k, can1 chassis 250k), DoIP on eth1".Skip AI entirely. Generates a minimal stub TOML from probe results only, with
# TODO: comments marking values that need manual editing. Useful when no API key is available.AI model override. Defaults:
claude-sonnet-4-6 (Anthropic), gpt-4o (OpenAI), gemini-2.0-flash (Gemini).API key setup
crucihil discover prompts for a provider and API key interactively.
Example session
Hardware probe details
The probe checks:| What | How |
|---|---|
| CAN interfaces | Reads /proc/net/dev and filters can* entries; also runs ip link |
| USB CAN adapters | Reads /sys/bus/usb/devices/ and matches known vendor/product IDs (PEAK, IXXAT, Kvaser) |
| Ethernet interfaces | Reads ip addr output, excludes loopback and virtual |
--describe text alone.
Confirm-on-write security model
crucihil discover never writes to disk without explicit confirmation. You always see the full TOML before approving the write. This is by design — AI-generated configs may need manual adjustment, and writing without review could overwrite an existing config.
If you decline the write, the TOML is printed to stdout so you can copy-paste it manually.
Stub TOML mode (no AI)
Use--no-ai when you don’t have an API key or prefer to start from a minimal scaffold:
# TODO: comments on every value that needs review:
After discovery
Once the TOML is written, run the interactive validator to check for missing DBC paths or misconfigured ECUs:BLOCKED (not FAIL) — rig configuration errors are precondition failures, not firmware failures.
See also
crucihil init— interactive wizard (Path B), no AI required- Rig Configuration — full TOML reference
- AI Features Overview — how BYOK works