summaryrefslogtreecommitdiff
path: root/docs/cli_commands.md
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2025-05-06 09:52:41 +1000
committerGitHub <noreply@github.com>2025-05-06 09:52:41 +1000
commitac991405d0c9f47e815786f4732edd00d0f4f571 (patch)
tree218b9903db6c5dc3ff74582829787751a2ae0081 /docs/cli_commands.md
parent842c8401452f83e691a9df97ffba52a389c885c8 (diff)
Deprecate `qmk generate-compilation-database`. (#25237)
Diffstat (limited to 'docs/cli_commands.md')
-rw-r--r--docs/cli_commands.md58
1 files changed, 30 insertions, 28 deletions
diff --git a/docs/cli_commands.md b/docs/cli_commands.md
index d17b0eda23..c6a7ffe191 100644
--- a/docs/cli_commands.md
+++ b/docs/cli_commands.md
@@ -17,7 +17,7 @@ qmk compile [-c] <configuratorExport.json>
17**Usage for Keymaps**: 17**Usage for Keymaps**:
18 18
19``` 19```
20qmk compile [-c] [-e <var>=<value>] [-j <num_jobs>] -kb <keyboard_name> -km <keymap_name> 20qmk compile [-c] [-e <var>=<value>] [-j <num_jobs>] [--compiledb] -kb <keyboard_name> -km <keymap_name>
21``` 21```
22 22
23**Usage in Keyboard Directory**: 23**Usage in Keyboard Directory**:
@@ -84,6 +84,25 @@ The `num_jobs` argument determines the maximum number of jobs that can be used.
84qmk compile -j 0 -kb <keyboard_name> 84qmk compile -j 0 -kb <keyboard_name>
85``` 85```
86 86
87**Compilation Database**:
88
89Creates a `compile_commands.json` file.
90
91Does 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)! Compiling using this argument can create this for you.
92
93**Example:**
94
95```
96$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
97$ qmk compile --compiledb
98Ψ Making clean
99Ψ Gathering build instructions from make ........
100Ψ Found 63 compile commands
101Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json
102Ψ Compiling keymap with make ........
103... build log continues ...
104```
105
87## `qmk flash` 106## `qmk flash`
88 107
89This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default. To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing) guide for more details of the available bootloaders. 108This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default. To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing) guide for more details of the available bootloaders.
@@ -694,33 +713,6 @@ qmk format-c
694qmk format-c -b branch_name 713qmk format-c -b branch_name
695``` 714```
696 715
697## `qmk generate-compilation-database`
698
699**Usage**:
700
701```
702qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP]
703```
704
705Creates a `compile_commands.json` file.
706
707Does 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.
708
709This 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.
710
711**Example:**
712
713```
714$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
715$ qmk generate-compilation-database
716Ψ Making clean
717Ψ Gathering build instructions from make -n gh60/satan:colemak
718Ψ Found 50 compile commands
719Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json
720```
721
722Now open your dev environment and live a squiggly-free life.
723
724## `qmk docs` 716## `qmk docs`
725 717
726This command starts a local HTTP server which you can use for browsing or improving the docs, and provides live reload capability whilst editing. Default port is 8936. 718This command starts a local HTTP server which you can use for browsing or improving the docs, and provides live reload capability whilst editing. Default port is 8936.
@@ -885,3 +877,13 @@ Run single test:
885``` 877```
886qmk test-c --test basic 878qmk test-c --test basic
887``` 879```
880
881## `qmk generate-compilation-database`
882
883**Usage**:
884
885```
886qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP]
887```
888
889This command has been deprecated as it cannot take into account configurables such as [converters](/feature_converters) or environment variables normally specified on the command line; please use the `--compiledb` flag with `qmk compile` instead.