Useful Betaflight CLI Commands

In this article I want to show you some neat Betaflight CLI “secrets”. Actually they are not really secrets at all since all of those commands can be found in the manual, but let’s be honest - who reads the manual?

First things first - what does CLI mean? CLI is the abrevation for Command Line Interface. Usually it is an alternative to the GUI - the Graphical User Interface. Usually you can do more via CLI than via GUI - this is especially true for BetaFlight. Sometimes it is simply hard to build a graphical user interface for a setting that takes a lot of parameters or a setting which needs a couple of commands to run in succession.

The CLI can be found in the Betaflight Configurator in the tab section on the left side as the last entry.

Some of this functionality is also available in the graphical user interface, some might only by available from the CLI. Anyway - the CLI is a way quick method to access all this information, if you know what you are looking for.

Tab completion

Tab completion was introduced with the Betaflight Configurator version 10.3.0. Linux users might know what that means: You can start typing a CLI command and then press the TAB key to complete it. Should there be multiple options for what you started to type, the CLI will show you all possibilities. It also shows you which parameters you have to supply - which is super handy, since it is basically self documenting and you don’t need the manual at all

Once you get used to tab completion, you don’t want to miss it anymore.

set and get commands

The set and get commands are probably the most commonly used ones, they allow you to set a variable to a specified value or to get the value of a variable. The get command takes one or none parameter. If you provide no parameter at all, it will return all available variables and their current value. Usually you would want to provide the name of the variable you are interested in. Here tab completion can help a lot. Simply type get, and hit tab two times and Betaflight will show you all possible variable names you might be interested in.

get

If you provide a variable name, the CLI will only show you the variables that contain this name.

get acc_limit
# get acc_limit  
acc_limit_yaw = 0  
profile 1  
Allowed range: 0 - 500  

acc_limit = 0  
profile 1  
Allowed range: 0 - 500

After you got the current value of a variable, you might want to change it, to do so you use the set command, again tab completion comes in really handy here. You can start typing your command and betaflight will show you which value (or range of values) it expects for this variable:

When setting the variable you set the variable name equal to the value you want it to be set to. The spaces around the equal sign do not matter:

set acc_limit = 100
set acc_limit=100

Do not forget to save changes that you made this way, or they will not be present after the next power-cycle.

save command

This does exactly what the name implies, it saves your current settings. This is important, do this every time you changed settings via CLI or they will not be stored. Obviously not every CLI command needs to be followed by the save command, but those that actually change settings have to - so don’t forget that.

save

bind command

The bind command is a topic on its own. This is why I wrote a dedicated article about it. It basically allows you to bind your model with SPI to your transmitter from the CLI without having to press the bind button. This only works with SPI receivers that are integrated onto the flight controller. A lot of whoop AIO boards use this integrated SPI receiver.

bind_rx

With newer Betaflight Configurator versions, you can find a bind button in the receiver tab, that simply invokes the bind command.

bl command

The bl command allows you to put your flight-controller into DFU (or boot loader) mode in oder to flash a new firmware. Similar to the bind command you can now avoid fumbling with the boot button on . Some flight-controllers even have pads that you need to solder in order to enter bootloader mode.

bl

tasks command

The tasks command is important for debugging and everyone that needs a more detailed output than just the CPU Load percentage from the main window. The command shows detailed CPU load including max and average load.

This is great for checking if your CPU can handle your loop times, this is especially important if you have RPM filters enabled, and for example want to see if the flight controller can still handle DHSOT600 or if you should stick with DSHOT300 instead.

tasks

diff command

This command will show you the differences to the stock settings. It is especially interesting for ready to fly models in order to see what kind of changes the manufacturer already made for you.

diff
Advertising
Advertising

dump command

The dump command is a very important command in my opinion - it allows you to get a dump of the whole configuration - it is similar to the diff command, except that it will contain all the settings instead just the once that have been changed.

I like to use this as the first command whenever I plug in a new flight-controller, just to be on the safe site, should something go wrong, I still have the original settings. Further the dump also contains the version of the flashed firmware so you can return to this state anytime you need to.

dump

help command

Last but not least, the help command will list all available commands and their parameters. This is a quick way to see which commands are available to you and how to use them. This is one of the first commands I use when a new version of Betaflight comes out, so I can quickly see if there are any new commands, or if command names have changed - which happens more often than you think - so should a command know to you no longer work, check the help to see if it has not just been renamed.

help

Chris is a Vienna based software developer. In his spare time he enjoys reviewing tech gear, ripping quads of all sizes and making stuff.

Learn more about Chris, the gear he uses and follow him on social media:

Show more comments