Core Concepts
Add a peripheral
Peripherals are the external parts your board talks to — sensors, displays, radios, memory. Register them and Flash grounds its answers and generated code in the right datasheets: pin maps, registers, timings, electrical limits — instead of generic assumptions.
Add a peripheral
Open the picker with /peripherals (or click PERIPHERALS in the navbar). It searches an embedded database of ~5,000 parts in real time — no credentials or network needed for autocomplete. Navigate with the arrow keys and add with Enter.
Video slot
Searching the ~5,000-part database and adding components in the picker.
You can also add MPNs straight from the prompt:
/peripherals add BME280 W5500 STM32F407VGT6/peripherals list/peripherals remove W5500| Action | Key |
|---|---|
| Search | Type in the input — results appear instantly |
| Navigate results | ↑ / ↓ |
| Add selected | Enter (with a result active) |
| Add typed text | Enter (no selection) |
| Remove last | Backspace on an empty input |
| Confirm & resolve | Enter on an empty input |
| Cancel | Esc |
Custom parts & datasheets
Confirming the picker (or /peripherals resolve) resolves each part on a background thread and downloads its datasheet to .flash/datasheets/{MPN}.pdf:
Video slot
Resolving components and downloading their datasheets.
Resolved 2/3 peripherals ✓ BME280 — Bosch Sensortec — datasheet downloaded ✓ W5500 — WIZnet — datasheet downloaded ⚠ XYZ123 — not foundResolution providers are configured by environment variable. Without credentials, resolution returns empty rather than failing, and the local cache always works:
| Provider | Environment variables |
|---|---|
| Nexar | NEXAR_CLIENT_ID, NEXAR_CLIENT_SECRET |
| Digi-Key | DIGIKEY_CLIENT_ID, DIGIKEY_CLIENT_SECRET |
| Mouser | MOUSER_API_KEY |
Search datasheets (RAG)
Once downloaded, Flash indexes datasheets and lets you search them semantically — ideal for questions about pins, buses, registers, timings, or initialization:
/peripherals index index .flash/datasheets/*.pdf/peripherals search ADC reference voltage/peripherals search STM32F407VGT6 SPI clock polarity # 1st token = MPN → filter- Hybrid retrieval — vector search fused with BM25 keyword search (SQLite FTS5), so exact tokens (part numbers, register names) rank well.
- Citations — results come back as passages cited
[MPN p.N]; the agent won't invent when it finds no context. - Idempotent —
indexis cached by PDF hash; an already-indexed datasheet is skipped.
Embeddings (offline)
By default RAG uses a local OpenAI-compatible endpoint (Ollama) with nomic-embed-text. Install it once and enable RAG:
ollama pull nomic-embed-text/config set rag.enabled true/config saveindexreports "RAG skipped" and searchsays there's no index — it never crashes. With RAG on, each resolve auto-indexes new datasheets, and the agent gains a datasheet_search tool.Update peripherals later
Reopen the picker any time with /peripherals or the PERIPHERALS navbar panel. The list is stored atomically in .flash/peripherals.json (every add/remove writes immediately), and both surfaces stay in sync.