README.md

dotfiles #

Prerequisites #

  • Homebrew
  • Bitwarden account (for secrets)

Fresh Installation #

# Set machine profile (work or personal)
export CHEZMOI_MACHINE_PROFILE=work

# Install chezmoi and apply dotfiles
sh -c "$(curl -fsLS get.chezmoi.io/lb)" -- init --apply git@tangled.sh:rinaldi.io/dotfiles

This will prompt for:

  • Bitwarden vault unlock (enter your master password)
  • SSH key passphrase (if applicable)

Syncing with Latest #

# Set machine profile (if not already set)
export CHEZMOI_MACHINE_PROFILE=work

# Unlock Bitwarden
export BW_SESSION=$(bw unlock --raw)

# Update dotfiles
chezmoi update

If you see a config file warning, run chezmoi init first.

Git/GitHub Authentication #

This setup automatically switches between work and personal GitHub accounts based on your working directory:

  • ~/work/ → Uses work email and GitHub user
  • ~/dev/ → Uses personal email and GitHub user

Multiple GitHub Accounts #

To authenticate multiple GitHub accounts with the gh CLI:

# Authenticate your accounts
gh auth login --hostname github.com --git-protocol ssh --web

# Switch between accounts when needed
gh auth switch

The directory-based Git config handles email and user switching automatically. The gh CLI can manage multiple authenticated accounts and switch between them as needed.

License #

MIT © Rafael Rinaldi