Betaflight CLI with diff all backup and restore
The Betaflight CLI is the command line inside the firmware. Every setting lives there, including the ones without a screen of their own, and a diff all from the CLI is the standard way to back up a quad. FlySpark gives you the CLI in Chrome or Edge over USB or Bluetooth, and in the FlySpark app on Android and iPhone, with suggestions as you type and a one-tap backup.
This page covers what the CLI is for, the commands pilots use most, how to back up and restore safely after a firmware update, the error messages you will see and what they mean, and how FlySpark's restore checks protect you from loading the wrong file.
Free. Hardware connections need Chrome or Edge on a computer; phones use the FlySpark app.
- Free
- Nothing to install
- Demo without hardware
In short
The Betaflight CLI is the text command line inside the firmware, where every setting can be read and changed and a diff all makes a backup. FlySpark opens it in Chrome or Edge over USB or Bluetooth and in its Android and iPhone apps, with autocomplete, history, one-tap backup and checked restore.
Key facts
- Backup runs diff all, which lists every non-default setting across all profiles.
- Betaflight's docs warn never to paste a diff from one firmware version into another; FlySpark compares the backup's header and board with the connected board before restoring.
- Restore skips save, exit, reboot, bl, dfu, msc, flash_erase and plain defaults; defaults nosave is kept.
- Restore from a file, the clipboard or one of the last 10 saved backups.
- Command history keeps the last 500 commands.
- Betaflight quick commands: status, version, diff, diff all, get, help, tasks, resource and serial.
Betaflight
INAV
ArduPilot
PX4- BLHeli_S
Bluejay
AM32
ExpressLRS
EdgeTX
DroneCAN
MAVLink
Try it
Write a diff
Turn the LED strip feature on and it shows up as a diff line.
diff
Betaflight
Features
- 01
Autocomplete
Suggestions for commands, setting names and the values an enum setting accepts, learned from the board itself through help, get, diff and dump.
- 02
History
Recall earlier commands with the arrow keys or the previous and next buttons; the last 500 are kept.
- 03
Quick commands
One tap for status, version, diff, diff all, get, help, tasks, resource and serial.
- 04
One-tap backup
Backup runs diff all and keeps the result as a text file named after the firmware, craft and time. Share sends or downloads it.
- 05
Restore with checks
Restore from a file, the clipboard or a saved backup. FlySpark compares the file's header and board name with the connected board before sending anything.
- 06
Rejected lines report
Lines the firmware refuses are collected, shown and copyable, and you decide whether to save the rest or keep the old settings.
- 07
Copy, save and clear
Copy the whole output, save it to a file, or clear the screen. Exit leaves without saving; Save stores your changes.
- 08
Works with INAV
The INAV configurator has the same CLI, backup and restore, with INAV's own quick commands.
What the Betaflight CLI is for
The configurator tabs are a friendly front end to settings that all have a CLI name. The CLI lets you read and change any of them directly with get and set, see the whole configuration as text with diff or dump, and run board commands such as status, tasks and resource. Some settings have no tab at all, and new firmware often adds settings before configurators give them a screen, so the CLI is where you go when a guide says paste this.
While the CLI is open the flight controller stops answering normal configurator messages, so FlySpark pauses the other tabs. Leaving the CLI always reboots the board: Save stores your changes first, Exit throws them away. Leaving the CLI tab without pressing either exits without saving, so an unfinished edit never sticks by accident. The quad must be disarmed to open the CLI.
Betaflight CLI commands pilots use most
status shows the board, sensors, CPU load, loop time and the arming disable flags. version prints the firmware, target and build options. get followed by part of a name lists every matching setting with its current value and the allowed range, so get rate shows all rate settings. set name = value changes one setting, and save stores everything and reboots.
diff lists only settings changed from the defaults for the active profile; diff all does the same for every PID, rate and other profile, which is why it is the usual backup. dump lists every setting, changed or not, and is long. resource shows which pin each function uses, serial the port setup, tasks how long each firmware task takes, and help every command the build knows. bl reboots into the bootloader for flashing, defaults resets everything, and exit leaves without saving.
Commands differ a little between Betaflight releases and between Betaflight and INAV, so FlySpark learns command and setting names from the connected board's own output. Type get once and every setting name becomes available for completion.
Diff, diff all or dump: which to use for a backup
A diff is short and readable because it only lists what you changed, and it adapts when restored on newer firmware with different defaults. Diff all adds every profile, so a second rate profile or a race PID profile is not lost. Dump writes every value, including defaults, which pins the old defaults onto new firmware and makes restores after an update more likely to throw errors. For a backup, use diff all. FlySpark's Backup button runs exactly that.
A diff all from Betaflight 4.x and later starts with defaults nosave, so restoring it first resets the board and then applies your changes. FlySpark keeps that line when restoring. It skips commands that would interrupt a restore: save, exit, reboot, bl, dfu, msc, flash_erase and a plain defaults. After the last line it saves once and the board reboots.
How FlySpark checks a backup before restoring
Before anything is sent, FlySpark reads the backup's header line, for example # Betaflight / STM32F405 (S405) 4.5.1, and its board_name line, and compares them with the connected board. A Betaflight backup on an INAV board, or the reverse, is blocked with Wrong firmware, because the commands do not match. A different board gets a warning that pin and port settings may not fit. A different release is allowed, because restoring after a firmware update is the normal case, but the dialog tells you. A file without a firmware header gets a warning to make sure it matches, and a file with no commands is refused with a hint that it may not be a diff or dump file.
During the restore FlySpark watches every reply. Betaflight answers a line it cannot use with a message such as ###ERROR IN set: INVALID NAME: ...###. Those lines are collected, and before saving you see them and choose: Save anyway keeps everything that worked, or not saving reboots the board with its previous settings untouched.
Where backups are kept
In the Android and iPhone apps, backups are files in FlySpark's storage on the phone, listed under Saved in the CLI tab with their age and number of settings; swipe left to delete one, or Share it to another app, a cloud drive or a message. In the browser there is no file system, so FlySpark keeps backups in the browser's local storage, which holds a few megabytes per site. Press Share to download each backup as a text file and keep it somewhere safe; clearing site data in the browser removes the saved copies.
A FlySpark backup is the same plain CLI text the official Betaflight App saves, so a file from either tool can be restored in the other, or pasted into any CLI by hand. Name it with the quad and the date if you keep several. The presets page uses the same restore path to apply ready-made CLI snippets.
At a glance
CLI and backup at a glance
| Firmware | Betaflight from 3.5 (MSP API 1.40) through 2026.6, and INAV |
|---|---|
| Backup format | Plain text from diff all, the same format the official Betaflight App uses |
| Restore sources | A file, the clipboard, or one of the last 10 saved backups |
| Restore checks | Firmware family (blocks), board and release (warns), missing header (warns) |
| Skipped during restore | save, exit, reboot, bl, dfu, msc, flash_erase and plain defaults; defaults nosave is kept |
| History | Last 500 commands |
| Quick commands (Betaflight) | status, version, diff, diff all, get, help, tasks, resource, serial |
| Connections | Browser: USB and Bluetooth in Chrome or Edge. Android: USB OTG, Bluetooth, Wi-Fi. iPhone: Bluetooth, Wi-Fi |
Compare
Betaflight CLI: official app vs FlySpark web vs FlySpark app
| Feature | Official Betaflight App | FlySpark in the browser | FlySpark app |
|---|---|---|---|
| CLI commands available | All the firmware has | All the firmware has | All the firmware has |
| Save output to a file | Yes | Yesas a download | Yes |
| Backup file format | Plain CLI text | Plain CLI text | Plain CLI text |
| USB connection | Yes | YesChrome or Edge | Android over USB OTG |
| Bluetooth connection | Yes | YesChrome or Edge | Yes |
| Runs on iPhone | No | No | Yes |
Betaflight
How to back up Betaflight settings in the browser
Connect
Open FlySpark in Chrome or Edge, choose Betaflight and connect over USB or Bluetooth. Disarm.
Open the CLI tab
Go to the CLI tab and find the Backup & restore card.
Back up
Press Backup to run diff all. FlySpark keeps the backup; Share downloads it as a text file.
Restore later
Press Restore, pick the file, check the firmware and board warnings, and let it apply and save.
Guide 01
Back up Betaflight with diff all
Do this before flashing firmware, applying presets or a big tuning change.
Connect in FlySpark over USB or Bluetooth and disarm.
Open the CLI tab. Leave the terminal closed; the Backup & restore card sits above it.
Press Backup. FlySpark enters the CLI, runs diff all, leaves again and the board reboots.
The message shows how many settings were saved. Press Share to download the file in the browser or send it from the phone.
Keep the file off the device as well, for example in cloud storage or email, so it survives a lost phone or a cleared browser.
Guide 02
Restore settings after a firmware update
The usual way to bring a quad back after flashing a new Betaflight release.
Flash the new firmware with full chip erase, apply the board's custom defaults if FlySpark shows the banner, and connect.
Open the CLI tab and press Restore. Choose a file on this device, Paste from clipboard, or one of your saved backups.
Read the dialog: it shows the number of commands, the firmware and board in the file, and any mismatch with the connected board.
Press Restore. Keep the cable connected while the progress bar runs.
If some lines were rejected, read them. Settings renamed in the new release are the usual cause. Choose Save anyway to keep the rest, then fix the rejected settings by hand with get and set.
Check the important tabs afterwards: Ports, Receiver, Modes, Motors and OSD.
Guide 03
Change a setting from the CLI
For settings without a tab, or when a guide gives you a command.
Press Open CLI. The other tabs pause while it is open.
Type get and part of the name, for example get motor_poles, and press Send. The reply shows the value and allowed range.
Type set, pick the name from the suggestions, add = and the value, and send it.
Repeat for other settings. Use the up arrow to recall and edit an earlier command.
Press Save to store the changes and reboot, or Exit to throw them away.
Guide 04
Share your setup for help on a forum
Helpers on Reddit, IntoFPV or RCGroups usually ask for these two outputs.
Open the CLI and tap the status quick command, then diff all.
Use Copy output to copy everything, or Save output to a file.
Paste it into your post as a code block or attach the file, and say which firmware you flashed and what the quad does wrong.
Troubleshooting
Common problems and fixes
Problem
###ERROR IN set: INVALID NAME
Fix
The setting does not exist in this firmware, usually because it was renamed or removed in a newer release, or the build left that feature out. Type get with part of the name to find the current one.
Problem
Value out of range or invalid value errors
Fix
The setting exists but the new firmware allows a different range or list. Run get on the name to see what it accepts now and set a value within it.
Problem
Wrong firmware when restoring
Fix
The backup is from INAV and the board runs Betaflight, or the other way round. Use a backup made on the same firmware family, or set the quad up by hand.
Problem
Made on another board warning
Fix
The backup's board name or target differs from the connected board. Resource, timer and port lines may not fit; restore only if you know the boards share a layout, or copy just the rates, PIDs, modes and OSD lines.
Problem
No commands found. Is this a CLI diff or dump file?
Fix
The file has no CLI commands, for example a Blackbox log or a presets file in another format. Pick the text file saved from a diff or dump.
Problem
Disarm to open the CLI
Fix
The board is armed. Disarm with your arm switch. Backup and restore are also disabled while armed.
Problem
The other tabs stop updating
Fix
The CLI is open, which pauses normal configurator traffic. Press Save or Exit; the board reboots and the tabs read fresh values.
Problem
The board reboots when I leave the CLI
Fix
That is how Betaflight works: exit and save both reboot the flight controller. FlySpark waits for the board and reconnects.
Problem
Saved backups are gone in the browser
Fix
Browser storage was cleared or a file was too large to keep. Always download a copy with Share after a backup.
Glossary
Glossary of terms
- CLI
- Command line interface: the text console built into Betaflight where every setting can be read and changed.
- diff
- Lists settings that differ from the defaults for the active profiles.
- diff all
- Like diff, but for every profile. The standard Betaflight backup.
- dump
- Lists every setting with its value, changed or not.
- save
- Stores the settings in the flight controller's memory and reboots it.
- defaults nosave
- Resets settings to defaults without saving or rebooting. Diff all files start with it so a restore begins from a clean board.
- resource
- The mapping of functions such as motors, LED strip and UARTs to processor pins.
- board_name
- The board identifier in a backup, used by FlySpark to warn when a file comes from another board.
FAQ
Frequently asked questions
What is the difference between diff, diff all and dump?
Dump lists every setting. Diff lists only those changed from the defaults. Diff all does the same for every profile and is the usual backup.
How do I save in the Betaflight CLI?
Type save, or press Save in FlySpark. The settings are stored and the board reboots. Exit leaves without saving.
Can I restore a backup from the official Betaflight App?
Yes. Both use plain CLI text, so a diff all file from either tool can be restored in the other.
Can I restore an old backup on new firmware?
Usually yes with a diff all. Some lines may be rejected if settings were renamed; FlySpark lists them and asks before saving.
Is it safe to restore a backup from a different board?
Not as a whole. Pins, timers and ports belong to one board. FlySpark warns you; copy only rates, PIDs, modes and OSD lines instead.
Why does the board reboot when I close the CLI?
Betaflight reboots on both save and exit. It is normal, and FlySpark waits for the board and reconnects.
Where are backups saved in the browser?
In the browser's local storage, listed under Saved. Share downloads a backup as a text file; keep that copy, because clearing site data removes the stored ones.
Can I use the Betaflight CLI on my phone?
Yes. The FlySpark app on Android and iPhone has the same CLI, backup and restore, over USB OTG on Android, Bluetooth or Wi-Fi.
How do I get into DFU or bootloader mode from the CLI?
Type bl and press Send. The board reboots into its bootloader for flashing. Power it again without holding BOOT to return to normal.
Does it work with INAV?
Yes. The INAV configurator has the same CLI, backup and restore.
References
Sources
The official documentation behind the background facts on this page.
- Command Line Interface (CLI)Betaflight · betaflight.com
- CLI TabBetaflight · betaflight.com
- Betaflight 2025.12 CLI commandsBetaflight · betaflight.com
- Betaflight WikiBetaflight · betaflight.com







