@cli.argument('-bl','--bootloader',default='flash',help='The flash command, corresponding to qmk\'s make options of bootloaders.')
@cli.argument('filename',nargs='?',arg_only=True,help='The configurator export JSON to compile. Use this if you dont want to specify a keymap and keyboard.')
@cli.argument('-km','--keymap',help='The keymap to build a firmware for. Use this if you dont have a configurator file. Ignored when a configurator file is supplied.')
@cli.argument('-kb','--keyboard',help='The keyboard to build a firmware for. Use this if you dont have a configurator file. Ignored when a configurator file is supplied.')
@cli.argument('-b','--bootloaders',action='store_true',help='List the available bootloaders.')
@cli.subcommand('QMK Flash.')
defflash(cli):
"""Compile and or flash QMK Firmware or keyboard/layout
cli.log.error('You must supply a configurator export or both `--keyboard` and `--keymap`. You can also specify a bootloader with --bootloader. Use --bootloaders to list the available bootloaders.')
returnFalse
cli.log.info('Flashing keymap with {fg_cyan}%s\n\n',''.join(command))