qmk_firmware/assets/cli_commands.md.DmaB9sac.js

16 lines
58 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.B9AX-CPi.js";
const __pageData = JSON.parse('{"title":"QMK CLI Commands","description":"","frontmatter":{},"headers":[],"relativePath":"cli_commands.md","filePath":"cli_commands.md","lastUpdated":null}');
const _sfc_main = { name: "cli_commands.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="qmk-cli-commands" tabindex="-1">QMK CLI Commands <a class="header-anchor" href="#qmk-cli-commands" aria-label="Permalink to &quot;QMK CLI Commands&quot;"></a></h1><h1 id="user-commands" tabindex="-1">User Commands <a class="header-anchor" href="#user-commands" aria-label="Permalink to &quot;User Commands&quot;"></a></h1><h2 id="qmk-compile" tabindex="-1"><code>qmk compile</code> <a class="header-anchor" href="#qmk-compile" aria-label="Permalink to &quot;`qmk compile`&quot;"></a></h2><p>This command allows you to compile firmware from any directory. You can compile JSON exports from <a href="https://config.qmk.fm" target="_blank" rel="noreferrer">https://config.qmk.fm</a>, compile keymaps in the repo, or compile the keyboard in the current working directory.</p><p>This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory.</p><p><strong>Usage for Configurator Exports</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk compile [-c] &lt;configuratorExport.json&gt;</span></span></code></pre></div><p><strong>Usage for Keymaps</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk compile [-c] [-e &lt;var&gt;=&lt;value&gt;] [-j &lt;num_jobs&gt;] -kb &lt;keyboard_name&gt; -km &lt;keymap_name&gt;</span></span></code></pre></div><p><strong>Usage in Keyboard Directory</strong>:</p><p>Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with <code>--keymap &lt;keymap_name&gt;</code></p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk compile</span></span></code></pre></div><p><strong>Usage for building all keyboards that support a specific keymap</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk compile -kb all -km &lt;keymap_name&gt;</span></span></code></pre></div><p><strong>Example</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ qmk config compile.keymap=default</span></span>\n<span class="line"><span>$ cd ~/qmk_firmware/keyboards/planck/rev6</span></span>\n<span class="line"><span>$ qmk compile</span></span>\n<span class="line"><span>Ψ Compiling keymap with make planck/rev6:default</span></span>\n<span class="line"><span>...</span></span></code></pre></div><p>or with optional keymap argument</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4</span></span>\n<span class="line"><span>$ qmk compile -km 66_iso</span></span>\n<span class="line"><span>Ψ Compiling keymap with make clueboard/66/rev4:66_iso</span></span>\n<span class="line"><span>...</span></span></code></pre></div><p>or in keymap directory</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak</span></span>\n<span class="line"><span>$ qmk compile</span></span>\n<span class="line"><span>Ψ Compiling keymap with make gh60/satan:colemak</span></span>\n<span class="line"><span>...</span></span></code></pre></div><p><strong>Usage in Layout Directory</strong>:</p><p>Must be under <code>qmk_firmware/layouts/</code>, and in a keymap folder.</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk compile -kb &lt;keyboard_name&gt;</span></span></code></pre></div><p><strong>Example</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi</span></span>\n<span class="line"><span>$ qmk compile -kb dz60</span></span>\n<span class="line"><span>Ψ Compiling keymap with make dz60:mechmerlin-ansi</span></span>\n<span class="line"><span>...</span></span></code></pre></div><p><strong>Parallel Compilation</strong>:</p><p>It is possible to speed up compilation by adding the <code>-j</code>/<code>--parallel</code> flag.</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk compile -j &lt;num_jobs&gt; -kb &lt;keyboard_name&gt;</span></span></code></pre></div><p>The <code>num_jobs</code> argument determines the maximum number of jobs that can be used. Setting it to zero will enable parallel compilation without limiting the maximum number of jobs.</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk compile -j 0 -kb &lt;keyboard_name&gt;</span></span></code></pre></div><h2 id="qmk-flash" tabindex="-1"><code>qmk flash</code> <a class="header-anchor" href="#qmk-flash" aria-label="Permalink to &quot;`qmk flash`&quot;"></a></h2><p>This command is similar to <code>qmk compile</code>, but can also target a bootloader. The bootloader is optional, and is set to <code>:flash</code> by default. To specify a different bootloader, use <code>-bl &lt;bootloader&gt;</code>. Visit the <a href="./flashing">Flashing Firmware</a> guide for more details of the available bootloaders.</p><p>This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory.</p><p>This command can also flash binary firmware files (hex or bin) such as the ones produced by <a href="https://config.qmk.fm" target="_blank" rel="noreferrer">Configurator</a>.</p><p><strong>Usage for Configurator Exports</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk flash [-bl &lt;bootloader&gt;] [-c] [-e &lt;var&gt;=&lt;value&gt;] [-j &lt;num_jobs&gt;] &lt;configuratorExport.json&gt;</span></span></code></pre></div><p><strong>Usage for Keymaps</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk flash -kb &lt;keyboard_name&gt; -km &lt;keymap_name&gt; [-bl &lt;bootloader&gt;] [-c] [-e &lt;var&gt;=&lt;value&gt;] [-j &lt;num_jobs&gt;]</span></span></code></pre></div><p><strong>Usage for pre-compiled firmwares</strong>:</p><p><strong>Note</strong>: The microcontroller needs to be specified (<code>-m</code> argument) for keyboards with the following bootloaders:</p><ul><li>HalfKay</li><li>QMK HID</li><li>USBaspLoader</li></ul><p>ISP flashing is also supported with the following flashers and require the microcontroller to be specified:</p><ul><li>USBasp</li><li>USBtinyISP</li></ul><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk flash [-m &lt;microcontroller&gt;] &lt;compiledFirmware.[bin|hex]&gt;</span></span></code></pre></div><p><strong>Listing the Bootloaders</strong></p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk flash -b</span></span></code></pre></div><h2 id="qmk-config" tabindex="-1"><code>qmk config</code> <a class="header-anchor" href="#qmk-config" aria-label="Permalink to &quot;`qmk config`&quot;"></a></h2><p>This command lets you configure the behavior of QMK. For the full <code>qmk config</code> documentation see <a href="./cli_configuration">CLI Configuration</a>.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]</span></span></code></pre></div><h2 id="qmk-cd" tabindex="-1"><code>qmk cd</code> <a class="header-anchor" href="#qmk-cd" aria-label="Permalink to &quot;`qmk cd`&quot;"></a></h2><p>This command opens a new shell in your <code>qmk_firmware</code> directory.</p><p>Note that if you are already somewhere within <code>QMK_HOME</code> (for example, the <code>keyboards/</code> folder), nothing will happen.</p><p>To exit out into the parent shell, simply type <code>exit</code>.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk cd</span></span></code></pre></div><h2 id="qmk-find" tabindex="-1"><code>qmk find</code> <a class="header-anchor" href="#qmk-find" aria-label="Permalink to &quot;`qmk find`&quot;"></a></h2><p>This command allows for searching through keyboard/keymap targets, filtering by specific criteria. <code>info.json</code> and <code>rules.mk</code> files contribute to the search data, as well as keymap configurations, and the results can be filtered using &quot;dotty&quot; syntax matching the overall <code>info.json</code> file format.</p><p>For example, one could search for all keyboards powered by the STM32F411 microcontroller:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk find -f &#39;processor==STM32F411&#39;</span></span></code></pre></div><p>The list can be further constrained by passing additional filter expressions:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk find -f &#39;processor==STM32F411&#39; -f &#39;features.rgb_matrix==true&#39;</span></span></code></pre></div><p>The following filter expressions are supported:</p><ul><li><code>key == value</code>: Match targets where <code>key</code> is equal to <code>value</code>. May include wildcards such as <code>*</code> and <code>?</code>.</li><li><code>key != value</code>: Match targets where <code>key</code> is not <code>value</code>. May include wildcards such as <code>*</code> and <code>?</code>.</li><li><code>key &lt; value</code>: Match targets where <code>key</code> is a number less than <code>value</code>.</li><li><code>key &gt; value</code>: Match targets where <code>key</code> is a number greater than <code>value</code>.</li><li><code>key &lt;= value</code>: Match targets where <code>key</code> is a number less than or equal to <code>value</code>.</li><li><code>key &gt;= value</code>: Match targets where <code>key</code> is a number greater than or equal to <code>value</code>.</li><li><code>exists(key)</code>: Match targets where <code>key</code> is present.</li><li><code>absent(key)</code>: Match targets where <code>key</code> is not present.</li><li><code>contains(key, value)</code>: Match targets where <code>key</code> contains <code>value</code>. Can be used for strings, arrays and object keys.</li><li><code>length(key, value)</code>: Match targets where the length of <code>key</code> is <code>value</code>. Can be used for strings, arrays and objects.</li></ul><p>You can also list arbitrary values for each matched target with <code>--print</code>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk find -f &#39;processor==STM32F411&#39; -p &#39;keyboard_name&#39; -p &#39;features.rgb_matrix&#39;</span></span></code></pre></div><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk find [-h] [-km KEYMAP] [-p PRINT] [-f FILTER]</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>options:</span></span>\n<span class="line"><span> -km KEYMAP, --keymap KEYMAP</span></span>\n<span class="line"><span> The keymap name to build. Default is &#39;default&#39;.</span></span>\n<span class="line"><span> -p PRINT, --print PRINT</span></span>\n<span class="line"><span> For each matched target, print the value of the supplied info.json key. May be passed multiple times.</span></span>\n<span class="line"><span> -f FILTER, --filter FILTER</span></span>\n<span class="line"><span> Filter the list of keyboards based on their info.json data. Accepts the formats key=value, function(key), or function(key,value), eg. &#39;features.rgblight=true&#39;. Valid functions are &#39;absent&#39;, &#39;contains&#39;, &#39;exists&#39; and &#39;length&#39;. May be passed multiple times; all filters need to match. Value may include wildcards such as &#39;*&#39; and &#39;?&#39;.</span></span></code></pre></div><h2 id="qmk-console" tabindex="-1"><code>qmk console</code> <a class="header-anchor" href="#qmk-console" aria-label="Permalink to &quot;`qmk console`&quot;"></a></h2><p>This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with <code>CONSOLE_ENABLE=yes</code>.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk console [-d &lt;pid&gt;:&lt;vid&gt;[:&lt;index&gt;]] [-l] [-n] [-t] [-w &lt;seconds&gt;]</span></span></code></pre></div><p><strong>Examples</strong>:</p><p>Connect to all available keyboards and show their console messages:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk console</span></span></code></pre></div><p>List all devices:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk console -l</span></span></code></pre></div><p>Show only messages from clueboard/66/rev3 keyboards:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk console -d C1ED:2370</span></span></code></pre></div><p>Show only messages from the second clueboard/66/rev3:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk console -d C1ED:2370:2</span></span></code></pre></div><p>Show timestamps and VID:PID instead of names:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk console -n -t</span></span></code></pre></div><p>Disable bootloader messages:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk console --no-bootloaders</span></span></code></pre></div><h2 id="qmk-doctor" tabindex="-1"><code>qmk doctor</code> <a class="header-anchor" href="#qmk-doctor" aria-label="Permalink to &quot;`qmk doctor`&quot;"></a></h2><p>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.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk doctor [-y] [-n]</span></span></code></pre></div><p><strong>Examples</strong>:</p><p>Check your environment for problems and prompt to fix them:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk doctor</span></span></code></pre></div><p>Check your environment and automatically fix any problems found:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk doctor -y</span></span></code></pre></div><p>Check your environment and report problems only:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk doctor -n</span></span></code></pre></div><h2 id="qmk-format-json" tabindex="-1"><code>qmk format-json</code> <a class="header-anchor" href="#qmk-format-json" aria-label="Permalink to &quot;`qmk format-json`&quot;"></a></h2><p>Formats a JSON file in a (mostly) human-friendly way. Will usually correctly detect the format of the JSON (info.json or keymap.json) but you can override this with <code>--format</code> if necessary.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk format-json [-f FORMAT] &lt;json_file&gt;</span></span></code></pre></div><h2 id="qmk-info" tabindex="-1"><code>qmk info</code> <a class="header-anchor" href="#qmk-info" aria-label="Permalink to &quot;`qmk info`&quot;"></a></h2><p>Displays information about keyboards and keymaps in QMK. You can use this to get information about a keyboard, show the layouts, display the underlying key matrix, or to pretty-print JSON keymaps.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk info [-f FORMAT] [-m] [-l] [-km KEYMAP] [-kb KEYBOARD]</span></span></code></pre></div><p>This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory.</p><p><strong>Examples</strong>:</p><p>Show basic information for a keyboard:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk info -kb planck/rev5</span></span></code></pre></div><p>Show the matrix for a keyboard:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk info -kb ergodox_ez -m</span></span></code></pre></div><p>Show a JSON keymap for a keyboard:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk info -kb clueboard/california -km default</span></span></code></pre></div><h2 id="qmk-json2c" tabindex="-1"><code>qmk json2c</code> <a class="header-anchor" href="#qmk-json2c" aria-label="Permalink to &quot;`qmk json2c`&quot;"></a></h2><p>Creates a keymap.c from a QMK Configurator export.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk json2c [-o OUTPUT] filename</span></span></code></pre></div><h2 id="qmk-c2json" tabindex="-1"><code>qmk c2json</code> <a class="header-anchor" href="#qmk-c2json" aria-label="Permalink to &quot;`qmk c2json`&quot;"></a></h2><p>Creates a keymap.json from a keymap.c.</p><p><strong>Note:</strong> Parsing C source files is not easy, therefore this subcommand may not work with your keymap. In some cases not using the C pre-processor helps.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk c2json -km KEYMAP -kb KEYBOARD [-q] [--no-cpp] [-o OUTPUT] filename</span></span></code></pre></div><p><strong>Examples</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk c2json -km default -kb handwired/dactyl_promicro</span></span></code></pre></div><p>or with filename:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk c2json keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c</span></span></code></pre></div><h2 id="qmk-lint" tabindex="-1"><code>qmk lint</code> <a class="header-anchor" href="#qmk-lint" aria-label="Permalink to &quot;`qmk lint`&quot;"></a></h2><p>Checks over a keyboard and/or keymap and highlights common errors, problems, and anti-patterns.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk lint [-km KEYMAP] [-kb KEYBOARD] [--strict]</span></span></code></pre></div><p>This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory.</p><p><strong>Examples</strong>:</p><p>Do a basic lint check:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk lint -kb rominronin/katana60/rev2</span></span></code></pre></div><h2 id="qmk-list-keyboards" tabindex="-1"><code>qmk list-keyboards</code> <a class="header-anchor" href="#qmk-list-keyboards" aria-label="Permalink to &quot;`qmk list-keyboards`&quot;"></a></h2><p>This command lists all the keyboards currently defined in <code>qmk_firmware</code></p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk list-keyboards</span></span></code></pre></div><h2 id="qmk-list-keymaps" tabindex="-1"><code>qmk list-keymaps</code> <a class="header-anchor" href="#qmk-list-keymaps" aria-label="Permalink to &quot;`qmk list-keymaps`&quot;"></a></h2><p>This command lists all the keymaps for a specified keyboard (and revision).</p><p>This command is directory aware. It will automatically fill in KEYBOARD if you are in a keyboard directory.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk list-keymaps -kb planck/ez</span></span></code></pre></div><h2 id="qmk-migrate" tabindex="-1"><code>qmk migrate</code> <a class="header-anchor" href="#qmk-migrate" aria-label="Permalink to &quot;`qmk migrate`&quot;"></a></h2><p>This command searches for legacy code that can be converted to the new <code>info.json</code> format and adds it to the specified keyboard&#39;s <code>info.json</code>.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk migrate [-h] -kb KEYBOARD [-f FILTER]</span></span></code></pre></div><h2 id="qmk-new-keyboard" tabindex="-1"><code>qmk new-keyboard</code> <a class="header-anchor" href="#qmk-new-keyboard" aria-label="Permalink to &quot;`qmk new-keyboard`&quot;"></a></h2><p>This command creates a new keyboard based on available templates.</p><p>Any arguments that are not provided will prompt for input. If <code>-u</code> is not passed and <code>user.name</code> is set in .gitconfig, it will be used as the default username in the prompt.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk new-keyboard [-kb KEYBOARD] [-t {atmega32u4,STM32F303,etc}] [-l {60_ansi,75_iso,etc}] -u USERNAME</span></span></code></pre></div><h2 id="qmk-new-keymap" tabindex="-1"><code>qmk new-keymap</code> <a class="header-anchor" href="#qmk-new-keymap" aria-label="Permalink to &quot;`qmk new-keymap`&quot;"></a></h2><p>This command creates a new keymap based on a keyboard&#39;s existing default keymap.</p><p>This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]</span></span></code></pre></div><h2 id="qmk-clean" tabindex="-1"><code>qmk clean</code> <a class="header-anchor" href="#qmk-clean" aria-label="Permalink to &quot;`qmk clean`&quot;"></a></h2><p>This command cleans up the <code>.build</code> folder. If <code>--all</code> is passed, any .hex or .bin files present in the <code>qmk_firmware</code> directory will also be deleted.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk clean [-a]</span></span></code></pre></div><h2 id="qmk-via2json" tabindex="-1"><code>qmk via2json</code> <a class="header-anchor" href="#qmk-via2json" aria-label="Permalink to &quot;`qmk via2json`&quot;"></a></h2><p>This command an generate a keymap.json from a VIA keymap backup. Both the layers and the macros are converted, enabling users to easily move away from a VIA-enabled firmware without writing any code or reimplementing their keymaps in QMK Configurator.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk via2json -kb KEYBOARD [-l LAYOUT] [-km KEYMAP] [-o OUTPUT] filename</span></span></code></pre></div><p><strong>Example:</strong></p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ qmk via2json -kb ai03/polaris -o polaris_keymap.json polaris_via_backup.json</span></span>\n<span class="line"><span>Ψ Wrote keymap to /home/you/qmk_firmware/polaris_keymap.json</span></span></code></pre></div><h2 id="qmk-import-keyboard" tabindex="-1"><code>qmk import-keyboard</code> <a class="header-anchor" href="#qmk-import-keyboard" aria-label="Permalink to &quot;`qmk import-keyboard`&quot;"></a></h2><p>This command imports a data-driven <code>info.json</code> keyboard into the repo.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>usage: qmk import-keyboard [-h] filename</span></span></code></pre></div><p><strong>Example:</strong></p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ qmk import-keyboard ~/Downloads/forever60.json</span></span>\n<span class="line"><span>Ψ Importing forever60.json.</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>Ψ Imported a new keyboard named forever60.</span></span>\n<span class="line"><span>Ψ To start working on things, `cd` into keyboards/forever60,</span></span>\n<span class="line"><span>Ψ or open the directory in your preferred text editor.</span></span>\n<span class="line"><span>Ψ And build with qmk compile -kb forever60 -km default.</span></span></code></pre></div><h2 id="qmk-import-keymap" tabindex="-1"><code>qmk import-keymap</code> <a class="header-anchor" href="#qmk-import-keymap" aria-label="Permalink to &quot;`qmk import-keymap`&quot;"></a></h2><p>This command imports a data-driven <code>keymap.json</code> keymap into the repo.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>usage: qmk import-keymap [-h] filename</span></span></code></pre></div><p><strong>Example:</strong></p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk import-keymap ~/Downloads/asdf2.json</span></span>\n<span class="line"><span>Ψ Importing asdf2.json.</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>Ψ Imported a new keymap named asdf2.</span></span>\n<span class="line"><span>Ψ To start working on things, `cd` into keyboards/takashicompany/dogtag/keymaps/asdf2,</span></span>\n<span class="line"><span>Ψ or open the directory in your preferred text editor.</span></span>\n<span class="line"><span>Ψ And build with qmk compile -kb takashicompany/dogtag -km asdf2.</span></span></code></pre></div><h2 id="qmk-import-kbfirmware" tabindex="-1"><code>qmk import-kbfirmware</code> <a class="header-anchor" href="#qmk-import-kbfirmware" aria-label="Permalink to &quot;`qmk import-kbfirmware`&quot;"></a></h2><p>This command creates a new keyboard based on a <a href="https://kbfirmware.com/" target="_blank" rel="noreferrer">Keyboard Firmware Builder</a> export.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>usage: qmk import-kbfirmware [-h] filename</span></span></code></pre></div><p><strong>Example:</strong></p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ qmk import-kbfirmware ~/Downloads/gh62.json</span></span>\n<span class="line"><span>Ψ Importing gh62.json.</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>⚠ Support here is basic - Consider using &#39;qmk new-keyboard&#39; instead</span></span>\n<span class="line"><span>Ψ Imported a new keyboard named gh62.</span></span>\n<span class="line"><span>Ψ To start working on things, `cd` into keyboards/gh62,</span></span>\n<span class="line"><span>Ψ or open the directory in your preferred text editor.</span></span>\n<span class="line"><span>Ψ And build with qmk compile -kb gh62 -km default.</span></span></code></pre></div><hr><h1 id="external-userspace-commands" tabindex="-1">External Userspace Commands <a class="header-anchor" href="#external-userspace-commands" aria-label="Permalink to &quot;External Userspace Commands&quot;"></a></h1><h2 id="qmk-userspace-add" tabindex="-1"><code>qmk userspace-add</code> <a class="header-anchor" href="#qmk-userspace-add" aria-label="Permalink to &quot;`qmk userspace-add`&quot;"></a></h2><p>This command adds a keyboard/keymap to the External Userspace build targets.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk userspace-add [-h] [-km KEYMAP] [-kb KEYBOARD] [builds ...]</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>positional arguments:</span></span>\n<span class="line"><span> builds List of builds in form &lt;keyboard&gt;:&lt;keymap&gt;, or path to a keymap JSON file.</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>options:</span></span>\n<span class="line"><span> -h, --help show this help message and exit</span></span>\n<span class="line"><span> -km KEYMAP, --keymap KEYMAP</span></span>\n<span class="line"><span> The keymap to build a firmware for. Ignored when a configurator export is supplied.</span></span>\n<span class="line"><span> -kb KEYBOARD, --keyboard KEYBOARD</span></span>\n<span class="line"><span> The keyboard to build a firmware for. Ignored when a configurator export is supplied.</span></span></code></pre></div><p><strong>Example</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ qmk userspace-add -kb planck/rev6 -km default</span></span>\n<span class="line"><span>Ψ Added planck/rev6:default to userspace build targets</span></span>\n<span class="line"><span>Ψ Saved userspace file to /home/you/qmk_userspace/qmk.json</span></span></code></pre></div><h2 id="qmk-userspace-remove" tabindex="-1"><code>qmk userspace-remove</code> <a class="header-anchor" href="#qmk-userspace-remove" aria-label="Permalink to &quot;`qmk userspace-remove`&quot;"></a></h2><p>This command removes a keyboard/keymap from the External Userspace build targets.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk userspace-remove [-h] [-km KEYMAP] [-kb KEYBOARD] [builds ...]</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>positional arguments:</span></span>\n<span class="line"><span> builds List of builds in form &lt;keyboard&gt;:&lt;keymap&gt;, or path to a keymap JSON file.</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>options:</span></span>\n<span class="line"><span> -h, --help show this help message and exit</span></span>\n<span class="line"><span> -km KEYMAP, --keymap KEYMAP</span></span>\n<span class="line"><span> The keymap to build a firmware for. Ignored when a configurator export is supplied.</span></span>\n<span class="line"><span> -kb KEYBOARD, --keyboard KEYBOARD</span></span>\n<span class="line"><span> The keyboard to build a firmware for. Ignored when a configurator export is supplied.</span></span></code></pre></div><p><strong>Example</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ qmk userspace-remove -kb planck/rev6 -km default</span></span>\n<span class="line"><span>Ψ Removed planck/rev6:default from userspace build targets</span></span>\n<span class="line"><span>Ψ Saved userspace file to /home/you/qmk_userspace/qmk.json</span></span></code></pre></div><h2 id="qmk-userspace-list" tabindex="-1"><code>qmk userspace-list</code> <a class="header-anchor" href="#qmk-userspace-list" aria-label="Permalink to &quot;`qmk userspace-list`&quot;"></a></h2><p>This command lists the External Userspace build targets.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk userspace-list [-h] [-e]</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>options:</span></span>\n<span class="line"><span> -h, --help show this help message and exit</span></span>\n<span class="line"><span> -e, --expand Expands any use of `all` for either keyboard or keymap.</span></span></code></pre></div><p><strong>Example</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ qmk userspace-list</span></span>\n<span class="line"><span>Ψ Current userspace build targets:</span></span>\n<span class="line"><span>Ψ Keyboard: planck/rev6, keymap: you</span></span>\n<span class="line"><span>Ψ Keyboard: clueboard/66/rev3, keymap: you</span></span></code></pre></div><h2 id="qmk-userspace-compile" tabindex="-1"><code>qmk userspace-compile</code> <a class="header-anchor" href="#qmk-userspace-compile" aria-label="Permalink to &quot;`qmk userspace-compile`&quot;"></a></h2><p>This command compiles all the External Userspace build targets.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk userspace-compile [-h] [-e ENV] [-n] [-c] [-j PARALLEL] [-t]</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>options:</span></span>\n<span class="line"><span> -h, --help show this help message and exit</span></span>\n<span class="line"><span> -e ENV, --env ENV Set a variable to be passed to make. May be passed multiple times.</span></span>\n<span class="line"><span> -n, --dry-run Don&#39;t actually build, just show the commands to be run.</span></span>\n<span class="line"><span> -c, --clean Remove object files before compiling.</span></span>\n<span class="line"><span> -j PARALLEL, --parallel PARALLEL</span></span>\n<span class="line"><span> Set the number of parallel make jobs; 0 means unlimited.</span></span>\n<span class="line"><span> -t, --no-temp Remove temporary files during build.</span></span></code></pre></div><p><strong>Example</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ qmk userspace-compile</span></span>\n<span class="line"><span>Ψ Preparing target list...</span></span>\n<span class="line"><span>Build planck/rev6:you [OK]</span></span>\n<span class="line"><span>Build clueboard/66/rev3:you [OK]</span></span></code></pre></div><h2 id="qmk-userspace-doctor" tabindex="-1"><code>qmk userspace-doctor</code> <a class="header-anchor" href="#qmk-userspace-doctor" aria-label="Permalink to &quot;`qmk userspace-doctor`&quot;"></a></h2><p>This command examines your environment and alerts you to potential problems related to External Userspace.</p><p><strong>Example</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>% qmk userspace-doctor</span></span>\n<span class="line"><span>Ψ QMK home: /home/you/qmk_userspace/qmk_firmware</span></span>\n<span class="line"><span>Ψ Testing userspace candidate: /home/you/qmk_userspace -- Valid `qmk.json`</span></span>\n<span class="line"><span>Ψ QMK userspace: /home/you/qmk_userspace</span></span>\n<span class="line"><span>Ψ Userspace enabled: True</span></span></code></pre></div><hr><h1 id="developer-commands" tabindex="-1">Developer Commands <a class="header-anchor" href="#developer-commands" aria-label="Permalink to &quot;Developer Commands&quot;"></a></h1><h2 id="qmk-format-text" tabindex="-1"><code>qmk format-text</code> <a class="header-anchor" href="#qmk-format-text" aria-label="Permalink to &quot;`qmk format-text`&quot;"></a></h2><p>This command formats text files to have proper line endings.</p><p>Every text file in the repository needs to have Unix (LF) line ending. If you are working on <strong>Windows</strong>, you must ensure that line endings are corrected in order to get your PRs merged.</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk format-text</span></span></code></pre></div><h2 id="qmk-format-c" tabindex="-1"><code>qmk format-c</code> <a class="header-anchor" href="#qmk-format-c" aria-label="Permalink to &quot;`qmk format-c`&quot;"></a></h2><p>This command formats C code using clang-format.</p><p>Run it with no arguments to format all core code that has been changed. Default checks <code>origin/master</code> with <code>git diff</code>, branch can be changed using <code>-b &lt;branch_name&gt;</code></p><p>Run it with <code>-a</code> to format all core code, or pass filenames on the command line to run it on specific files.</p><p><strong>Usage for specified files</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk format-c [file1] [file2] [...] [fileN]</span></span></code></pre></div><p><strong>Usage for all core files</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk format-c -a</span></span></code></pre></div><p><strong>Usage for only changed files against origin/master</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk format-c</span></span></code></pre></div><p><strong>Usage for only changed files against branch_name</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk format-c -b branch_name</span></span></code></pre></div><h2 id="qmk-generate-compilation-database" tabindex="-1"><code>qmk generate-compilation-database</code> <a class="header-anchor" href="#qmk-generate-compilation-database" aria-label="Permalink to &quot;`qmk generate-compilation-database`&quot;"></a></h2><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP]</span></span></code></pre></div><p>Creates a <code>compile_commands.json</code> file.</p><p>Does your IDE/editor use a language server but doesn&#39;t <em>quite</em> find all the necessary include files? Do you hate red squigglies? Do you wish your editor could figure out <code>#include QMK_KEYBOARD_H</code>? You might need a <a href="https://clang.llvm.org/docs/JSONCompilationDatabase.html" target="_blank" rel="noreferrer">compilation database</a>! The qmk tool can build this for you.</p><p>This command needs to know which keyboard and keymap to build. It uses the same configuration options as the <code>qmk compile</code> command: arguments, current directory, and config files.</p><p><strong>Example:</strong></p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak</span></span>\n<span class="line"><span>$ qmk generate-compilation-database</span></span>\n<span class="line"><span>Ψ Making clean</span></span>\n<span class="line"><span>Ψ Gathering build instructions from make -n gh60/satan:colemak</span></span>\n<span class="line"><span>Ψ Found 50 compile commands</span></span>\n<span class="line"><span>Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json</span></span></code></pre></div><p>Now open your dev environment and live a squiggly-free life.</p><h2 id="qmk-docs" tabindex="-1"><code>qmk docs</code> <a class="header-anchor" href="#qmk-docs" aria-label="Permalink to &quot;`qmk docs`&quot;"></a></h2><p>This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 5173.</p><p>This command requires <code>node</code> and <code>yarn</code> to be installed as prerequisites, and provides live reload capability whilst editing.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>usage: qmk docs [-h]</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>options:</span></span>\n<span class="line"><span> -h, --help show this help message and exit</span></span></code></pre></div><h2 id="qmk-generate-docs" tabindex="-1"><code>qmk generate-docs</code> <a class="header-anchor" href="#qmk-generate-docs" aria-label="Permalink to &quot;`qmk generate-docs`&quot;"></a></h2><p>This command allows you to generate QMK documentation locally. It can be uses for general browsing or improving the docs. Use the <code>-s</code>/<code>--serve</code> flag to also serve the static site once built. Default port is 4173.</p><p>This command requires <code>node</code> and <code>yarn</code> to be installed as prerequisites, and requires the operating system to support symlinks.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>usage: qmk generate-docs [-h] [-s]</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>options:</span></span>\n<span class="line"><span> -h, --help show this help message and exit</span></span>\n<span class="line"><span> -s, --serve Serves the generated docs once built.</span></span></code></pre></div><h2 id="qmk-generate-rgb-breathe-table" tabindex="-1"><code>qmk generate-rgb-breathe-table</code> <a class="header-anchor" href="#qmk-generate-rgb-breathe-table" aria-label="Permalink to &quot;`qmk generate-rgb-breathe-table`&quot;"></a></h2><p>This command generates a lookup table (LUT) header file for the <a href="./features/rgblight">RGB Lighting</a> feature&#39;s breathing animation. Place this file in your keyboard or keymap directory as <code>rgblight_breathe_table.h</code> to override the default LUT in <code>quantum/rgblight/</code>.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk generate-rgb-breathe-table [-q] [-o OUTPUT] [-m MAX] [-c CENTER]</span></span></code></pre></div><h2 id="qmk-kle2json" tabindex="-1"><code>qmk kle2json</code> <a class="header-anchor" href="#qmk-kle2json" aria-label="Permalink to &quot;`qmk kle2json`&quot;"></a></h2><p>This 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 <code>info.json</code> if it is already present. Use the <code>-f</code> or <code>--force</code> flag to overwrite.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk kle2json [-f] &lt;filename&gt;</span></span></code></pre></div><p><strong>Examples</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ qmk kle2json kle.txt</span></span>\n<span class="line"><span>☒ File info.json already exists, use -f or --force to overwrite.</span></span></code></pre></div><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>$ qmk kle2json -f kle.txt -f</span></span>\n<span class="line"><span>Ψ Wrote out to info.json</span></span></code></pre></div><h2 id="qmk-format-python" tabindex="-1"><code>qmk format-python</code> <a class="header-anchor" href="#qmk-format-python" aria-label="Permalink to &quot;`qmk format-python`&quot;"></a></h2><p>This command formats python code in <code>qmk_firmware</code>.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk format-python</span></span></code></pre></div><h2 id="qmk-pytest" tabindex="-1"><code>qmk pytest</code> <a class="header-anchor" href="#qmk-pytest" aria-label="Permalink to &quot;`qmk pytest`&quot;"></a></h2><p>This command runs the python test suite. If you make changes to python code you should ensure this runs successfully.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk pytest [-t TEST]</span></span></code></pre></div><p><strong>Examples</strong>:</p><p>Run entire test suite:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk pytest</span></span></code></pre></div><p>Run test group:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk pytest -t qmk.tests.test_cli_commands</span></span></code></pre></div><p>Run single test:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk pytest -t qmk.tests.test_cli_commands.test_c2json</span></span>\n<span class="line"><span>qmk pytest -t qmk.tests.test_qmk_path</span></span></code></pre></div><h2 id="qmk-painter-convert-graphics" tabindex="-1"><code>qmk painter-convert-graphics</code> <a class="header-anchor" href="#qmk-painter-convert-graphics" aria-label="Permalink to &quot;`qmk painter-convert-graphics`&quot;"></a></h2><p>This command converts images to a format usable by QMK, i.e. the QGF File Format. See the <a href="./quantum_painter#quantum-painter-cli">Quantum Painter</a> documentation for more information on this command.</p><h2 id="qmk-painter-make-font-image" tabindex="-1"><code>qmk painter-make-font-image</code> <a class="header-anchor" href="#qmk-painter-make-font-image" aria-label="Permalink to &quot;`qmk painter-make-font-image`&quot;"></a></h2><p>This command converts a TTF font to an intermediate format for editing, before converting to the QFF File Format. See the <a href="./quantum_painter#quantum-painter-cli">Quantum Painter</a> documentation for more information on this command.</p><h2 id="qmk-painter-convert-font-image" tabindex="-1"><code>qmk painter-convert-font-image</code> <a class="header-anchor" href="#qmk-painter-convert-font-image" aria-label="Permalink to &quot;`qmk painter-convert-font-image`&quot;"></a></h2><p>This command converts an intermediate font image to the QFF File Format. See the <a href="./quantum_painter#quantum-painter-cli">Quantum Painter</a> documentation for more information on this command.</p><h2 id="qmk-test-c" tabindex="-1"><code>qmk test-c</code> <a class="header-anchor" href="#qmk-test-c" aria-label="Permalink to &quot;`qmk test-c`&quot;"></a></h2><p>This command runs the C unit test suite. If you make changes to C code you should ensure this runs successfully.</p><p><strong>Usage</strong>:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk test-c [-h] [-t TEST] [-l] [-c] [-e ENV] [-j PARALLEL]</span></span>\n<span class="line"><span></span></span>\n<span class="line"><span>options:</span></span>\n<span class="line"><span> -h, --help show this help message and exit</span></span>\n<span class="line"><span> -t TEST, --test TEST Test to run from the available list. Supports wildcard globs. May be passed multiple times.</span></span>\n<span class="line"><span> -l, --list List available tests.</span></span>\n<span class="line"><span> -c, --clean Remove object files before compiling.</span></span>\n<span class="line"><span> -e ENV, --env ENV Set a variable to be passed to make. May be passed multiple times.</span></span>\n<span class="line"><span> -j PARALLEL, --parallel PARALLEL</span></span>\n<span class="line"><span> Set the number of parallel make jobs; 0 means unlimited.</span></span></code></pre></div><p><strong>Examples</strong>:</p><p>Run entire test suite:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk test-c</span></span></code></pre></div><p>List available tests:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk test-c --list</span></span></code></pre></div><p>Run matching test:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk test-c --test unicode*</span></span></code></pre></div><p>Run single test:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span>qmk test-c --test basic</span></span></code></pre></div>', 296);
const _hoisted_297 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_297);
}
const cli_commands = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
cli_commands as default
};