# Betaflight CLI Commands: Complete Reference for Advanced Configuration
The Betaflight CLI (Command Line Interface) is the most powerful and underutilized tool in every FPV pilot’s arsenal. While the Configurator GUI handles 90% of everyday tasks, the CLI unlocks critical settings that are simply not exposed in the graphical interface — from motor output limits and custom mixer configurations to advanced filtering parameters and debugging commands. This guide catalogs every essential CLI command organized by category.
## How to Access the Betaflight CLI
1. Connect your flight controller via USB
2. Open Betaflight Configurator (10.10.0 or newer)
3. Click the “CLI” tab in the left sidebar
4. Type commands and press Enter to execute
**Important**: Always type `diff all` before making changes and save the output. This preserves your current configuration in case you need to revert.
## Essential CLI Command Categories
### System and Status Commands
| Command | Description | Example Output |
|———|————-|—————|
| `status` | Displays system status, CPU load, cycle time, and armed state | `CPU: 12%, cycle time 126, I2C Errors: 0` |
| `version` | Shows firmware version, target name, and build date | `# Betaflight / STM32F7X2 4.5.0` |
| `tasks` | Lists all running tasks with CPU usage and max execution time | Gyro/PID/Serial/OSD task stats |
| `resource` | Shows current pin resource mapping | `MOTOR 1: B00, MOTOR 2: B01…` |
| `dump` | Outputs complete configuration (can be thousands of lines) | Full CLI dump |
| `diff all` | Shows only changed settings from defaults | Compact config backup |
### Motor and ESC Commands
| Command | Description | Usage Notes |
|———|————-|————|
| `resource MOTOR 1
| `dshot_bidir` | Enables bidirectional DShot for RPM filtering | Requires BLHeli_32/Bluejay/AM32 |
| `motor_output_limit` | Limits maximum motor output percentage | `set motor_output_limit = 90` for 6S on 4S motors |
| `dshot_idle_value` | Sets idle throttle percentage in DShot units | Default 550, raise for larger props |
### PID and Filter Tuning Commands
| Command | Description | Default Value |
|———|————-|—————|
| `set p_pitch = ` | Proportional gain for pitch axis | 47 (4.5.0 defaults) |
| `set p_roll = ` | Proportional gain for roll axis | 44 |
| `set p_yaw = ` | Proportional gain for yaw axis | 45 |
| `set d_min_pitch = ` | D-Min value for pitch | 30 |
| `set d_min_roll = ` | D-Min value for roll | 27 |
| `set feedforward_averaging = ` | Feedforward smoothing samples | 3 |
| `set feedforward_smooth_factor = ` | Feedforward smoothing cutoff | 45 |
| `set gyro_lpf1_dyn_min_hz = ` | Dynamic notch minimum frequency | 250 |
| `set gyro_lpf1_dyn_max_hz = ` | Dynamic notch maximum frequency | 500 |
| `set dyn_notch_count = ` | Number of dynamic notch filters | 3 |
| `set dyn_notch_q = ` | Dynamic notch Q factor (width) | 300 |
### GPS and Rescue Commands
| Command | Description | Recommended Value |
|———|————-|——————-|
| `set gps_rescue_angle =` | Maximum climb angle during rescue | 45 |
| `set gps_rescue_initial_alt =` | Altitude gain on rescue activation | 50 (meters) |
| `set gps_rescue_descent_dist =` | Distance to home before descent | 200 |
| `set gps_rescue_ground_speed =` | Return speed in m/s | 15 |
| `set gps_rescue_throttle_min =` | Minimum throttle during rescue | 1350 |
| `set gps_rescue_throttle_max =` | Maximum throttle during rescue | 1700 |
| `set gps_rescue_throttle_hover =` | Hover throttle value | 1280 |
| `set gps_rescue_sanity_checks =` | Rescue validation checks | RESCUE_SANITY_ON |
| `set gps_ublox_use_galileo =` | Enable Galileo satellite constellation | ON |
### OSD Configuration Commands
| Command | Description | Options |
|———|————-|———|
| `set osd_camera_frame_width =` | OSD element boundary width | 24 (default) |
| `set osd_camera_frame_height =` | OSD element boundary height | 11 |
| `set osd_units =` | Units display mode | IMPERIAL / METRIC |
| `set osd_rssi_alarm =` | RSSI warning threshold | 20 |
| `set osd_cap_alarm =` | Capacity used warning (mAh) | 2200 |
| `set osd_alt_alarm =` | Altitude warning (meters) | 100 |
| `set osd_link_quality_alarm =` | Link quality warning | 70 |
| `set vcd_video_system =` | Video system selection | AUTO / NTSC / PAL |
### LED Strip Commands
| Command | Description | Example |
|———|————-|———|
| `led 0 4,8:CO:2` | Set LED 0 at coordinates 4,8 with color orange, function color 2 | Wire in a ring pattern |
| `led 0 0,0::C:1` | Set LED 0 as a warning indicator | Blinks on low battery |
| `color 1 255,0,0` | Define custom color 1 as pure red | RGB values |
| `color 2 0,255,0` | Define custom color 2 as green | For status indicators |
### Profile and Rate Commands
| Command | Description | Usage |
|———|————-|——-|
| `profile 0` | Select rate profile 0 | Profiles 0-5 available |
| `rateprofile 0` | Select rate profile 0 | Separate from PID profiles |
| `set roll_rc_rate =` | RC Rate for roll | Affects center stick sensitivity |
| `set roll_srate =` | Super Rate for roll | Affects stick endpoint speed |
| `set roll_expo =` | Expo for roll | Softens center stick |
| `set thr_mid =` | Throttle midpoint | For hover point adjustment |
| `set thr_expo =` | Throttle expo | Smooths throttle curve |
## Advanced Debugging Commands
| Command | Description | When to Use |
|———|————-|————|
| `debug_mode = GYRO_SCALED` | Logs raw gyro data to blackbox | Diagnosing motor noise |
| `debug_mode = D_MIN` | Logs D-Min behavior | Tuning D-Min parameters |
| `debug_mode = FFT` | Frequency spectrum analysis | Finding noise peaks |
| `debug_mode = RPM_FILTER` | RPM filter debugging | Verifying notch tracking |
| `diff all` | Compact configuration backup | Before any changes |
| `defaults` | Reset to firmware defaults | Starting fresh |
| `bl` | Reboot into bootloader for flashing | Firmware updates |
## Practical CLI Workflows
### Workflow 1: Quick Motor Remap After a Burned ESC Pad
“`
resource MOTOR 1 none
resource MOTOR 5 B06
resource MOTOR 1 B06
save
“`
### Workflow 2: Fine-Tuning Dynamic Notch for a Noisy Build
“`
set dyn_notch_count = 4
set dyn_notch_q = 250
set dyn_notch_min_hz = 80
set dyn_notch_max_hz = 350
save
“`
### Workflow 3: Configuring GPS Rescue for Long Range
“`
set gps_rescue_angle = 40
set gps_rescue_initial_alt = 60
set gps_rescue_descent_dist = 250
set gps_rescue_ground_speed = 18
set gps_rescue_sanity_checks = RESCUE_SANITY_FS_ONLY
save
“`
## Essential Safety CLI Settings
“`
set auto_disarm_delay = 5
set runaway_takeoff_prevention = ON
set rx_min_usec = 885
set rx_max_usec = 2115
“`
For pilots running a modern F7 flight controller with plenty of UARTs and processing headroom for advanced CLI features, the [UAV Model F7 Stack](https://uavmodel.com) provides the CPU power needed to run GPS Rescue, RPM filtering, and full OSD simultaneously without overloading the processor.
