diff options
Diffstat (limited to 'docs/cli_commands.md')
-rw-r--r-- | docs/cli_commands.md | 75 |
1 files changed, 27 insertions, 48 deletions
diff --git a/docs/cli_commands.md b/docs/cli_commands.md index e498f3b22..9113e3b02 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md | |||
@@ -118,54 +118,6 @@ This command lets you configure the behavior of QMK. For the full `qmk config` d | |||
118 | qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] | 118 | qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] |
119 | ``` | 119 | ``` |
120 | 120 | ||
121 | ## `qmk console` | ||
122 | |||
123 | This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with `CONSOLE_ENABLE=yes`. | ||
124 | |||
125 | **Usage**: | ||
126 | |||
127 | ``` | ||
128 | qmk console [-d <pid>:<vid>[:<index>]] [-l] [-n] [-t] [-w <seconds>] | ||
129 | ``` | ||
130 | |||
131 | **Examples**: | ||
132 | |||
133 | Connect to all available keyboards and show their console messages: | ||
134 | |||
135 | ``` | ||
136 | qmk console | ||
137 | ``` | ||
138 | |||
139 | List all devices: | ||
140 | |||
141 | ``` | ||
142 | qmk console -l | ||
143 | ``` | ||
144 | |||
145 | Show only messages from clueboard/66/rev3 keyboards: | ||
146 | |||
147 | ``` | ||
148 | qmk console -d C1ED:2370 | ||
149 | ``` | ||
150 | |||
151 | Show only messages from the second clueboard/66/rev3: | ||
152 | |||
153 | ``` | ||
154 | qmk console -d C1ED:2370:2 | ||
155 | ``` | ||
156 | |||
157 | Show timestamps and VID:PID instead of names: | ||
158 | |||
159 | ``` | ||
160 | qmk console -n -t | ||
161 | ``` | ||
162 | |||
163 | Disable bootloader messages: | ||
164 | |||
165 | ``` | ||
166 | qmk console --no-bootloaders | ||
167 | ``` | ||
168 | |||
169 | ## `qmk doctor` | 121 | ## `qmk doctor` |
170 | 122 | ||
171 | This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to. | 123 | This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to. |
@@ -368,6 +320,33 @@ qmk format-c | |||
368 | qmk format-c -b branch_name | 320 | qmk format-c -b branch_name |
369 | ``` | 321 | ``` |
370 | 322 | ||
323 | ## `qmk generate-compilation-database` | ||
324 | |||
325 | **Usage**: | ||
326 | |||
327 | ``` | ||
328 | qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP] | ||
329 | ``` | ||
330 | |||
331 | Creates a `compile_commands.json` file. | ||
332 | |||
333 | Does your IDE/editor use a language server but doesn't _quite_ find all the necessary include files? Do you hate red squigglies? Do you wish your editor could figure out `#include QMK_KEYBOARD_H`? You might need a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)! The qmk tool can build this for you. | ||
334 | |||
335 | This command needs to know which keyboard and keymap to build. It uses the same configuration options as the `qmk compile` command: arguments, current directory, and config files. | ||
336 | |||
337 | **Example:** | ||
338 | |||
339 | ``` | ||
340 | $ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak | ||
341 | $ qmk generate-compilation-database | ||
342 | Ψ Making clean | ||
343 | Ψ Gathering build instructions from make -n gh60/satan:colemak | ||
344 | Ψ Found 50 compile commands | ||
345 | Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json | ||
346 | ``` | ||
347 | |||
348 | Now open your dev environment and live a squiggly-free life. | ||
349 | |||
371 | ## `qmk docs` | 350 | ## `qmk docs` |
372 | 351 | ||
373 | This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936. | 352 | This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936. |