Skip to content

fix(init): Improve behavior when new repo is not default#55

Merged
joelspadin merged 1 commit intozmkfirmware:mainfrom
joelspadin:fix-add-keyboard-after-init
Jan 12, 2026
Merged

fix(init): Improve behavior when new repo is not default#55
joelspadin merged 1 commit intozmkfirmware:mainfrom
joelspadin:fix-add-keyboard-after-init

Conversation

@joelspadin
Copy link
Collaborator

Fixed #54 by adding a new system where a command can override the repo returned by Config.get_repo(). This ensures that when zmk init passes through to zmk keyboard add, it works on the correct repo regardless of whether the user set the new repo as their default.

Also, when initializing a repo but not setting it as the default, any zmk ... commands run after that point would still run on the default repo. To try to avoid any confusion caused by that, zmk init will now print a message at the end instructing the user to cd <repo path> if the new repo is not the default repo.

Fixed zmkfirmware#54 by adding a new system where a command can override the repo
returned by Config.get_repo(). This ensures that when "zmk init" passes
through to "zmk keyboard add", it works on the correct repo regardless
of whether the user set the new repo as their default.

Also, when initializing a repo but not setting it as the default, any
"zmk ..." commands run after that point would still run on the default
repo. To try to avoid any confusion caused by that, "zmk init" will now
print a message at the end instructing the user to "cd <repo path>" if
the new repo is not the default repo.
@joelspadin joelspadin merged commit 2f3656d into zmkfirmware:main Jan 12, 2026
1 check passed
@joelspadin joelspadin deleted the fix-add-keyboard-after-init branch January 12, 2026 16:58
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

Successfully merging this pull request may close these issues.

Adding a keyboard as suggested after zmk init always uses the home repo

2 participants