Site icon Rajan Vijayan

How to Automate Your macOS and Linux Development Setup in Minutes

Setting up a new development environment can often be time-consuming and tedious—installing packages, configuring Git, generating SSH keys, and more. If you’ve been through this process enough times, you know it’s something developers dread.

I was in the same boat, which is why I built my own Developer Setup Script to simplify this entire process for macOS and Linux users. This script automates the installation of essential packages and configurations while allowing you to pick exactly what you need.

Why Create a Setup Script?

The goal? To provide a single point of setup that:

Features of the Developer Setup Script

1. Manual Package Selection

You are in control. Upon running the script, you’ll be prompted with a list of packages to install, allowing you to manually pick the tools that are relevant to your workflow. Want PHP and MySQL but don’t need Python? Just skip it. Some of the included packages are:

2. Automatic Git and SSH Setup

In addition to installing your favorite packages, the script also sets up your Git configuration (name, email) and generates an SSH key. This is particularly useful for connecting to remote repositories like GitHub or GitLab, saving you the hassle of manual setup.

3. Cross-Platform Support

The script is designed to work on both macOS and Linux. It automatically detects your operating system and runs the appropriate commands for installation. No more worrying about differences in package managers or OS-specific configurations.

4. Modular and Reusable Code

To keep things clean and scalable, the script uses a modular structure. Shared functionalities, such as package installation and Git setup, are housed in separate modules. This keeps the code DRY (Don’t Repeat Yourself) and makes future enhancements easier to implement. If you want to add new packages or configurations, simply extend the relevant module without touching the core logic.

How to Use the Developer Setup Script

Getting started is easy. Here’s how you can use the script to set up your new development environment:

Step 1: Clone the Repository

git clone https://github.com/rajanvijayan/developer-setup.git
cd developer-setup


Step 2: Make the Script Executable

chmod +x run.sh


Step 3: Run the Script

./run.sh

The script will automatically detect your operating system (macOS or Linux) and prompt you to choose which packages you want to install.

Step 4: Configure Git and SSH

During the setup, the script will prompt you to enter your Git username and email. It will also generate an SSH key and display instructions for adding it to your GitHub or GitLab account.

Customization and Contributions

The setup script is highly customizable. If you need additional tools or packages, you can easily modify the platform-specific setup scripts (mac_setup.sh, linux_setup.sh) or add new modules to the existing structure.

As always, contributions are welcome! Feel free to fork the repository, add features, and submit pull requests. The goal is to make this setup as useful as possible for a wide range of developers.

For more detailed contribution guidelines, check out the CONTRIBUTING.md.

With this Developer Setup Script, the days of manually installing every package, configuring Git, and setting up SSH are behind you. Whether you’re onboarding a new developer or simply setting up a new machine for yourself, this script will save you time and effort—letting you focus on what matters: coding.

Check out the script on GitHub: github.com/rajanvijayan/developer-setup

Feel free to share your thoughts and contribute to making this script even better!

Exit mobile version