{"id":19664140,"url":"https://github.com/bhanurp/macsetup","last_synced_at":"2025-04-28T21:33:12.401Z","repository":{"id":256573983,"uuid":"855765468","full_name":"bhanurp/macsetup","owner":"bhanurp","description":"A script for managing software installation on macos using distributable JSON files","archived":false,"fork":false,"pushed_at":"2025-02-28T04:44:18.000Z","size":1649,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T11:23:02.177Z","etag":null,"topics":["dev","installer","mac","macos","macsetup","setup","setup-development-environment","setup-macos","setup-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bhanurp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-11T12:39:58.000Z","updated_at":"2025-02-28T04:44:22.000Z","dependencies_parsed_at":"2024-12-09T04:23:41.939Z","dependency_job_id":"c0532692-84be-4123-a747-a161afaf3edc","html_url":"https://github.com/bhanurp/macsetup","commit_stats":null,"previous_names":["bhanurp/macsetup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhanurp%2Fmacsetup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhanurp%2Fmacsetup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhanurp%2Fmacsetup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhanurp%2Fmacsetup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhanurp","download_url":"https://codeload.github.com/bhanurp/macsetup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251391358,"owners_count":21582158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dev","installer","mac","macos","macsetup","setup","setup-development-environment","setup-macos","setup-script"],"created_at":"2024-11-11T16:16:44.033Z","updated_at":"2025-04-28T21:33:12.386Z","avatar_url":"https://github.com/bhanurp.png","language":"Shell","readme":"![alt text](images/macsetup.png)\n\n# Mac Setup Script\n\nX64 [![x64 Build Status](https://github.com/bhanurp/macsetup/actions/workflows/validate-macsetup.yaml/badge.svg?branch=main\u0026event=push\u0026job=validate-macsetup\u0026matrix.arch=x64)](https://github.com/bhanurp/macsetup/actions/workflows/validate-macsetup.yaml)\n\nARM [![ARM Build Status](https://github.com/bhanurp/macsetup/actions/workflows/validate-macsetup.yaml/badge.svg?branch=main\u0026event=push\u0026job=validate-macsetup\u0026matrix.arch=arm64)](https://github.com/bhanurp/macsetup/actions/workflows/validate-macsetup.yaml)\n------------\n\nMacsetup automates the installation, configuration, and verification of various tools and applications on a macOS system using Homebrew. It leverages a JSON configuration file to define the tools to be installed, their installation commands, verification commands, and additional metadata. This makes it easy to distribute and manage tool installations across multiple systems.\n\n## How It Works\n\n1. **Download Configuration**: The script first tries to download the `config/tools.json` file into the `~/.macsetup` directory if it is not already present.\n2. **Read Configuration Files**: If the `tools.json` file is present, the script uses all `*.json` files in the `~/.macsetup` directory to read the configuration and install the software.\n3. **Skip Certain Files**: Any file that ends with `*.json.d` will be skipped and not used for installation.\n4. **Install and Verify**: For each tool defined in the JSON files, the script runs the installation command and then verifies the installation using the verification command.\n\n## Features\n\n- Installs a list of predefined tools defined in tools.json.\n    - Sample json\n    ```json\n    {\n      \"name\": \"go\",\n      \"install_command\": \"brew install go\",\n      \"verify_command\": \"go version\"\n    }\n    ```\n- Checks the installation status of each tool using the verify_command.\n- Displays a formatted table with the status of each tool given in tools.json.\n- Prompts the user to install all non-available binaries.\n- **New Feature**: A JSON file placed in `$HOME/.macsetup` in the following format can be used to install and verify tools:\n  ```json\n  {\n    \"name\": \"ghostty\",\n    \"install_command\": \"brew install ghostty\",\n    \"verify_command\": \"ghostty --version\",\n    \"notes\": \"Ghostty is a terminal emulator\"\n  }\n  ```\n- **Default Tools**:The default tools.json file is located in config/tools.json.\n- **Sample Configurations**: Sample JSON configuration files are available in the samples directory and can be added to the ~/.macsetup directory for custom tool installations.\n\n## JSON Object Properties\n\n  - `name`: The name of the tool.\n  - `install_command`: The command to install the tool.\n  - `verify_command`: The command to verify the installation of the tool.\n  - `notes`: A description of what the tool does.\n  - `skip`: If set to `true`, skips both installation and verification of the tool.\n  - `post_installation`: An optional command to run after installation and before verification.\n- **Distribution Based**: The script now supports multiple JSON files, making it more distribution-based. You can use and distribute different JSON files to check and validate installations.\n\n## Installation command example\n\n```sh\ncurl -sSL https://raw.githubusercontent.com/bhanurp/macsetup/main/macsetup.sh | bash -s -- --status --install\n```\n\n## Usage\n\n### Checking Installation Status\n\nTo check the installation status of all predefined tools and applications, use the `--status` flag:\n\n```sh\n./macsetup.sh --status\n```\n\n### Install Homebrew\n\n```sh\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\n\n### Install ZSH and configure shell\n\n```sh\nbrew install zsh\nbrew install oh-my-zsh\nbrew install powerlevel10k\necho \"source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme\" \u003e\u003e~/.zshrc\np10k configure\n```\n\n### Install Dev Tools\n\n```sh\nbrew install git\nbrew install --cask iterm2\nbrew install python\nbrew install go\nbrew install openjdk@17\nbrew install --cask visual-studio-code\nbrew install --cask slack\nbrew install --cask postman\nbrew install jq\nbrew install --cask docker\nbrew install --cask rancher\nbrew install gh\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash\nexport NVM_DIR=\"$HOME/.nvm\"\nnvm install stable\nbrew install httpie\nbrew install k9s\nbrew install aws\nbrew install --cask sdm\nbrew install jfrog-cli\nbrew install kubectl\nbrew install fzf\nbrew install tree\nbrew install git-lfs\n```\n\n### Browsers\n\n```sh\nbrew install --cask arc\nbrew install --cask brave-browser\n```\n\n### Productivity Tools\n\n```sh\nbrew install rectangle\nbrew install speedtest-cli\nbrew install bat\nbrew install clipper\n```\n\n### Configurations\n\n#### Screenshots in separate folder\n\n1. Use ```Shift``` + ```Command``` + ```5``` to open the screenshot tool.\n2. Click on \"Options\". Then click \"Other Location...\".\n3. Select that specific location that you created earlier.\n\n#### Show hidden files\n\n```sh\ndefaults write com.apple.finder AppleShowAllFiles -bool true\nkillall Finder\n```\n\n#### Speedup Dock Auto-Hide Delay\n\n```sh\ndefaults write com.apple.dock autohide-delay -float 0\ndefaults write com.apple.dock autohide-time-modifier -float 0.5\nkillall Dock\n```\n\n#### Make VIM default editor\n\n```sh\nexport EDITOR=vim\nexport VISUAL=vim\n```\n\n#### Show Full Path in Finder Title Bar\n\n```sh\ndefaults write com.apple.finder _FXShowPosixPathInTitle -bool true\nkillall Finder\n```\n\n#### Git global config\n\n```sh\ngit config --global user.name \"Your Name\"\ngit config --global user.email \"your.email@example.com\"\ngit config --global core.editor vim\n```\n\n### Music\n\n```sh\nbrew install spotify\n```\n\n## Default Tools\n\nThe following table lists all the binaries that are installed via the default `tools.json` in \n\ntools.json\n\n:\n\n Tool Name | Installation Command | Verification Command | Notes |\n|-----------|----------------------|----------------------|-------|\n| zsh       | `brew install zsh` | `zsh --version` | zsh is a shell similar to bash |\n| omz       | `sh -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\" \u0026\u0026 export ZSH=$HOME/.oh-my-zsh` |  | oh my zsh is a zsh framework |\n| git       | `brew install git` | `git --version` | git is a version control system |\n| iterm2    | `brew install --cask iterm2` | `brew list --cask iterm2` | iTerm2 is a terminal emulator |\n| ghostty   | `brew install ghostty` | `ghostty --version` | Ghostty is a terminal emulator |\n| python3   | `brew install python` | `python3 --version` | Python is a programming language |\n| go        | `brew install go` | `go version` | Go is a programming language |\n| java      | `brew install openjdk@17` | `java -version` | Java is a programming language |\n| code      | `brew install --cask visual-studio-code` | `code --version` | Visual Studio Code is a code editor |\n| slack     | `brew install --cask slack` | `brew list --cask slack` | Slack is a messaging app |\n| postman   | `brew install --cask postman` | `brew list --cask postman` | Postman is an API client |\n| jq        | `brew install jq` | `jq --version` | jq is a terminal JSON processor |\n| docker    | `brew install --cask docker` | `brew list --cask docker` | Docker Desktop is a containerization platform |\n| rancher   | `brew install --cask rancher` | `brew list --cask rancher` | Rancher Desktop is an alternative to Docker Desktop |\n| gh        | `brew install gh` | `gh --version` | gh is the GitHub CLI |\n| http      | `brew install httpie` | `http --version` | httpie is a HTTP client |\n| k9s       | `brew install k9s` | `k9s version` | k9s is a Kubernetes TUI application |\n| aws       | `brew install awscli` | `aws --version` | awscli is the AWS CLI |\n| sdm       | `brew install --cask sdm` | `brew list --cask sdm` | StrongDM is an access management tool |\n| jfrog     | `brew install jfrog-cli` | `jfrog --version` | jfrog is a CLI for JFrog products |\n| kubectl   | `brew install kubectl` | `kubectl version --client` | kubectl is the Kubernetes CLI |\n| arc       | `brew install --cask arc` | `brew list --cask arc` | Arc is a fancy browser |\n| brave     | `brew install --cask brave-browser` | `brew list --cask brave-browser` | Brave is a privacy-focused browser |\n| rectangle | `brew install rectangle` | `brew list rectangle` | Rectangle is a window manager |\n| speedtest | `brew install speedtest-cli` | `speedtest --version` | speedtest-cli is a network speed test tool |\n| bat       | `brew install bat` | `bat --version` | bat is a cat clone on steroids |\n| clipper   | `brew install clipper` | `clipper --version` | clipper is a clipboard manager |\n| spotify   | `brew install spotify` | `brew list spotify` | Spotify is a music streaming service |\n| fzf       | `brew install fzf` | `fzf --version` | fzf is a fuzzy finder generally used with other terminal applications |\n| tree      | `brew install tree` | `tree` | tree is a directory listing program |\n| git-lfs   | `brew install git-lfs` |  | git-lfs is a Git extension for large files |\n| lsd       | `brew install lsd` | `lsd` | lsd is a modern ls command |\n| whatsapp  | `brew install whatsapp` |  | WhatsApp is a messaging app |\n| ffmpeg    | `brew install ffmpeg` | `ffmpeg -version` | ffmpeg is a multimedia framework and tool suite to edit video and audio |\n| mpv       | `brew install mpv` | `mpv --version` | mpv is a terminal media player |\n\n## GitHub Actions\n\nThe repository includes a GitHub Actions workflow to validate the installation of tools. The workflow checks if `tools.json` exists, installs the necessary tools, and validates their installation.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhanurp%2Fmacsetup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhanurp%2Fmacsetup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhanurp%2Fmacsetup/lists"}