diff options
-rw-r--r-- | docs/cli_commands.md | 12 | ||||
-rw-r--r-- | lib/python/qmk/cli/new/__init__.py | 1 | ||||
-rw-r--r-- | lib/python/qmk/cli/new/keyboard.py | 11 |
3 files changed, 24 insertions, 0 deletions
diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 6498b28b8..05e930607 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md | |||
@@ -228,6 +228,18 @@ This command is directory aware. It will automatically fill in KEYBOARD if you a | |||
228 | qmk list-keymaps -kb planck/ez | 228 | qmk list-keymaps -kb planck/ez |
229 | ``` | 229 | ``` |
230 | 230 | ||
231 | ## `qmk new-keyboard` | ||
232 | |||
233 | This command creates a new keyboard based on available templates. | ||
234 | |||
235 | This command will prompt for input to guide you though the generation process. | ||
236 | |||
237 | **Usage**: | ||
238 | |||
239 | ``` | ||
240 | qmk new-keyboard | ||
241 | ``` | ||
242 | |||
231 | ## `qmk new-keymap` | 243 | ## `qmk new-keymap` |
232 | 244 | ||
233 | This command creates a new keymap based on a keyboard's existing default keymap. | 245 | This command creates a new keymap based on a keyboard's existing default keymap. |
diff --git a/lib/python/qmk/cli/new/__init__.py b/lib/python/qmk/cli/new/__init__.py index c6a26939b..fe5d6fe48 100644 --- a/lib/python/qmk/cli/new/__init__.py +++ b/lib/python/qmk/cli/new/__init__.py | |||
@@ -1 +1,2 @@ | |||
1 | from . import keyboard | ||
1 | from . import keymap | 2 | from . import keymap |
diff --git a/lib/python/qmk/cli/new/keyboard.py b/lib/python/qmk/cli/new/keyboard.py new file mode 100644 index 000000000..cab0198fb --- /dev/null +++ b/lib/python/qmk/cli/new/keyboard.py | |||
@@ -0,0 +1,11 @@ | |||
1 | """This script automates the creation of keyboards. | ||
2 | """ | ||
3 | from milc import cli | ||
4 | |||
5 | |||
6 | @cli.subcommand('Creates a new keyboard') | ||
7 | def new_keyboard(cli): | ||
8 | """Creates a new keyboard | ||
9 | """ | ||
10 | # TODO: replace this bodge to the existing script | ||
11 | cli.run(['util/new_keyboard.sh'], capture_output=False) | ||