@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
If a Configurator JSON export is supplied this command will create a new keymap. Keymap and Keyboard arguments
will be ignored.
If no file is supplied, keymap and keyboard are expected.
If bootloader is omitted, the one according to the rules.mk will be used.
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))