macOS dotfiles managed with chezmoi.
Follow these steps once on each new machine.
git clone https://github.com/mono0x/dotfiles ~/.local/share/chezmoi
cd ~/.local/share/chezmoi./mise bootstrapThe included ./mise wrapper installs mise if needed. Bootstrap installs packages, configures macOS and the login shell, and applies the dotfiles with chezmoi. Package and tool definitions live in mise.toml and Brewfile.
Restart the macOS UI processes to reflect the settings:
killall Dock; killall Finder; killall SystemUIServerGit authenticates to GitHub through ghtkn. A launchd agent runs ghtkn agent start at login, and ghtkn-touchid unlocks it with a passphrase kept in Keychain behind Touch ID.
Generate a passphrase, store it in Keychain, and reset the agent with it:
ghtkn-touchid resetThe reset stops the agent. Start it again, then unlock it:
launchctl kickstart "gui/$(id -u)/com.github.suzuki-shunsuke.ghtkn.agent"
ghtkn-touchid unlockGet an access token through the device flow:
ghtkn authghtkn-touchid reset deletes the cached tokens, so run ghtkn auth again whenever you reset.
Git signs commits and tags with an SSH key stored in the Secure Enclave, so signing needs no Touch ID prompt.
During ./mise bootstrap and chezmoi apply, a macOS script sets up the key files if they are missing. It reuses the existing git-sign Secure Enclave identity or creates a non-exportable P-256 key that requires no user presence. expect answers the PIN prompt with an empty response automatically. If both key files already exist, the script does nothing. Key setup is skipped in GitHub Actions.
When the script places key files in ~/.ssh, it prints the public key path and GitHub registration instructions. Copy the public key:
pbcopy < ~/.ssh/id_ecdsa_sk_rk_git-sign.pubAdd it to GitHub as a signing key in SSH and GPG keys.
The ghtkn agent starts locked. Unlock it:
ghtkn-touchid unlockUnlocking also enables refresh tokens, so you only need the device flow once per GitHub App, not every eight hours.
The running agent keeps using the old binary. Restart and unlock it:
launchctl kickstart -k "gui/$(id -u)/com.github.suzuki-shunsuke.ghtkn.agent"
ghtkn-touchid unlockAgent logs go to ~/Library/Logs/ghtkn-agent.log.
Delete its signing key from GitHub. Commits that GitHub has already verified stay verified.
./mise is generated by mise. Regenerate it with:
mise generate install-script -w ./mise