FirmwareMaestro Docs
fwm CLI Agent

Slash Commands

Reference for every slash command available in the fwm CLI agent REPL — project lifecycle, session management, authentication, and core TUI.

Slash commands are deterministic shortcuts inside the REPL. Press / to open the picker. You can also just ask the agent in natural language — the same tools are invoked under the hood.

Core TUI

CommandDescription
/helpList the slash commands.
/clearClear the conversation pane.
/contextShow estimated and API-reported context-window usage.
/quitExit the REPL (alias: /exit).

Session management

CommandDescription
/resumeList saved sessions.
/resume NReload session N.
/history clearDelete all saved sessions.

Sessions are stored at ~/.fwm/sessions/session_<unix-timestamp>.json; the three most recent are kept. See Session persistence.

Authentication

CommandDescription
/loginOpen browser, authenticate, save token to ~/.fwm/config.toml.
/logoutRemove the stored token.
/whoamiShow the currently authenticated user.

Mode switching

See Agent Modes for the full reference.

CommandDescription
/editEdit mode — full read + write access (19 tools).
/planPlan mode — 11 read-only tools, produces a plan.
/debugDebug mode — 13 read-only datasheet-aware analysis tools.

Project lifecycle

CommandDescription
/initScaffold a new Zephyr / nRF Connect SDK project for any of 21 Nordic targets.
/buildBuild with auto-detected toolchain (west, cargo, cmake, idf.py, pio).
/flashFlash via west flash, nrfutil, nrfjprog, probe-rs, openocd, or custom command.
/analyzeLocal parsing of codebase, datasheet PDFs, and KiCad schematics.
/validateRun TOML-defined hardware validation sequences (CI / HIL / production).
/targetsList every supported MCU with core, clock, flash, RAM, and default board.

/init — scaffold a project

Project type is auto-selected from the chip's capabilities, and each target ships with a canonical Zephyr Hardware Model v2 board out of the box.

/init --target nrf52840                   # BLE, C, on the nRF52840 DK
/init --target nrf9160 --name tracker     # Named LTE project
/init --target nrf7002                    # Wi-Fi (companion IC)
/init --target nrf52840 --language rust   # Rust / Embassy
/init --target nrf52833 --language cpp    # C++17
/init --target nrf52840 --rtos freertos   # FreeRTOS skeleton
/init --from-docs ./docs/                 # AI-driven: inspect docs, pick target + type
/init --from-docs .                       # Shortcut: AI-driven from current directory
Project typeAuto-selected forScaffolded
BLEnRF52, nRF53, nRF54bt_enable(), bt_le_adv_start()
LTEnRF91nrf_modem_lib_init(), lte_lc_connect()
Wi-FinRF70net_mgmt callbacks
ThreadnRF52840, nRF5340OpenThread 802.15.4
MatternRF52840, nRF5340Matter over Thread
ZigbeenRF52840, nRF5340Zigbee 3.0
GeneralAnyGPIO LED blink with GPIO_DT_SPEC_GET()

Generated trees include the right CMakeLists.txt, prj.conf, and a boards/<board>.overlay devicetree file — all wired up so /build works out of the box. Rust projects produce an Embassy skeleton; C++ projects produce a C++17 skeleton; FreeRTOS produces FreeRTOSConfig.h plus a task-creating main.c.

/build

A custom [build] command in .fwm/project.toml always wins. Otherwise fwm auto-detects the toolchain — Zephyr (west build with the nRF Connect SDK env auto-set), Rust (cargo build), CMake, Make, ESP-IDF, or PlatformIO.

/build
/build --release
/build --clean
/build -- --pristine

/flash

For Zephyr projects: west flash with the nCS env auto-set, after verifying a build artifact exists. For other targets fwm prefers modern nrfutil device program and falls back to nrfjprog, probe-rs, openocd, pyocd, picotool, or dfu-util.

/flash
/flash --target nrf52840dk
/flash --erase
/flash --binary build/zephyr/zephyr.hex
/flash -- --runner nrfutil

/analyze

Local parsing — no AI call, no authentication required. Output is saved as JSON to .fwm/context.json (override with --output).

/analyze                                  # defaults to --codebase .
/analyze --codebase ./some-project
/analyze --datasheet path/to/nrf52840_ps.pdf
/analyze --schematic path/to/board.kicad_sch

/validate

Automated TOML-defined step sequences for CI, hardware-in-the-loop checks, and production validation. Bundled examples include smoke-test, binary-size, and boot-test. Reports in JUnit XML, Markdown, or JSON.

/validate                                          # list available sequences
/validate --init-example smoke-test                # copy a bundled example
/validate -s .fwm/validations/smoke-test.toml      # run a sequence
/validate -s seq.toml --report-format junit -o out

/targets

Lists every supported MCU with core, clock, flash, RAM, and default board. See the overview for the family summary.

Slash commands are shortcuts when you know exactly what you want. You can also just ask the agent in natural language and it will use the same underlying tools.

On this page