Python toolkit for communicating with a Flipper Zero over its USB serial CLI interface.
git clone [email protected]:StevenFAU/FlipperCLI.git
cd FlipperCLI
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txtMake sure your user can access serial devices:
sudo usermod -aG dialout $USER
# Log out and back in, or: newgrp dialoutThe Flipper is auto-detected by USB VID/PID — no need to specify a port manually.
If auto-detection fails, pass the port directly: python flipper_repl.py /dev/ttyACM1
Run the connection test:
python test_connection.pyLaunch the interactive REPL:
python flipper_repl.pyfrom flipper_serial import FlipperSerial
from flipper_commands import FlipperCommands
with FlipperSerial() as f:
cmd = FlipperCommands(f)
info = cmd.device_info()
print(info["hardware_name"], info["firmware_version"])
# List SD card contents
for entry in cmd.storage_list("/ext"):
print(entry["name"], entry["type"])
# Read a file
content = cmd.storage_read("/ext/subghz/signal.sub")
# Write a file
cmd.storage_write("/ext/test.txt", "Hello Flipper!")
# LED and vibro
cmd.led("g", 255)
cmd.vibro(True)flipper> device_info
flipper> storage list /ext/subghz
flipper> !download /ext/subghz/signal.sub ./signal.sub
flipper> !download --binary /ext/apps/mygame.fap ./mygame.fap
flipper> !upload ./local_file.sub /ext/subghz/uploaded.sub
flipper> !capture subghz 433920000 10
flipper> !tree /ext
flipper> !help
flipper> !quit
Tab completion is available for ! commands and common Flipper paths.
# Download all Sub-GHz captures
python flipper_bulk.py subghz
# Download all NFC dumps
python flipper_bulk.py nfc
# Download all IR libraries
python flipper_bulk.py ir
# Full SD card backup
python flipper_bulk.py backupFiles are saved to dumps/<timestamp>/<type>/.
- Device: Auto-detected by USB VID/PID (
0483:5740), falls back to/dev/ttyACM0 - Baud rate: 230400
- Prompt:
>:(configurable for custom firmware like Momentum) - Protocol: UTF-8 text commands terminated with
\r\n
Close qFlipper before using this toolkit — only one application can hold the serial port at a time.
flipper_serial.py — Core serial connection class
flipper_commands.py — High-level command wrappers
flipper_repl.py — Interactive REPL
flipper_bulk.py — Bulk download/backup utilities
test_connection.py — Basic connectivity test