Personal macOS development environment configuration for JavaScript/TypeScript, DevOps, and infrastructure management.
- macOS (tested on Darwin 24.5.0)
- Git
- Command Line Tools for Xcode (
xcode-select --install)
# Clone the repository
git clone https://github.com/danilomartinelli/dotfiles.git ~/.dotfiles
# Navigate to dotfiles
cd ~/.dotfiles
# Run the bootstrap script (first-time setup)
_scripts/bootstrap
# This will:
# - Set up git configuration (prompts for name/email)
# - Create symlinks for all config files
# - Install Homebrew and all dependencies
# - Configure macOS defaults# Update dotfiles, brew packages, and run all installers
bin/dotAfter the first execution, you will have a alias for the command above.
dot.dotfiles/
βββ bin/ # Custom executable scripts
βββ functions/ # ZSH functions (auto-loaded)
βββ _scripts/ # Setup and management scripts
βββ */ # Topic directories (see below)
βββ Brewfile # Homebrew packages and apps
βββ CLAUDE.md # Claude AI instructions
βββ .localrc.example # Template for local secrets
Each topic follows this standard structure:
topic/
βββ install.sh # Installation script (optional)
βββ *.symlink # Files to be symlinked to ~
βββ path.zsh # PATH modifications (loaded first)
βββ aliases.zsh # Command aliases
βββ env.zsh # Environment variables
βββ completion.zsh # Shell completions (loaded last)
βββ *.zsh # Other configs (auto-loaded)
- Folders starting with
_are completely ignored (e.g.,_docs/,_archive/) - Files starting with
_are ignored even in regular folders - Standard file names must be exact:
path.zsh,aliases.zsh,completion.zsh - Installation scripts must be named
install.sh - Files ending in
.symlinkare automatically linked to home directory
| Tool | Description |
|---|---|
awscli |
AWS Command Line Interface |
coreutils |
GNU File, Shell, and Text utilities |
dockutil |
Manage macOS dock items |
duti |
Set default applications for file types |
git & git-lfs |
Version control with large file support |
gh |
GitHub CLI |
go-task |
Task runner / build tool |
helm & helmfile |
Kubernetes package management |
imagemagick |
Image manipulation |
jq & python-yq |
JSON/YAML processors |
kubernetes-cli & kustomize |
Kubernetes tools |
mas |
Mac App Store CLI |
mise |
Runtime version manager |
pandoc |
Document converter |
pipx |
Install and run Python applications in isolated environments |
spaceman-diff |
Visual diff for images |
terragrunt |
Terraform wrapper |
usql |
Universal command-line interface for SQL databases |
usage |
Tool for working with usage-spec CLIs |
vim |
Text editor |
vultr |
Vultr CLI for managing cloud resources |
watchman |
File watching service |
wget |
File download utility |
zsh-syntax-highlighting |
Fish shell-like syntax highlighting for Zsh |
| Font | Description |
|---|---|
font-fira-code |
Programming font with ligatures (Default) |
font-fira-mono |
Programming font with ligatures (Mono) |
font-jetbrains-mono |
Programming font with ligatures (Mono) |
font-maple-mono |
Programming font with ligatures (Mono) |
font-monaspace |
Programming font with ligatures (All styles) |
|| Application | Description | ||------------|-------------| || Development | | || Android Studio | Android development IDE | || Xcode | Apple development IDE | || Warp | Modern terminal emulator | || Cursor | AI-powered code editor | || OrbStack | Docker Desktop alternative | || Lens | Kubernetes IDE | || TablePlus | Database management | || Postman | API development and testing | || Ngrok | Secure tunnels to localhost | || Productivity | | || Google Chrome | Web browser | || ChatGPT | AI assistant desktop client | || Linear | Project management tool | || Notion | Note-taking app | || Obsidian | Knowledge base with Markdown | || Raycast | Spotlight replacement with extensions | || Rectangle Pro | Window management | || Paste | Clipboard manager | || Design & Media | | || Figma | Design tool | || CleanShot | Screenshot and recording | || VLC | Media player supporting various formats | || Communication | | || Readdle Spark | Smart email client | || Security | | || Bitwarden | Password manager | || ProtonVPN | VPN client | || Yubico Authenticator | 2FA with YubiKey | || Other | | || Spotify | Music streaming | || Archiver | File compression |
Mise automatically manages versions for:
- Node.js (25.2.1) with npm (11.6.3), pnpm (10.23.0), yarn (4.11.0)
- Bun (1.3.2)
- Python (3.14.0) with uv (automatic venv management)
- Go (1.25.5)
- Rust (1.91.1)
- Terraform (1.14.0)
Global npm packages:
eas-cli- Expo Application Servicesmarkdownlint-cli- Markdown lintervercel- Vercel CLInx- Monorepo tool
| Alias | Command | Description |
|---|---|---|
gl |
git pull --prune |
Pull with pruning |
glog |
Enhanced git log | Pretty git log with graph |
gp |
git push origin HEAD |
Push current branch |
gd |
git diff --color |
Colored diff |
gc |
git commit -v |
Commit with verbose |
gca |
git commit -v -a |
Commit all with verbose |
gco |
git checkout |
Checkout |
gcb |
git copy-branch-name |
Copy current branch name |
gb |
git branch |
List branches |
gs |
git status -sb |
Short status |
gac |
git add -A && git commit -v |
Add all and commit |
ge |
git-edit-new |
Edit new files |
| Alias | Command | Description |
|---|---|---|
reload! |
. ~/.zshrc |
Reload shell configuration |
cls |
clear |
Clear screen |
ls |
gls -F --color |
Colorized ls with indicators |
l |
gls -lAh --color |
Long format with hidden files |
ll |
gls -l --color |
Long format |
la |
gls -A --color |
All files |
| Alias | Command |
|---|---|
d |
docker |
dc |
docker-compose |
| Alias | Command | Description |
|---|---|---|
ios |
Opens iOS Simulator | Launch iOS Simulator |
android |
emulator -list-avds | head -1 | xargs emulator -avd |
Launch Android emulator |
sshclean |
rm -f ~/.ssh/sockets/* |
Clean SSH sockets |
| Function | Description | Usage |
|---|---|---|
c |
Jump to project directory | c project-name |
extract |
Extract any archive file | extract file.zip |
gf |
Switch git branch | gf branch-name |
All sensitive environment variables should be stored in ~/.localrc (not tracked in git). This file is automatically sourced by .zshrc on shell startup, making all variables available in your shell sessions.
# Create your local configuration file
touch ~/.localrc
chmod 600 ~/.localrc # Restrict permissions for security
# Add your secrets and environment variables
cat >> ~/.localrc << 'EOF'
# API Keys and Tokens
export GITHUB_TOKEN="your-github-token"
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-..."
# AWS Credentials
export AWS_ACCESS_KEY_ID="your-key-id"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
export AWS_DEFAULT_REGION="us-east-1"
# Database Connections
export DATABASE_URL="postgresql://user:pass@host:5432/db"
export REDIS_URL="redis://localhost:6379"
# Application Secrets
export JWT_SECRET="your-jwt-secret"
export SESSION_SECRET="your-session-secret"
# Custom Configuration
export MY_APP_ENV="development"
export API_BASE_URL="https://api.example.com"
EOF- Security: Always use
chmod 600 ~/.localrcto ensure only you can read the file - Organization: Group related variables with comments
- Updates: Variables are loaded on shell startup; run
reload!(alias forsource ~/.zshrc) to apply changes immediately - Backup: Keep a secure backup of your secrets in a password manager (like Bitwarden)
A template file is provided at .localrc.example to help you get started:
# Copy the template and customize it
cp ~/.dotfiles/.localrc.example ~/.localrc
chmod 600 ~/.localrc
# Edit with your actual values
vim ~/.localrcTo add a new tool or configuration:
- Create a topic directory:
mkdir ~/.dotfiles/your-tool- Add configuration files:
# Symlinked configuration
echo "config" > ~/.dotfiles/your-tool/config.symlink
# Shell configuration
echo "alias yt='your-tool'" > ~/.dotfiles/your-tool/aliases.zsh
# PATH modifications
echo 'export PATH="/path/to/your-tool:$PATH"' > ~/.dotfiles/your-tool/path.zsh
# Installation script
cat > ~/.dotfiles/your-tool/install.sh << 'EOF'
#!/bin/sh
echo "βΊ Installing your-tool"
# Installation commands here
EOF
chmod +x ~/.dotfiles/your-tool/install.sh- Run the installer:
~/.dotfiles/your-tool/install.sh
# Or run all installers
_scripts/installThe .zshrc loads configuration files in this specific order:
- Environment: Sets
$ZSHand$PROJECTSvariables - Local secrets: Sources
~/.localrcif it exists (gitignored, sensitive variables) - Common variables: Sources
$ZSH/.commonrcif it exists (tracked in git, non-sensitive shared variables) - Path files: All
*/path.zshfiles (PATH setup) - Main configs: All
*.zshfiles except path and completion - Completions: All
*/completion.zshfiles (after compinit)
Files with .symlink extension are automatically linked to your home directory:
git/gitconfig.symlinkβ~/.gitconfigzsh/zshrc.symlinkβ~/.zshrcmise/mise.toml.symlinkβ~/.mise.toml
Git uses a split configuration:
- Public settings:
git/gitconfig.symlink - Private settings:
git/gitconfig.local.symlink(generated on bootstrap)- Contains your name, email, and credential helper
Non-sensitive environment variables that you want to share across different machines are stored in .commonrc (tracked in git). This file is automatically sourced by .zshrc after .localrc and before path files.
Unlike .localrc, .commonrc is tracked in version control, so it's suitable for:
- Locale settings (LANG, LC_ALL)
- Default editor preferences
- Non-sensitive configuration that should be consistent across machines
Note: Sensitive data should always go in ~/.localrc, not .commonrc.
SSH setup includes:
- OrbStack container access
- Multiple GitHub account support
- Development/staging/production server configs
- Connection keepalive settings
- Socket cleanup alias
The macos/set-defaults.sh script configures:
- System preferences
- Finder settings
- Dock configuration
- Security preferences
The bin/ directory contains custom utilities:
git-all- Stage all unstaged filesgit-amend- Amend the last commitgit-copy-branch-name- Copy current branch name to clipboardgit-credit- Credit an author on commitsgit-delete-local-merged- Delete merged branchesgit-edit-new- Open new, unstaged files in $EDITORgit-nuke- Remove a branch locally and remotely (with validation)git-promote- Promote a branch to track remote branchgit-rank-contributors- Rank git contributorsgit-track- Set up branch to track remote branchgit-undo- Undo the last commit (keeps changes)git-unpushed- Show diff of unpushed commitsgit-unpushed-stat- Show diffstat of unpushed commitsgit-up- Pull with log displaygit-wtf- Display repository state in readable format
add-credential- Add AWS or Kubernetes credentials to .localrcbattery-status- Check battery statusdns-flush- Flush DNS cachedot- Update dotfiles and dependenciese- Open in $EDITORee- Open current directory in $EDITORgitio- Shorten GitHub URLs using git.ioheaders- Display HTTP headers from curl requestssearch- Quick search using ackset-defaults- Set macOS system defaults
# Pull latest dotfiles, update brew, and run installers
bin/dot# Update Homebrew packages
brew update && brew upgrade
# Update dotfiles only
git -C ~/.dotfiles pull
# Reinstall dotfiles
~/.dotfiles/_scripts/bootstrap
# Run all installers
~/.dotfiles/_scripts/install# Install a new package
brew install package-name
# Add it to Brewfile for persistence
echo "brew 'package-name'" >> ~/.dotfiles/BrewfileFeel free to fork this repository and customize it for your own use. If you have improvements that might benefit others, please submit a pull request!
- This setup is specifically tailored for macOS development
- The configuration assumes you're using ZSH as your shell
- Many tools and configurations are specific to JavaScript/TypeScript and DevOps workflows
- Always review scripts before running them on your system
This repository contains personal configuration files. Feel free to use any part of this setup in your own dotfiles!
Inspired by and borrowed from many amazing dotfiles repositories in the community.