aboutsummaryrefslogtreecommitdiff
path: root/docs/cli_commands.md
diff options
context:
space:
mode:
authorErovia <erovia@users.noreply.github.com>2020-03-22 22:10:30 +0100
committerskullydazed <skullydazed@users.noreply.github.com>2020-04-08 09:31:14 -0700
commit21799be1caa72bc8770143e9f83e1b8d55812dfd (patch)
tree80de09e847f6837211bf94882b2a5d8eb0d10a85 /docs/cli_commands.md
parent5cfc3ce02e3c8007ac42e8089ecc895771bb3bfb (diff)
downloadqmk_firmware-21799be1caa72bc8770143e9f83e1b8d55812dfd.tar.gz
qmk_firmware-21799be1caa72bc8770143e9f83e1b8d55812dfd.zip
Make dedicated sections for user/dev commands in docs
Diffstat (limited to 'docs/cli_commands.md')
-rw-r--r--docs/cli_commands.md135
1 files changed, 65 insertions, 70 deletions
diff --git a/docs/cli_commands.md b/docs/cli_commands.md
index 570f841bc..eff5321bd 100644
--- a/docs/cli_commands.md
+++ b/docs/cli_commands.md
@@ -1,40 +1,6 @@
1# QMK CLI Commands 1# QMK CLI Commands
2 2
3# CLI Commands 3# User Commands
4
5## `qmk cformat`
6
7*(dev mode)*
8
9This command formats C code using clang-format.
10
11Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b <branch_name>`
12
13Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
14
15**Usage for specified files**:
16
17```
18qmk cformat [file1] [file2] [...] [fileN]
19```
20
21**Usage for all core files**:
22
23```
24qmk cformat -a
25```
26
27**Usage for only changed files against origin/master**:
28
29```
30qmk cformat
31```
32
33**Usage for only changed files against branch_name**:
34
35```
36qmk cformat -b branch_name
37```
38 4
39## `qmk compile` 5## `qmk compile`
40 6
@@ -138,18 +104,6 @@ This command lets you configure the behavior of QMK. For the full `qmk config` d
138qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] 104qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
139``` 105```
140 106
141## `qmk docs`
142
143*(dev mode)*
144
145This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
146
147**Usage**:
148
149```
150qmk docs [-p PORT]
151```
152
153## `qmk doctor` 107## `qmk doctor`
154 108
155This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to. 109This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
@@ -184,63 +138,105 @@ Creates a keymap.c from a QMK Configurator export.
184qmk json2c [-o OUTPUT] filename 138qmk json2c [-o OUTPUT] filename
185``` 139```
186 140
187## `qmk kle2json` 141## `qmk list-keyboards`
188 142
189*(dev mode)* 143This command lists all the keyboards currently defined in `qmk_firmware`
190 144
191This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite. 145**Usage**:
146
147```
148qmk list-keyboards
149```
150
151## `qmk list-keymaps`
152
153This command lists all the keymaps for a specified keyboard (and revision).
192 154
193**Usage**: 155**Usage**:
194 156
195``` 157```
196qmk kle2json [-f] <filename> 158qmk list-keymaps -kb planck/ez
197``` 159```
198 160
199**Examples**: 161## `qmk new-keymap`
162
163This command creates a new keymap based on a keyboard's existing default keymap.
164
165**Usage**:
200 166
201``` 167```
202$ qmk kle2json kle.txt 168qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
203☒ File info.json already exists, use -f or --force to overwrite.
204``` 169```
205 170
171---
172
173# Developer Commands
174
175## `qmk cformat`
176
177This command formats C code using clang-format.
178
179Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b <branch_name>`
180
181Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
182
183**Usage for specified files**:
184
206``` 185```
207$ qmk kle2json -f kle.txt -f 186qmk cformat [file1] [file2] [...] [fileN]
208Ψ Wrote out to info.json
209``` 187```
210 188
211## `qmk list-keyboards` 189**Usage for all core files**:
212 190
213This command lists all the keyboards currently defined in `qmk_firmware` 191```
192qmk cformat -a
193```
214 194
215**Usage**: 195**Usage for only changed files against origin/master**:
216 196
217``` 197```
218qmk list-keyboards 198qmk cformat
219``` 199```
220 200
221## `qmk list-keymaps` 201**Usage for only changed files against branch_name**:
222 202
223This command lists all the keymaps for a specified keyboard (and revision). 203```
204qmk cformat -b branch_name
205```
206
207## `qmk docs`
208
209This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
224 210
225**Usage**: 211**Usage**:
226 212
227``` 213```
228qmk list-keymaps -kb planck/ez 214qmk docs [-p PORT]
229``` 215```
230 216
231## `qmk new-keymap` 217## `qmk kle2json`
232 218
233This command creates a new keymap based on a keyboard's existing default keymap. 219This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
234 220
235**Usage**: 221**Usage**:
236 222
237``` 223```
238qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] 224qmk kle2json [-f] <filename>
239``` 225```
240 226
241## `qmk pyformat` 227**Examples**:
242 228
243*(dev mode)* 229```
230$ qmk kle2json kle.txt
231☒ File info.json already exists, use -f or --force to overwrite.
232```
233
234```
235$ qmk kle2json -f kle.txt -f
236Ψ Wrote out to info.json
237```
238
239## `qmk pyformat`
244 240
245This command formats python code in `qmk_firmware`. 241This command formats python code in `qmk_firmware`.
246 242
@@ -252,8 +248,6 @@ qmk pyformat
252 248
253## `qmk pytest` 249## `qmk pytest`
254 250
255*(dev mode)*
256
257This command runs the python test suite. If you make changes to python code you should ensure this runs successfully. 251This command runs the python test suite. If you make changes to python code you should ensure this runs successfully.
258 252
259**Usage**: 253**Usage**:
@@ -261,3 +255,4 @@ This command runs the python test suite. If you make changes to python code you
261``` 255```
262qmk pytest 256qmk pytest
263``` 257```
258