This repository contains my personal dotfiles for setting up a new macOS device. It includes a Brewfile with 100+ command-line tools and applications that I use for development, DevOps, and general productivity.
To set up a new device, run the following command in your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/l2D/dotfiles_public/main/install.sh)"This will clone the repository to a temporary directory and execute the setup script.
If you've already cloned the repository:
# Clone the repository (if not already cloned)
git clone https://github.com/l2D/dotfiles_public.git ~/.dotfiles
cd ~/.dotfiles
# Run installer directly
bash install.sh
# Or use make
make installNote: During installation, you'll be prompted to:
- Configure your macOS Dock with preferred applications (optional)
- Delete the cloned repository after installation (optional)
- Xcode Command Line Tools: The installer will prompt for installation if not present
- macOS: This setup is designed specifically for macOS (Intel and Apple Silicon)
The installation script (install.sh) is a self-contained installer that performs the following steps:
- Clones the Repository: It clones this repository to a temporary
~/.dotfilesdirectory on your local machine. - Installs macOS Prerequisites:
- Xcode Command Line Tools: Prompts for installation if not already present.
- Rosetta 2: Installs it on Apple Silicon Macs if needed.
- Installs Homebrew: If not already installed, it will install Homebrew.
- Copies Dotfiles: It copies all the necessary configuration files (
.vimrc,.p10k.zsh,.zshrc,.zprofile,Brewfile, and.configfiles) to your home directory. - Configures Homebrew: It adds the Homebrew environment to your shell's
.zprofile. - Installs Packages: It installs all the packages, casks, and applications listed in the
Brewfileusingbrew bundle --global. - Dock Configuration (Optional): Prompts to configure your macOS Dock with preferred applications using
scripts/configure-dock.sh. - Cleanup (Optional): Prompts to remove the temporary
~/.dotfilesdirectory after installation.
Interactive Prompts:
- You can skip optional steps (Dock configuration, cleanup) by responding with 'n' or 'no'
- The installation will continue successfully even if optional steps are skipped or fail
The repository includes a Makefile with convenient commands for common tasks:
| Command | Description |
|---|---|
make help |
Display all available commands |
make install |
Run the full dotfiles installation |
make dock-preview |
Preview Dock configuration changes (dry-run) |
make dock-apply |
Apply Dock configuration |
make dock-restore |
Restore Dock to macOS defaults |
make test |
Run all tests |
make test-unit |
Run unit tests for install.sh |
make test-brewfile |
Validate Brewfile syntax |
make test-zsh |
Syntax check zsh configuration |
make clean |
Remove temporary installation directory |
Usage Examples:
# Display available commands
make help
# Run full installation
make install
# Preview what Dock configuration would do
make dock-preview
# Apply Dock configuration
make dock-apply
# Restore Dock to macOS defaults
make dock-restore
# Run all tests
make test
# Validate Brewfile syntax (requires ~/.Brewfile)
make test-brewfile
# Clean up temporary files
make cleanThis repository installs 100+ packages organized by category:
- aws-sso-cli: Securely manage AWS API credentials using AWS SSO
- aws-vault: Secure, cross-platform tool for managing AWS credentials
- awscli: Official Amazon AWS command-line interface
- azure-cli: Command-line tools for Azure
- gcloud-cli: Google Cloud SDK command-line interface
- helm: The Kubernetes package manager
- istioctl: Istio configuration command-line utility
- k9s: Kubernetes CLI to manage clusters in style
- kind: Kubernetes in Docker - local clusters for testing
- kompose: Tool to move from docker-compose to Kubernetes
- kubectx: Switch between kubectl contexts easily
- kubernetes-cli: Kubernetes command-line interface
- kustomize: Customization of Kubernetes YAML configurations
- terraform: Infrastructure as code software tool
- infracost: Cloud cost estimates for Terraform
- terraform-docs: Generate documentation from Terraform modules
- terragrunt: Thin wrapper for Terraform providing extra tools
- act: Run your GitHub Actions locally
- argocd: GitOps Continuous Delivery for Kubernetes
- bk@3: Buildkite CLI
- helmfile: Deploy Kubernetes Helm Charts
- dependency-check: OWASP dependency-check
- gnupg: GNU Pretty Good Privacy (PGP) package
- vault: Tool for securely accessing secrets
- infisical: Open source secrets management platform
- mkcert: Make locally-trusted development certificates
- nss: Libraries for security-enabled applications
- pre-commit: Framework for managing multi-language pre-commit hooks
- trivy: Vulnerability scanner for containers and IaC
- cloudflare-wrangler: Cloudflare Workers CLI
- go: Open source programming language
- bun: Fast JavaScript runtime
- mise: Polyglot tool version manager
- pyenv: Python version management
- nvm: Manage multiple Node.js versions
- gh: GitHub command-line tool
- git: Distributed revision control system
- git-lfs: Git extension for versioning large files
- vim: Vi 'workalike' with many additional features
- neovim: Ambitious Vim-fork focused on extensibility
- watchman: Watch files and take action when they change
- asciinema: Record and share terminal sessions
- bat: Cat clone with syntax highlighting
- dockutil: Tool for managing macOS Dock items
- exa: Modern replacement for 'ls'
- fd: Simple, fast alternative to 'find'
- fzf: Command-line fuzzy finder
- htop: Improved top (interactive process viewer)
- jd: JSON diff and patch utility
- jq: Lightweight command-line JSON processor
- mas: Mac App Store command-line interface
- navi: Interactive cheatsheet tool
- ripgrep: Search tool like grep
- tldr: Simplified and community-driven man pages
- tokei: Count code quickly
- tree: Display directories as trees
- tz: CLI time zone visualizer
- yq: Process YAML documents from the CLI
- gnutls: GNU Transport Layer Security (TLS) Library
- libyaml: YAML C library
- openssl@3: Cryptography and SSL/TLS Toolkit
- arc: Web browser
- warp: Modern, Rust-based terminal with AI
- 1password: Password manager
- 1password-cli: Command-line interface for 1Password
- adguard: Ad blocker
- betterdisplay: Display management tool
- logi-options+: Software for Logitech devices
- microsoft-teams: Team collaboration software
- raycast: Control your tools with a few keystrokes
- rectangle-pro: Window snapping tool
- setapp: Collection of apps for macOS and iOS
- slack: Team communication and collaboration
- wins: Bring your windows to your cursor
- apidog-europe: All-in-one API development tool
- aptakube: Modern Kubernetes GUI client
- docker-desktop: Build and share containerized applications
- gitkraken: Git client
- gitkraken-cli: GitKraken Command Line Interface
- visual-studio-code: Open-source code editor
- font-hack-nerd-font: Developer targeted font with icons
- Amphetamine (ID: 937984704): Keep-awake utility
This repository includes a comprehensive test suite using BATS (Bash Automated Testing System) to verify the installation script's behavior.
Install BATS via Homebrew:
brew install bats-coreUsing Make (Recommended):
# Run all tests
make test
# Run unit tests for install.sh
make test-unit
# Validate Brewfile syntax (requires ~/.Brewfile)
make test-brewfile
# Syntax check zsh configuration (requires ~/.zshrc)
make test-zshDirect Execution:
# Run all tests
bats tests/install.bats
# Run specific tests matching a pattern
bats tests/install.bats -f "Dock configuration"
# Run with verbose output
bats tests/install.bats --print-output-on-failureThe test suite covers:
-
Dock Configuration Tests
- User accepts/declines Dock configuration
- Case-insensitive responses (y/yes/Y/YES, n/no/N/NO)
- Invalid input handling
- Dry-run mode
-
Installation Resilience
- Installation continues even if Dock configuration fails
- Error handling for missing prerequisites
-
Repository Cleanup Tests
- User accepts/declines repository deletion
- Case-insensitive responses
- Repository retention on invalid input
-
File Operations
- Dotfiles copied correctly to home directory
- Directory structure preserved
tests/install.bats: Main BATS test suite with 21 test casestests/README.md: Detailed testing documentation
For more information about the test suite, see tests/README.md.
The scripts/configure-dock.sh script automates the configuration of your macOS Dock by removing unwanted apps and adding/ordering your preferred applications.
Usage:
# Preview changes without applying them (dry-run)
./scripts/configure-dock.sh --dry-run
# Or using make
make dock-preview
# Apply dock configuration
./scripts/configure-dock.sh
# Or using make
make dock-applyPrerequisites:
dockutil(automatically installed via Brewfile)
What it does:
- Removes default macOS apps you don't use (Safari, Mail, Maps, Photos, FaceTime, etc.)
- Adds and orders your preferred applications (Arc, Warp, GitKraken, Docker, Slack, etc.)
- Restarts the Dock to apply changes
Note: The install.sh script will offer to run Dock configuration automatically during installation.
This project is licensed under the MIT License. See the LICENSE file for details.