Betaflight CLI Explained

What is Betaflight CLI? CLI stands for command line interface, a configuration mode that gives users direct access to all the settings and parameters within the flight control firmware. CLI is a powerful tool, but can be daunting for less technical users. In this guide I will explain why and how to use CLI in Betaflight.

Why are we using CLI?

CLI was introduced back in the days in Baseflight and it continues to exist in Cleanflight, Betaflight, iNav, Butterflight etc.

Due to the vast amount of settings in these firmware, it’s simply impossible to list all of them in the GUI (graphical user interface – the configurator) without making it too confusing and difficult to use.

So it makes sense to only list the ones that are frequently used, and the rest can be changed via the CLI.

Another advantage of CLI is how easy it is to list all the settings and make a backup in a text file, which we will explain how later in this tutorial.

How to use CLI in Betaflight?

The CLI tab is available in Betaflight Configurator (where to download), you will have access to it once you’ve connected the flight controller to the configurator.

You can type in commands in the text input field at the very bottom of the screen, and press the “Enter” key on your keyboard to execute it.

Typically, a command in CLI looks like this:

[command] [setting] = [value]

For example, to set expo for roll to zero:

set roll_expo = 0

Once you have changed a setting, you also have to enter the command “save” in order to save the changes, and after that the FC will reboot. If you exit CLI without doing so your changes will be lost.

To exit the CLI without changing settings, simply enter the command “exit” and press enter, or click on another tab, or click on the top right “disconnect” button.


The syntax in Betaflight CLI is very simple and beginner friendly.

Case Sensitivity

You can type commands in the CLI in any case you want. Everything is case-insensitive so all of the below will work:

set serialrx_inverted = on
seT serialRX_inverTED = oN


It doesn’t matter if you put a space either side of the “=” or if you put multiple spaces, he CLI is able to figure out what the command is, what the setting name is, and what the value is regardless of spaces. All of the following will work:

set serialrx_inverted = on
set serialrx_inverted=on
set serialrx_inverted =on
set serialrx_inverted =               on

How to check settings in CLI?

The most used commands in Betaflight CLI are probably “dump” and “diff”.

When entering “dump“, it will simply display all the settings in Betaflight on the screen. As you can probably imagine, it’s a huge list (around 800 lines) and it can take a while to go through.

That’s why we often use the command “diff” instead.

If you only want to check the settings that are different from the default, you can enter “diff“. The returned list is much shorter, and easier to manage if you only want to check the settings that are changed by the user.

See this article for more info about the “diff” command.

The command “get” is another one I use all the time. Simply type “get”, followed by a space, and a few letters of the setting you want to check/change, CLI will return all the settings that begin with those letters. It’s very useful as you don’t have to memorize all the names. For example:

get serialrx

This will return both “serialrx_inverted” and “serialrx_duplex” which I use often.

Backup and Restore of Betaflight Settings using CLI

It’s good practice to make a backup of your Betaflight CLI settings before you make changes, so you can revert back if something goes wrong.

To backup, enter “diff all”, and copy the text to a text file.

To restore, simply copy and paste the text file in the CLI, and hit enter. Don’t forget to enter “save” before closing CLI.

Other Useful CLI Commands

There a lot of commands but some aren’t very useful. Here are the ones that I use a lot and I think you should know about :) Let me know which commands i should add to the list.

Command Description
defaults reset controller to defaults and reboot
dump print configurable settings in a paste-able form
diff dump only the settings that are different from the defaults. Includes only the current PID profile.
diff all dump only the settings that are different from the defaults. Includes ALL PID profiles.
exit exit without saving
get get the value of the specified variable
help lists all commands
save save settings and reboot
set set the the given value to the variable. (name=value or blank or * for list)
status show system status
version show version
bl or dfu enter the DFU mode without pushing the button. Reboots the FC board in bootloader mode.
set small_angle=180 lets you arm the quad regardless the quad’s attitude when accelerometer is enabled
bind_rx_spi activate bind mode on SPI receivers for FC with integrated RX (BF 4.X)
frsky_bind same as above (BF 3.X)

Note that the different firmware (Cleanflight, BetaFlight, Butterflight and iNav) might have slightly different sets of commands and setting names, and it’s also likely to change form version to version. You can confirm the available commands using help in CLI or check on the respective project wiki page.

Edit History

  • May 2018 – Guide created
  • Feb 2019 – Updated guide, added “Syntax”

8 thoughts on “Betaflight CLI Explained

  1. astemer

    hello.. i got a lizard95 from eachine ( dsmx reciever) but i cant bind it… it has no binding button and i couldnt bind it from CLI…

    thanks in advance

  2. Francisco

    I have a tinyhawk 2, I crash and a change the Aio flight controller, I did the bind with the RTF transmitter it binded ok, but some how I push reset settings no Betaflight, now my flight controller si dead. Is there something I can do to recover my flight controller. Right now When I plug the battery I only get a led light sequence 5 blue, 4 green and 1 red then the sequece repeats one more time and then dies.

    Hope you can help.


  3. Carl Krokstedt

    Hi There,

    This may be silly question but I am trying to activate serialrx_inversion = ON but I cant seem to find the correct command. I’ve done “get serialrx_inverted” to see what its set to but now I need to change and I cant lol. Any smart people out here with the correct command? Thanks in advance :)

  4. Harry Latorre

    Hi I’m building switches for my geprc KHX5 5″ quad and the “Arm” switch says in bright red “Arming Disabled”. How do I enable this arming mode to get it back to yellow or normal?

  5. Walter Hivoina

    Hello . If it’s anything like Mamba F22 mini. But more important you have upgraded to latest BetaFlight. Just enter expert mode, by the little tab. connect into the Firmware flasher, you should see the option for DFU mode right around the enable full chip erase area. When your ready to return to COM channel. whichever yours may be. Just exit out . you may need to close and restart BetaFlight depending on your computer’s O.S. or condition/Age. Happy Flashing. And Please Remember to Flash Responsibly.

  6. Alex

    Hi Oscar,

    do you know the Cli command to put the FC-Mamba f405 mini into DFU mode?
    I tried “bl” and “DFU”, but it does not work.

    Thanks in advance.


Leave a Reply

Your email address will not be published. Required fields are marked *

For prompt technical support, please use our forum I check blog comments weekly.