diff options
| -rw-r--r-- | docs/cli.md | 30 | ||||
| -rwxr-xr-x | lib/python/qmk/cli/json/keymap.py | 2 |
2 files changed, 21 insertions, 11 deletions
diff --git a/docs/cli.md b/docs/cli.md index 0d3703c8c..e655b0ee8 100644 --- a/docs/cli.md +++ b/docs/cli.md | |||
| @@ -69,6 +69,16 @@ There are some limitations to the local CLI compared to the global CLI: | |||
| 69 | 69 | ||
| 70 | # CLI Commands | 70 | # CLI Commands |
| 71 | 71 | ||
| 72 | ## `qmk cformat` | ||
| 73 | |||
| 74 | This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files. | ||
| 75 | |||
| 76 | **Usage**: | ||
| 77 | |||
| 78 | ``` | ||
| 79 | qmk cformat [file1] [file2] [...] [fileN] | ||
| 80 | ``` | ||
| 81 | |||
| 72 | ## `qmk compile` | 82 | ## `qmk compile` |
| 73 | 83 | ||
| 74 | This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm> or compile keymaps in the repo. | 84 | This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm> or compile keymaps in the repo. |
| @@ -85,16 +95,6 @@ qmk compile <configuratorExport.json> | |||
| 85 | qmk compile -kb <keyboard_name> -km <keymap_name> | 95 | qmk compile -kb <keyboard_name> -km <keymap_name> |
| 86 | ``` | 96 | ``` |
| 87 | 97 | ||
| 88 | ## `qmk cformat` | ||
| 89 | |||
| 90 | This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files. | ||
| 91 | |||
| 92 | **Usage**: | ||
| 93 | |||
| 94 | ``` | ||
| 95 | qmk cformat [file1] [file2] [...] [fileN] | ||
| 96 | ``` | ||
| 97 | |||
| 98 | ## `qmk config` | 98 | ## `qmk config` |
| 99 | 99 | ||
| 100 | This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md). | 100 | This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md). |
| @@ -125,6 +125,16 @@ This command examines your environment and alerts you to potential build or flas | |||
| 125 | qmk doctor | 125 | qmk doctor |
| 126 | ``` | 126 | ``` |
| 127 | 127 | ||
| 128 | ## `qmk json-keymap` | ||
| 129 | |||
| 130 | Creates a keymap.c from a QMK Configurator export. | ||
| 131 | |||
| 132 | **Usage**: | ||
| 133 | |||
| 134 | ``` | ||
| 135 | qmk json-keymap [-o OUTPUT] filename | ||
| 136 | ``` | ||
| 137 | |||
| 128 | ## `qmk list-keyboards` | 138 | ## `qmk list-keyboards` |
| 129 | 139 | ||
| 130 | This command lists all the keyboards currently defined in `qmk_firmware` | 140 | This command lists all the keyboards currently defined in `qmk_firmware` |
diff --git a/lib/python/qmk/cli/json/keymap.py b/lib/python/qmk/cli/json/keymap.py index a65acd619..207ac278c 100755 --- a/lib/python/qmk/cli/json/keymap.py +++ b/lib/python/qmk/cli/json/keymap.py | |||
| @@ -11,7 +11,7 @@ import qmk.keymap | |||
| 11 | 11 | ||
| 12 | @cli.argument('-o', '--output', arg_only=True, help='File to write to') | 12 | @cli.argument('-o', '--output', arg_only=True, help='File to write to') |
| 13 | @cli.argument('filename', arg_only=True, help='Configurator JSON file') | 13 | @cli.argument('filename', arg_only=True, help='Configurator JSON file') |
| 14 | @cli.subcommand('Create a keymap.c from a QMK Configurator export.') | 14 | @cli.subcommand('Creates a keymap.c from a QMK Configurator export.') |
| 15 | def json_keymap(cli): | 15 | def json_keymap(cli): |
| 16 | """Generate a keymap.c from a configurator export. | 16 | """Generate a keymap.c from a configurator export. |
| 17 | 17 | ||
