aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskullydazed <skullydazed@users.noreply.github.com>2020-03-15 07:48:44 -0700
committerGitHub <noreply@github.com>2020-03-15 07:48:44 -0700
commitdc68418660e9ba1d21e391548038652b793790a7 (patch)
tree51cd5c8f05a5ab177f50c31718d88cbe0d0e1154
parent499d7c8ce610a3c150c64eaacbca3038f7796cc5 (diff)
downloadqmk_firmware-dc68418660e9ba1d21e391548038652b793790a7.tar.gz
qmk_firmware-dc68418660e9ba1d21e391548038652b793790a7.zip
Fix some broken links in the docs (#8394)
* fix some broken links * remove duplicate and confusing material from cli.md * Switch brazil to the 2 letter country code * Update docs/_langs.md Co-Authored-By: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--docs/_summary.md2
-rw-r--r--docs/cli.md287
-rw-r--r--docs/cli_commands.md247
-rw-r--r--docs/cli_configuration.md (renamed from docs/cli_dev_configuration.md)0
-rw-r--r--docs/index.html1
5 files changed, 254 insertions, 283 deletions
diff --git a/docs/_summary.md b/docs/_summary.md
index 9eb58b9a8..e7e9fa132 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -18,7 +18,6 @@
18 * [Overview](newbs_building_firmware_configurator.md) 18 * [Overview](newbs_building_firmware_configurator.md)
19 * [Step by Step](configurator_step_by_step.md) 19 * [Step by Step](configurator_step_by_step.md)
20 * [Troubleshooting](configurator_troubleshooting.md) 20 * [Troubleshooting](configurator_troubleshooting.md)
21 * [Problems and Bugs](configurator_problems.md)
22 * QMK API 21 * QMK API
23 * [Overview](api_overview.md) 22 * [Overview](api_overview.md)
24 * [API Documentation](api_docs.md) 23 * [API Documentation](api_docs.md)
@@ -128,7 +127,6 @@
128 * Python Development 127 * Python Development
129 * [Coding Conventions](coding_conventions_python.md) 128 * [Coding Conventions](coding_conventions_python.md)
130 * [QMK CLI Development](cli_development.md) 129 * [QMK CLI Development](cli_development.md)
131 * [QMK CLI Config](cli_dev_configuration.md)
132 130
133 * Configurator Development 131 * Configurator Development
134 * QMK API 132 * QMK API
diff --git a/docs/cli.md b/docs/cli.md
index 61f838536..165f2a372 100644
--- a/docs/cli.md
+++ b/docs/cli.md
@@ -1,24 +1,14 @@
1# QMK CLI 1# QMK CLI
2 2
3This page describes how to setup and use the QMK CLI. 3## Overview
4
5# Overview
6 4
7The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to simplify and streamline tasks such as obtaining and compiling the QMK firmware, creating keymaps, and more. 5The QMK CLI makes building and working with QMK keyboards easier. We have provided a number of commands to simplify and streamline tasks such as obtaining and compiling the QMK firmware, creating keymaps, and more.
8 6
9* [Global CLI](#global-cli) 7### Requirements
10* [Local CLI](#local-cli)
11* [CLI Commands](#cli-commands)
12
13# Requirements
14
15The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt).
16 8
17# Global CLI 9The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI.
18 10
19QMK provides an installable CLI that can be used to setup your QMK build environment, work with QMK, and which makes working with multiple copies of `qmk_firmware` easier. We recommend installing and updating this periodically. 11### Install Using Homebrew (macOS, some Linux)
20
21## Install Using Homebrew (macOS, some Linux)
22 12
23If you have installed [Homebrew](https://brew.sh) you can tap and install QMK: 13If you have installed [Homebrew](https://brew.sh) you can tap and install QMK:
24 14
@@ -29,7 +19,7 @@ export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
29qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment 19qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
30``` 20```
31 21
32## Install Using easy_install or pip 22### Install Using easy_install or pip
33 23
34If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command: 24If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command:
35 25
@@ -39,7 +29,7 @@ export QMK_HOME='~/qmk_firmware' # Optional, set the location for `qmk_firmware`
39qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment 29qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build environment
40``` 30```
41 31
42## Packaging For Other Operating Systems 32### Packaging For Other Operating Systems
43 33
44We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines: 34We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines:
45 35
@@ -47,268 +37,3 @@ We are looking for people to create and maintain a `qmk` package for more operat
47 * Document why in a comment when you do deviate 37 * Document why in a comment when you do deviate
48* Install using a virtualenv 38* Install using a virtualenv
49* Instruct the user to set the environment variable `QMK_HOME` to have the firmware source checked out somewhere other than `~/qmk_firmware`. 39* Instruct the user to set the environment variable `QMK_HOME` to have the firmware source checked out somewhere other than `~/qmk_firmware`.
50
51# Local CLI
52
53If you do not want to use the global CLI there is a local CLI bundled with `qmk_firmware`. You can find it in `qmk_firmware/bin/qmk`. You can run the `qmk` command from any directory and it will always operate on that copy of `qmk_firmware`.
54
55**Example**:
56
57```
58$ ~/qmk_firmware/bin/qmk hello
59Ψ Hello, World!
60```
61
62## Local CLI Limitations
63
64There are some limitations to the local CLI compared to the global CLI:
65
66* The local CLI does not support `qmk setup` or `qmk clone`
67* The local CLI always operates on the same `qmk_firmware` tree, even if you have multiple repositories cloned.
68* The local CLI does not run in a virtualenv, so it's possible that dependencies will conflict
69
70# CLI Commands
71
72## `qmk cformat`
73
74This command formats C code using clang-format.
75
76Run 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>`
77
78Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
79
80**Usage for specified files**:
81
82```
83qmk cformat [file1] [file2] [...] [fileN]
84```
85
86**Usage for all core files**:
87
88```
89qmk cformat -a
90```
91
92**Usage for only changed files against origin/master**:
93
94```
95qmk cformat
96```
97
98**Usage for only changed files against branch_name**:
99
100```
101qmk cformat -b branch_name
102```
103
104## `qmk compile`
105
106This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm>, compile keymaps in the repo, or compile the keyboard in the current working directory.
107
108**Usage for Configurator Exports**:
109
110```
111qmk compile <configuratorExport.json>
112```
113
114**Usage for Keymaps**:
115
116```
117qmk compile -kb <keyboard_name> -km <keymap_name>
118```
119
120**Usage in Keyboard Directory**:
121
122Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap <keymap_name>`
123```
124qmk compile
125```
126
127**Example**:
128```
129$ qmk config compile.keymap=default
130$ cd ~/qmk_firmware/keyboards/planck/rev6
131$ qmk compile
132Ψ Compiling keymap with make planck/rev6:default
133...
134```
135or with optional keymap argument
136
137```
138$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
139$ qmk compile -km 66_iso
140Ψ Compiling keymap with make clueboard/66/rev4:66_iso
141...
142```
143or in keymap directory
144
145```
146$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
147$ qmk compile
148Ψ Compiling keymap with make make gh60/satan:colemak
149...
150```
151
152**Usage in Layout Directory**:
153
154Must be under `qmk_firmware/layouts/`, and in a keymap folder.
155```
156qmk compile -kb <keyboard_name>
157```
158
159**Example**:
160```
161$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi
162$ qmk compile -kb dz60
163Ψ Compiling keymap with make dz60:mechmerlin-ansi
164...
165```
166
167## `qmk flash`
168
169This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default.
170To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing.md) guide for more details of the available bootloaders.
171
172**Usage for Configurator Exports**:
173
174```
175qmk flash <configuratorExport.json> -bl <bootloader>
176```
177
178**Usage for Keymaps**:
179
180```
181qmk flash -kb <keyboard_name> -km <keymap_name> -bl <bootloader>
182```
183
184**Listing the Bootloaders**
185
186```
187qmk flash -b
188```
189
190## `qmk config`
191
192This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md).
193
194**Usage**:
195
196```
197qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
198```
199
200## `qmk docs`
201
202This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
203
204**Usage**:
205
206```
207qmk docs [-p PORT]
208```
209
210## `qmk doctor`
211
212This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
213
214**Usage**:
215
216```
217qmk doctor [-y] [-n]
218```
219
220**Examples**:
221
222Check your environment for problems and prompt to fix them:
223
224 qmk doctor
225
226Check your environment and automatically fix any problems found:
227
228 qmk doctor -y
229
230Check your environment and report problems only:
231
232 qmk doctor -n
233
234## `qmk json2c`
235
236Creates a keymap.c from a QMK Configurator export.
237
238**Usage**:
239
240```
241qmk json2c [-o OUTPUT] filename
242```
243
244## `qmk kle2json`
245
246This 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.
247
248**Usage**:
249
250```
251qmk kle2json [-f] <filename>
252```
253
254**Examples**:
255
256```
257$ qmk kle2json kle.txt
258☒ File info.json already exists, use -f or --force to overwrite.
259```
260
261```
262$ qmk kle2json -f kle.txt -f
263Ψ Wrote out to info.json
264```
265
266## `qmk list-keyboards`
267
268This command lists all the keyboards currently defined in `qmk_firmware`
269
270**Usage**:
271
272```
273qmk list-keyboards
274```
275
276## `qmk list-keymaps`
277
278This command lists all the keymaps for a specified keyboard (and revision).
279
280**Usage**:
281
282```
283qmk list-keymaps -kb planck/ez
284```
285
286## `qmk new-keymap`
287
288This command creates a new keymap based on a keyboard's existing default keymap.
289
290**Usage**:
291
292```
293qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
294```
295
296## `qmk pyformat`
297
298This command formats python code in `qmk_firmware`.
299
300**Usage**:
301
302```
303qmk pyformat
304```
305
306## `qmk pytest`
307
308This command runs the python test suite. If you make changes to python code you should ensure this runs successfully.
309
310**Usage**:
311
312```
313qmk pytest
314```
diff --git a/docs/cli_commands.md b/docs/cli_commands.md
new file mode 100644
index 000000000..bffa8263e
--- /dev/null
+++ b/docs/cli_commands.md
@@ -0,0 +1,247 @@
1# QMK CLI Commands
2
3# CLI Commands
4
5## `qmk cformat`
6
7This command formats C code using clang-format.
8
9Run 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>`
10
11Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
12
13**Usage for specified files**:
14
15```
16qmk cformat [file1] [file2] [...] [fileN]
17```
18
19**Usage for all core files**:
20
21```
22qmk cformat -a
23```
24
25**Usage for only changed files against origin/master**:
26
27```
28qmk cformat
29```
30
31**Usage for only changed files against branch_name**:
32
33```
34qmk cformat -b branch_name
35```
36
37## `qmk compile`
38
39This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm>, compile keymaps in the repo, or compile the keyboard in the current working directory.
40
41**Usage for Configurator Exports**:
42
43```
44qmk compile <configuratorExport.json>
45```
46
47**Usage for Keymaps**:
48
49```
50qmk compile -kb <keyboard_name> -km <keymap_name>
51```
52
53**Usage in Keyboard Directory**:
54
55Must be in keyboard directory with a default keymap, or in keymap directory for keyboard, or supply one with `--keymap <keymap_name>`
56```
57qmk compile
58```
59
60**Example**:
61```
62$ qmk config compile.keymap=default
63$ cd ~/qmk_firmware/keyboards/planck/rev6
64$ qmk compile
65Ψ Compiling keymap with make planck/rev6:default
66...
67```
68or with optional keymap argument
69
70```
71$ cd ~/qmk_firmware/keyboards/clueboard/66/rev4
72$ qmk compile -km 66_iso
73Ψ Compiling keymap with make clueboard/66/rev4:66_iso
74...
75```
76or in keymap directory
77
78```
79$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
80$ qmk compile
81Ψ Compiling keymap with make make gh60/satan:colemak
82...
83```
84
85**Usage in Layout Directory**:
86
87Must be under `qmk_firmware/layouts/`, and in a keymap folder.
88```
89qmk compile -kb <keyboard_name>
90```
91
92**Example**:
93```
94$ cd ~/qmk_firmware/layouts/community/60_ansi/mechmerlin-ansi
95$ qmk compile -kb dz60
96Ψ Compiling keymap with make dz60:mechmerlin-ansi
97...
98```
99
100## `qmk flash`
101
102This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default.
103To specify a different bootloader, use `-bl <bootloader>`. Visit the [Flashing Firmware](flashing.md) guide for more details of the available bootloaders.
104
105**Usage for Configurator Exports**:
106
107```
108qmk flash <configuratorExport.json> -bl <bootloader>
109```
110
111**Usage for Keymaps**:
112
113```
114qmk flash -kb <keyboard_name> -km <keymap_name> -bl <bootloader>
115```
116
117**Listing the Bootloaders**
118
119```
120qmk flash -b
121```
122
123## `qmk config`
124
125This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md).
126
127**Usage**:
128
129```
130qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
131```
132
133## `qmk docs`
134
135This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
136
137**Usage**:
138
139```
140qmk docs [-p PORT]
141```
142
143## `qmk doctor`
144
145This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
146
147**Usage**:
148
149```
150qmk doctor [-y] [-n]
151```
152
153**Examples**:
154
155Check your environment for problems and prompt to fix them:
156
157 qmk doctor
158
159Check your environment and automatically fix any problems found:
160
161 qmk doctor -y
162
163Check your environment and report problems only:
164
165 qmk doctor -n
166
167## `qmk json2c`
168
169Creates a keymap.c from a QMK Configurator export.
170
171**Usage**:
172
173```
174qmk json2c [-o OUTPUT] filename
175```
176
177## `qmk kle2json`
178
179This 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.
180
181**Usage**:
182
183```
184qmk kle2json [-f] <filename>
185```
186
187**Examples**:
188
189```
190$ qmk kle2json kle.txt
191☒ File info.json already exists, use -f or --force to overwrite.
192```
193
194```
195$ qmk kle2json -f kle.txt -f
196Ψ Wrote out to info.json
197```
198
199## `qmk list-keyboards`
200
201This command lists all the keyboards currently defined in `qmk_firmware`
202
203**Usage**:
204
205```
206qmk list-keyboards
207```
208
209## `qmk list-keymaps`
210
211This command lists all the keymaps for a specified keyboard (and revision).
212
213**Usage**:
214
215```
216qmk list-keymaps -kb planck/ez
217```
218
219## `qmk new-keymap`
220
221This command creates a new keymap based on a keyboard's existing default keymap.
222
223**Usage**:
224
225```
226qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
227```
228
229## `qmk pyformat`
230
231This command formats python code in `qmk_firmware`.
232
233**Usage**:
234
235```
236qmk pyformat
237```
238
239## `qmk pytest`
240
241This command runs the python test suite. If you make changes to python code you should ensure this runs successfully.
242
243**Usage**:
244
245```
246qmk pytest
247```
diff --git a/docs/cli_dev_configuration.md b/docs/cli_configuration.md
index 1196ab669..1196ab669 100644
--- a/docs/cli_dev_configuration.md
+++ b/docs/cli_configuration.md
diff --git a/docs/index.html b/docs/index.html
index ec92de495..f810e6c38 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -33,6 +33,7 @@
33 // Moved pages 33 // Moved pages
34 '/adding_a_keyboard_to_qmk': '/hardware_keyboard_guidelines', 34 '/adding_a_keyboard_to_qmk': '/hardware_keyboard_guidelines',
35 '/build_environment_setup': '/getting_started_build_tools', 35 '/build_environment_setup': '/getting_started_build_tools',
36 '/cli_dev_configuration': '/cli_configuration',
36 '/dynamic_macros': '/feature_dynamic_macros', 37 '/dynamic_macros': '/feature_dynamic_macros',
37 '/feature_common_shortcuts': '/feature_advanced_keycodes', 38 '/feature_common_shortcuts': '/feature_advanced_keycodes',
38 '/glossary': '/reference_glossary', 39 '/glossary': '/reference_glossary',