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

ZMK CLI #34

Open
innovaker opened this issue Jun 24, 2020 · 10 comments
Open

ZMK CLI #34

innovaker opened this issue Jun 24, 2020 · 10 comments

Comments

@innovaker
Copy link
Contributor

innovaker commented Jun 24, 2020

  • A CLI tool that serves as the main point of entry for most users.
  • Probably written in Python and published as zmk.
  • Wraps up git, west and other tooling.
    • Similar to how west wraps around git, cmake, ninja, etc.
  • Encapsulates multiplatform support.
  • Provides sanity checks on parameters.
    • e.g. checks the board, shield, keymap etc. and invalid combinations of them.
  • Provides rudimentary error handling.
    • Provides useful feedback for common errors.
    • Points users to ZMK help for unexpected errors.
  • Perhaps provides an interactive prompt/menu for commands and parameters.
  • Perhaps caches parameters.
  • Perhaps wrap flashing as well?
  • Perhaps setting up dev environments?

From:

@innovaker innovaker changed the title User-friendly Build Facade/Script ZMK CLI Jun 24, 2020
@innovaker
Copy link
Contributor Author

Should build upon multiplatform exploration started by #12 and #26.

@innovaker
Copy link
Contributor Author

@petejohanson, would we still like to proceed with this idea - not as a replacement for setup.sh - but as a development tool?

If so, then let's add it to Hacktoberfest.

@petejohanson
Copy link
Contributor

I'm kind of on the fence here. To a certain degree, this "hides" west, but only so well. I would rather consider what we really want to get from such a tool before we suggest it fora newcomer. Having someone spend a bunch of time on something, that we then say "Nah, that's not what we want!" really would stink.

@okke-formsma
Copy link
Collaborator

I have set up one west command (west test) as a proof of concept; #385

@caksoylar
Copy link
Contributor

For reference, @joelspadin developed https://github.com/joelspadin/zmk-setup-script that currently encapsulates the user setup script in a Python-based CLI that uses an extensible zmk module.

@joelspadin
Copy link
Collaborator

After using QMK again recently, I was thinking of borrowing some ideas from that, such as having a command such as zmk install which creates a config repo and remembers where it is, and then all further commands run from anywhere will operate on that repo unless otherwise specified.

That setup script might then be split across zmk install and zmk add-keyboard commands, with zmk being a script you can pip install.

@joelspadin
Copy link
Collaborator

https://github.com/joelspadin/zmk-cli is an attempt to do this. It currently handles

  • Walking you through creating a config repo and cloning it to your PC
  • Copying stock keymaps for keyboards into the config repo
  • Opening keymaps in a text editor
  • Adding/removing keyboards from the GitHub build
  • Opening a browser to the GitHub actions page
  • Adding/removing Zephyr modules
  • Creating new boards/shields from a template (limited number of templates currently, but we can expand this later)

It does not currently handle flashing keyboards, but that could potentially be implemented.

It intentionally does not handle building the firmware or setting up a dev environment. I currently consider that out of scope for what this tool is intended to do, but if enough people want that, we could try adding it.

@Townk
Copy link

Townk commented Aug 18, 2024

I wish I knew about this project before I created my zmk-cli. Although yours and mine are dealing with different things, the fact that yours will become part of the ZMK docs, will force me to think on a different name.

Any plans to have the tool dealing with local build setup? I would be happy to archive my thing if your tool can handle that part.

@joelspadin
Copy link
Collaborator

Setting up local builds isn't currently an area I've been focused on. My primary goal was to make a tool to replace the separate bash and PowerShell setup scripts, but I'm not opposed to adding more subcommands to handle common tasks for local builds.

What particular parts of setting up a local build do you find difficult? Just running a local build that matches the GitHub build?

@Townk
Copy link

Townk commented Aug 19, 2024

What particular parts of setting up a local build do you find difficult? Just running a local build that matches the GitHub build?

It’s not difficult, it’s tedious and whenever you have to do some special thing for the build, you then have to replicate that on your build.yaml so your GA can work as your local. Anyway, this PR is not about that, I’ll continue the discussion in the tool’s repo.

cfergeau pushed a commit to cfergeau/zmk that referenced this issue Dec 21, 2024
…ns/DoozyX/clang-format-lint-action-0.13

chore(deps): bump DoozyX/clang-format-lint-action from 0.12 to 0.13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants