Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shim cli to new keyboard script #12780

Merged
merged 3 commits into from
May 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,18 @@ This command is directory aware. It will automatically fill in KEYBOARD if you a
qmk list-keymaps -kb planck/ez
```

## `qmk new-keyboard`

This command creates a new keyboard based on available templates.

This command will prompt for input to guide you though the generation process.

**Usage**:

```
qmk new-keyboard
```

## `qmk new-keymap`

This command creates a new keymap based on a keyboard's existing default keymap.
Expand Down
1 change: 1 addition & 0 deletions lib/python/qmk/cli/new/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from . import keyboard
from . import keymap
11 changes: 11 additions & 0 deletions lib/python/qmk/cli/new/keyboard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""This script automates the creation of keyboards.
"""
from milc import cli


@cli.subcommand('Creates a new keyboard')
def new_keyboard(cli):
"""Creates a new keyboard
"""
# TODO: replace this bodge to the existing script
cli.run(['util/new_keyboard.sh'], capture_output=False)