Skip to main content

Flipper Zero

@magistr/flipper-zerov2026.07.24.1· 1d agoMODELS
01README

Control a Flipper Zero over its USB serial CLI from swamp.

Model:

  • @magistr/flipper-zero — one instance per Flipper (identified by its serial port, or auto-detected). Methods drive the device's text CLI (the >: prompt) and RPC protocol, persisting structured results as swamp data:
    • detect — find the serial port without talking to the device.
    • info — read device/firmware/power info (info device, with a device_info fallback) parsed into attributes.
    • exec — run any single CLI command and capture its output.
    • storage-list — list an SD-card directory (storage list <path>).
    • storage-read — read a file's contents (storage read <path>).
    • apps — list the built-in loader apps (loader list).
    • installed-apps — list SD-card apps/scripts under /ext/apps grouped by category, each with a launchable path (storage tree).
    • launch — launch an app by path/name (loader open), refusing to open over a running app unless force is set.
    • close — close the running app: soft loader close, escalating to a simulated long Back press for apps (games) that ignore it.
    • running — report the currently-running app (loader info).
    • screenshot — capture the 128x64 screen over RPC (start_rpc_session + Gui screen stream) and render it as ASCII and braille.
    • listen — receive-only capture on sub-GHz, infrared, 125kHz RFID or NFC (which runs through the device's [nfc] sub-shell).
    • transmit — owner-operated emit on IR (protocol or universal remote), sub-GHz (replay a saved capture or a raw key), or RFID emulate. Sub-GHz TX is region-restricted by the firmware. RX and TX only; no jamming or brute-force tooling.
    • reboot — reboot the device (power reboot).

Cross-platform serial handling: macOS cu.usbmodemflip* and Linux ttyACM* nodes are auto-detected; the line is put into raw, no-echo mode via stty and each exchange syncs to a fresh prompt before sending a single, newline-free command. All device I/O goes through subprocesses (macOS requires --allow-all for /dev, which swamp models are not granted). Captured output is bounded to guard against huge reads.

02Release Notes

Merge pull request #55 from umag/feat/flipper-zero-extension

feat(flipper-zero): owner-operated transmit (IR / sub-GHz / RFID)

03Models1
@magistr/flipper-zerov2026.07.24.1extensions/models/flipper_zero.ts

Global Arguments

ArgumentTypeDescription
port?stringSerial device path, e.g. /dev/cu.usbmodemflip_Zilxi1 (macOS) or
baudstringBaud rate for stty. The Flipper is USB-CDC so this is cosmetic, but must
timeoutMsnumberPer-command read timeout in milliseconds.
fn detect()
Find the Flipper's serial port (no device communication). Writes the
fn info()
Read device, firmware and power information (info device, with a
fn exec(command: string)
Run a single Flipper CLI command (e.g. "storage info /ext",
ArgumentTypeDescription
commandstringA single CLI command line. Run "help" to list commands.
fn apps()
List the built-in loader applications (loader list). For apps you
fn launch(app: string, force?: boolean)
Launch an app (loader open). Pass a full .fap path from installed-apps
ArgumentTypeDescription
appstringApp path (e.g. /ext/apps/Games/snake_game.fap) or built-in name.
force?booleanClose any already-running app first (default false).
fn close()
Close the currently-running app. Tries a soft loader close, then
fn running()
Report which app is currently running, if any (loader info).
fn screenshot()
Capture the 128x64 device screen over RPC and render it as ASCII and
fn listen(source: enum, seconds: number, frequency: number, raw?: boolean, external?: boolean)
Listen on one of the device's receivers for a fixed window and capture
ArgumentTypeDescription
sourceenumWhich receiver to listen on.
secondsnumberHow long to listen (default 15).
frequencynumberSub-GHz frequency in Hz (default 433920000 = 433.92MHz).
raw?booleanCapture raw timings instead of decoded packets (subghz/ir).
external?booleanUse an external CC1101 module (device 1) instead of the internal.
fn transmit(source: enum, protocol?: string, address?: string, command?: string, universalRemote?: string, signal?: string, file?: string, key?: string, frequency?: number, te?: number, keyType?: string, keyData?: string, repeat?: number, seconds: number, external?: boolean)
Emit on one of the device's radios (owner-operated): send an infrared
ArgumentTypeDescription
sourceenumWhich radio to emit on.
protocol?stringIR protocol, e.g. NEC, Samsung32, RC5 (with address+command).
address?stringIR address, hex.
command?stringIR command, hex.
universalRemote?stringBundled universal remote: tv, audio, ac, or projector (with signal).
signal?stringUniversal-remote signal name, e.g. Power, Mute, Vol_up.
file?stringPath to a saved capture to replay, e.g. /ext/subghz/gate.sub.
key?stringRaw sub-GHz key, hex (with frequency+te).
frequency?numberSub-GHz frequency in Hz (for a raw key).
te?numberSub-GHz timing element in microseconds (for a raw key).
keyType?stringRFID key type to emulate, e.g. EM4100, H10301, Indala26.
keyData?stringRFID key data, hex.
repeat?numberRepeat count for sub-GHz transmits (default 1).
secondsnumberHow long to emulate, for RFID (default 10).
external?booleanUse an external CC1101 module (sub-GHz).
fn reboot()
Reboot the device (power reboot). The port drops during reboot, so no

Resources

device-port(infinite)— Resolved serial port and detection candidates
device-info(infinite)— Parsed device/firmware/power information
command-output(infinite)— Output of an arbitrary CLI command
storage-listing(infinite)— Directory listing from the SD card
file-content(infinite)— Contents of a file read from the SD card
app-list(infinite)— Installed applications from loader list
reboot-result(infinite)— Outcome of a reboot request
installed-apps(infinite)— Installed apps/scripts found on the SD card
launch-result(infinite)— Outcome of launching an app via loader open
close-result(infinite)— Outcome of closing the running app
loader-info(infinite)— Currently-running application, per loader info
image-shown(infinite)— An image pushed to the device's virtual display
snake-game(infinite)— Result of an autonomous Snake session
transmit-result(infinite)— Outcome of an emit/transmit on a radio
listen-result(infinite)— What a receiver picked up during a listen window
screenshot(infinite)— Rendered capture of the 128x64 device screen
04Previous Versions2
2026.07.23.6

Merge pull request #53 from umag/feat/flipper-zero-extension

feat(flipper-zero): receive-only listen (sub-GHz / IR / RFID / NFC)

Modified 1 models

2026.07.23.4

Merge pull request #52 from umag/feat/flipper-zero-extension

feat(flipper-zero): new @magistr/flipper-zero extension

05Stats
A
100 / 100
Downloads
0
Archive size
54.7 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels