From 59e28b8958db4940f026c4bbd81dee7b9b5e49b0 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 2 Jul 2022 12:50:09 +0100 Subject: Add cli command to import keyboard|keymap|kbfirmware (#16668) --- docs/cli_commands.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) (limited to 'docs/cli_commands.md') diff --git a/docs/cli_commands.md b/docs/cli_commands.md index a380d3eb2f..56767d962b 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -352,6 +352,73 @@ $ qmk via2json -kb ai03/polaris -o polaris_keymap.json polaris_via_backup.json Ψ Wrote keymap to /home/you/qmk_firmware/polaris_keymap.json ``` +## `qmk import-keyboard` + +This command imports a data-driven `info.json` keyboard into the repo. + +**Usage**: + +``` +usage: qmk import-keyboard [-h] filename +``` + +**Example:** + +``` +$ qmk import-keyboard ~/Downloads/forever60.json +Ψ Importing forever60.json. + +Ψ Imported a new keyboard named forever60. +Ψ To start working on things, `cd` into keyboards/forever60, +Ψ or open the directory in your preferred text editor. +Ψ And build with qmk compile -kb forever60 -km default. +``` + +## `qmk import-keymap` + +This command imports a data-driven `keymap.json` keymap into the repo. + +**Usage**: + +``` +usage: qmk import-keymap [-h] filename +``` + +**Example:** + +``` +qmk import-keymap ~/Downloads/asdf2.json +Ψ Importing asdf2.json. + +Ψ Imported a new keymap named asdf2. +Ψ To start working on things, `cd` into keyboards/takashicompany/dogtag/keymaps/asdf2, +Ψ or open the directory in your preferred text editor. +Ψ And build with qmk compile -kb takashicompany/dogtag -km asdf2. +``` + +## `qmk import-kbfirmware` + +This command creates a new keyboard based on a [Keyboard Firmware Builder](https://kbfirmware.com/) export. + +**Usage**: + +``` +usage: qmk import-kbfirmware [-h] filename +``` + +**Example:** + +``` +$ qmk import-kbfirmware ~/Downloads/gh62.json +Ψ Importing gh62.json. + +⚠ Support here is basic - Consider using 'qmk new-keyboard' instead +Ψ Imported a new keyboard named gh62. +Ψ To start working on things, `cd` into keyboards/gh62, +Ψ or open the directory in your preferred text editor. +Ψ And build with qmk compile -kb gh62 -km default. +``` + --- # Developer Commands @@ -527,3 +594,4 @@ This command converts a TTF font to an intermediate format for editing, before c ## `qmk painter-convert-font-image` This command converts an intermediate font image to the QFF File Format. See the [Quantum Painter](quantum_painter.md?id=quantum-painter-cli) documentation for more information on this command. + -- cgit v1.2.1 From 5e2ffe7d8f4187109514147469d7db93e075f6f0 Mon Sep 17 00:00:00 2001 From: Erovia Date: Sat, 20 Aug 2022 06:39:19 +0100 Subject: CLI: Teaching the CLI to flash binaries (#16584) Co-authored-by: Ryan Co-authored-by: Sergey Vlasov Co-authored-by: Joel Challis Co-authored-by: Nick Brassel --- docs/cli_commands.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'docs/cli_commands.md') diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 56767d962b..4608ed85b6 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -90,6 +90,8 @@ This command is similar to `qmk compile`, but can also target a bootloader. The This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory. +This command can also flash binary firmware files (hex or bin) such as the ones produced by [Configurator](https://config.qmk.fm). + **Usage for Configurator Exports**: ``` @@ -102,6 +104,21 @@ qmk flash [-bl ] [-c] [-e =] [-j ] -km [-bl ] [-c] [-e =] [-j ] ``` +**Usage for pre-compiled firmwares**: + +**Note**: The microcontroller needs to be specified (`-m` argument) for keyboards with the following bootloaders: +* HalfKay +* QMK HID +* USBaspLoader + +ISP flashing is also supported with the following flashers and require the microcontroller to be specified: +* USBasp +* USBtinyISP + +``` +qmk flash [-m ] +``` + **Listing the Bootloaders** ``` -- cgit v1.2.1