A shell-agnostic development environment setup system for macOS.
Setting up a new developer machine can be an ad-hoc, manual, and time-consuming process. This dev-setup repository aims to simplify the process with easy-to-understand instructions and shell-agnostic scripts to automate the setup of your development environment.
The key features of this setup system include:
- Shell agnostic - supports bash, zsh, and fish shells
- Modular design - install only what you need
- Interactive setup - guided installation with prompts
- macOS optimized - includes sensible macOS defaults for developers
- Modern tools - focuses on current development tools and practices
This setup system can configure the following components:
- Shell Environment: Choose between bash, zsh, or fish with optimized configurations
- Core Development Tools: Vim, tmux, git, and other essential command-line utilities
- Programming Languages: Python, Node.js, Go, Rust
- Web Development: Node.js ecosystem, browsers, and web development tools
- Data Stores: MySQL, PostgreSQL, MongoDB, Redis, and Elasticsearch
- macOS Defaults: Developer-friendly system preferences and settings
- GUI Applications: VS Code, iTerm2, Docker, and more
- A macOS system
- Administrator (sudo) access
- Internet connection
-
Clone this repository:
git clone https://github.com/dave6892/dev-setup.git cd dev-setup -
Make the scripts executable:
chmod +x chmod.sh ./chmod.sh
-
Run the setup script:
./setup.sh
-
Follow the interactive prompts to customize your installation.
If you only want to install or configure specific components, you can use the run.sh script:
# Show available components
./run.sh help
# Install only development tools
./run.sh brew
# Set up only fish shell
./run.sh fish
# Apply only macOS defaults
./run.sh macosdev-setup/
├── setup.sh # Main setup script
├── run.sh # Script to run individual components
├── macos-defaults.sh # macOS system preferences configuration
├── common/ # Shell-agnostic configurations
│ ├── aliases-common.sh # Common aliases for all shells
│ ├── exports-common.sh # Common environment variables
│ ├── brew-common.sh # Common Homebrew installations
│ ├── web-common.sh # Web development tools
│ └── datastores-common.sh # Database installations
└── shells/ # Shell-specific configurations
├── bash-setup.sh # Bash configuration
├── zsh-setup.sh # Zsh configuration
└── fish-setup.sh # Fish configuration
You can add your own personal configurations by creating a local configuration file:
- For bash:
~/.bashrc.local - For zsh:
~/.zshrc.local - For fish:
~/.config/fish/config-local.fish
These files will be loaded automatically but won't be overwritten by future updates.
If you want to change what gets installed by default:
- Edit the corresponding script in the
common/directory - For shell-specific customizations, edit the scripts in the
shells/directory
- To update your development environment later, simply run
./setup.shagain - Use
reloadalias to refresh your shell configuration after making changes - If you're switching between shells frequently, you might want to keep your configurations synchronized
If you encounter issues during setup:
- Check that you have administrator permissions
- Ensure Homebrew is installed correctly
- Make sure your internet connection is stable
- Try running individual modules manually
- Check the shell-specific log files in your home directory
For specific issues, please open an issue on GitHub.
To extend this setup for your own needs:
- Fork this repository
- Add or modify scripts in the
common/orshells/directories - Update the main
setup.shscript to include your new modules
This project was inspired by and adapted from donnemartin/dev-setup.
This repository is licensed under the Apache License 2.0 - see the LICENSE file for details.
Feel free to contact me to discuss any issues, questions, or comments.
My contact info can be found on my GitHub page.