Core ConceptsAdd a peripheral

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:

shell
/peripherals add BME280 W5500 STM32F407VGT6/peripherals list/peripherals remove W5500
ActionKey
SearchType in the input — results appear instantly
Navigate results↑ / ↓
Add selectedEnter (with a result active)
Add typed textEnter (no selection)
Remove lastBackspace on an empty input
Confirm & resolveEnter on an empty input
CancelEsc

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.

shell
Resolved 2/3 peripherals   BME280  Bosch Sensortec  datasheet downloaded   W5500  WIZnet  datasheet downloaded   XYZ123  not found

Resolution providers are configured by environment variable. Without credentials, resolution returns empty rather than failing, and the local cache always works:

ProviderEnvironment variables
NexarNEXAR_CLIENT_ID, NEXAR_CLIENT_SECRET
Digi-KeyDIGIKEY_CLIENT_ID, DIGIKEY_CLIENT_SECRET
MouserMOUSER_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:

shell
/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.
  • Idempotentindex is 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:

shell
ollama pull nomic-embed-text/config set rag.enabled true/config save
Note
With no embedding provider, indexreports "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.

What's next