瀏覽代碼

Fix the CLI docs (#6979)

- Sort the commands alphabetically
- Add missing `json_keymap`
- Correct underscore to dash
St. John Johnson 5 年之前
父節點
當前提交
e0e26957d4
共有 2 個文件被更改,包括 21 次插入11 次删除
  1. 20 10
      docs/cli.md
  2. 1 1
      lib/python/qmk/cli/json/keymap.py

+ 20 - 10
docs/cli.md

@@ -69,6 +69,16 @@ There are some limitations to the local CLI compared to the global CLI:
 
 
 # CLI Commands
 # CLI Commands
 
 
+## `qmk cformat`
+
+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.
+
+**Usage**:
+
+```
+qmk cformat [file1] [file2] [...] [fileN]
+```
+
 ## `qmk compile`
 ## `qmk compile`
 
 
 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.
 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>
 qmk compile -kb <keyboard_name> -km <keymap_name>
 qmk compile -kb <keyboard_name> -km <keymap_name>
 ```
 ```
 
 
-## `qmk cformat`
-
-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.
-
-**Usage**:
-
-```
-qmk cformat [file1] [file2] [...] [fileN]
-```
-
 ## `qmk config`
 ## `qmk config`
 
 
 This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md).
 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
 qmk doctor
 qmk doctor
 ```
 ```
 
 
+## `qmk json-keymap`
+
+Creates a keymap.c from a QMK Configurator export.
+
+**Usage**:
+
+```
+qmk json-keymap [-o OUTPUT] filename
+```
+
 ## `qmk list-keyboards`
 ## `qmk list-keyboards`
 
 
 This command lists all the keyboards currently defined in `qmk_firmware`
 This command lists all the keyboards currently defined in `qmk_firmware`

+ 1 - 1
lib/python/qmk/cli/json/keymap.py

@@ -11,7 +11,7 @@ import qmk.keymap
 
 
 @cli.argument('-o', '--output', arg_only=True, help='File to write to')
 @cli.argument('-o', '--output', arg_only=True, help='File to write to')
 @cli.argument('filename', arg_only=True, help='Configurator JSON file')
 @cli.argument('filename', arg_only=True, help='Configurator JSON file')
-@cli.subcommand('Create a keymap.c from a QMK Configurator export.')
+@cli.subcommand('Creates a keymap.c from a QMK Configurator export.')
 def json_keymap(cli):
 def json_keymap(cli):
     """Generate a keymap.c from a configurator export.
     """Generate a keymap.c from a configurator export.