bootstrap-chezmoi.sh --apply- Complete system setup (recommended)
./bin/install_vim- Install vim configuration./bin/install_tmux- Install tmux configuration./bin/install_brew- Install Homebrew packages./bin/install_cursor_agent- Install Cursor AI agent CLI tool
./bin/update_vim- Update vim plugins./bin/upgrade_brew- Upgrade Homebrew packages./bin/setup_hugo_completion- Setup Hugo bash completion
chezmoi init --apply https://github.com/cloudartisan/dotfiles.git- Initial setupchezmoi update- Pull latest changes and applychezmoi edit ~/.file- Edit a managed dotfilechezmoi add ~/.file- Add a new file to managementchezmoi apply- Apply changes to home directorychezmoi diff- Preview changes before applyingchezmoi cd -- git commit -m "message" && git push- Commit and push changes
- Shell Scripts: Use POSIX-compatible syntax when possible
- Comments: Include descriptive comments for non-obvious operations
- Variables: Use lowercase with underscores (snake_case)
- File Extensions: .sh for shell scripts, .bash for Bash-specific scripts
- Error Handling: Check exit codes and fail early
- Indentation: 2 spaces
- Line Length: Keep under 80 characters when possible
- Whitespace: Unless necessary, blank lines must be empty of whitespace characters
# Edit a file through chezmoi
chezmoi edit ~/.bash_profile
# Apply changes locally
chezmoi apply
# Commit and push changes
chezmoi cd -- git add . && git commit -m "Update bash profile" && git push# Edit file directly
vim ~/.bash_profile
# Add to chezmoi management
chezmoi add ~/.bash_profile
# Apply changes
chezmoi apply
# Commit and push
chezmoi cd -- git add . && git commit -m "Update bash profile" && git push# Add a new dotfile to management
chezmoi add ~/.new_config_file
# Commit and push
chezmoi cd -- git add . && git commit -m "Add new config file" && git push# Preview what would change before applying
chezmoi diff
# Apply changes to test locally
chezmoi apply
# If satisfied, commit and push
chezmoi cd -- git add . && git commit -m "Description" && git push# Initial setup on a brand new machine
chezmoi init --apply https://github.com/cloudartisan/dotfiles.git
# This will:
# - Clone the repository to ~/.local/share/chezmoi
# - Run setup scripts in .chezmoiscripts/
# - Deploy all dotfiles to your home directory# Pull latest changes and apply to already configured machines
chezmoi update- Keep commits small and focused on a single change
- Write descriptive commit messages
- Pull before pushing changes to avoid conflicts
- Do not include emojis in commit messages
- Do not mention Claude in commit messages
- Do not add/commit CLAUDE.md
chezmoi-based system:
- Source: Files managed in
~/.local/share/chezmoi/(git repository) - Deployment: Files deployed to
~viachezmoi apply - Automation: Setup scripts in
.chezmoiscripts/directory run once when applied - Templates:
.tmplfiles support variables and conditionals for machine-specific configs - Updates:
chezmoi updatepulls latest changes and applies them
- bootstrap-chezmoi.sh - Sets up new machine with chezmoi (primary method)
- .chezmoiscripts/run_once_install-packages.sh.tmpl - Automated package and cursor-agent installation
- .chezmoiscripts/run_once_install-ai-cli-tools.sh.tmpl - Automated AI CLI tools installation
- .chezmoiscripts/run_once_install-claude-code.sh.tmpl - Automated Claude Code CLI installation
- .chezmoiscripts/run_once_setup-vim.sh.tmpl - Automated Vim setup
- .chezmoiscripts/run_once_configure-git.sh.tmpl - Automated Git configuration
- .chezmoiscripts/run_once_configure-macos.sh.tmpl - Automated macOS settings
- .chezmoiscripts/run_once_configure-shell.sh.tmpl - Automated shell configuration
- Brewfile - Homebrew packages definition
- bin/ - Individual utility scripts for manual use
The following AI CLI tools are automatically installed during system setup:
Claude Code CLI (claude)
- Installed via: curl-based installer (official method)
- Script:
.chezmoiscripts/run_once_install-claude-code.sh.tmpl - Command:
claude- Interactive AI assistant for coding tasks
OpenAI Codex CLI (codex)
- Installed via: npm global (
@openai/codex) - Script:
.chezmoiscripts/run_once_install-ai-cli-tools.sh.tmpl - Command:
codex- OpenAI's Codex assistant
Google Gemini CLI (gemini)
- Installed via: npm global (
@google/gemini-cli) - Script:
.chezmoiscripts/run_once_install-ai-cli-tools.sh.tmpl - Command:
gemini- Google's Gemini assistant
All tools are automatically installed during initial setup via chezmoi init --apply and are available in new machine deployments.
On Salesforce work machines (hostnames starting with dltaylo-ltm* or dltaylo-wsm*), pip is automatically configured to use Salesforce's internal Nexus repository as a PyPI mirror.
Configuration:
- Location:
~/.config/pip/pip.conf - Index:
https://nexus-proxy.repo.local.sfdc.net/nexus/repository/pypi-all/simple - Certificate:
~/.config/pip/cert.pem(auto-downloaded)
How it works:
dot_config/pip/pip.conf.tmpl- Templated config file (deploys different content per machine).chezmoiscripts/run_once_install-salesforce-pip-cert.sh.tmpl- Downloads CA certificate on Salesforce machines
Verification:
# Check pip configuration
python -m pip config list
# Test installation from Salesforce Nexus
pip install requestsManual certificate update: If the certificate expires or needs updating:
curl -o ~/.config/pip/cert.pem https://git.soma.salesforce.com/pages/python-at-sfdc/python-guide/pip-conf/cert.pemRepositories under ~/git/salesforce/ are automatically configured for GPG signing via git conditional includes. No manual configuration is needed - when you cd into a Salesforce repo, git automatically uses the correct identity and enables commit signing.
Before using Claude Code on Salesforce repositories that require GPG signing:
-
Run the GPG unlock helper in a terminal:
gpg-unlock
-
Enter your GPG passphrase when prompted
-
Credentials are cached for 8 hours
-
Claude Code can now make signed commits and perform rebases
- Signing key: 449F9A0AFAC505592FEFB7EA8F53FA22DC77696C
- Cache duration: Default 8 hours (28800s), maximum 24 hours (86400s)
- Configuration: Git conditional includes (
.gitconfig-salesforce) - Non-TTY limitation: GPG signing requires passphrase entry, which cannot happen in non-TTY environments. The pre-unlock workflow solves this by caching credentials.
The following bash aliases are maintained for backward compatibility:
gitsfdc- Manually configure current repo for Salesforcegitsoma- Same as gitsfdc
These are no longer needed for repos under ~/git/salesforce/ due to automatic git conditional includes.