├── .github └── workflows │ └── validate-macsetup.yaml ├── LICENSE ├── README.md ├── config └── tools.json ├── images ├── mac_setup.png └── macsetup.png ├── macsetup.sh └── samples ├── README.md ├── backend-dev.json ├── devops.json ├── frontend-dev.json ├── tech-writer.json └── tui.json /.github/workflows/validate-macsetup.yaml: -------------------------------------------------------------------------------- 1 | name: Validate macsetup.sh 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - 'README.md' 7 | pull_request: 8 | paths-ignore: 9 | - 'README.md' 10 | 11 | jobs: 12 | validate-macsetup: 13 | runs-on: ${{ matrix.os }} 14 | strategy: 15 | matrix: 16 | os: [macos-latest] 17 | arch: [x64, arm64] 18 | fail-fast: false 19 | 20 | steps: 21 | - name: Checkout repository 22 | uses: actions/checkout@v2 23 | 24 | - name: Run macsetup.sh 25 | run: | 26 | chmod +x macsetup.sh 27 | ./macsetup.sh --status --install 28 | 29 | - name: Set up Homebrew 30 | run: | 31 | if ! command -v brew &> /dev/null; then 32 | echo "Installing Homebrew..." 33 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 34 | else 35 | echo "Homebrew is already installed." 36 | fi 37 | 38 | - name: Install jq 39 | run: | 40 | if ! command -v jq &> /dev/null; then 41 | echo "Installing jq..." 42 | brew install jq 43 | else 44 | echo "jq is already installed." 45 | fi 46 | - name: Check if tools.json exists 47 | run: | 48 | macsetup_dir="$HOME/.macsetup" 49 | if [ ! -f "$macsetup_dir/tools.json" ]; then 50 | echo "tools.json not found in $macsetup_dir" 51 | exit 1 52 | else 53 | echo "tools.json found." 54 | fi 55 | - name: Validate installation 56 | run: | 57 | # Read validation commands from config/tools.json and run them 58 | macsetup_dir="$HOME/.macsetup" 59 | if [ ! -d "$macsetup_dir" ]; then 60 | echo "$macsetup_dir does not exist." 61 | exit 1 62 | fi 63 | if [ ! -f "$macsetup_dir/tools.json" ]; then 64 | echo "tools.json not found in $macsetup_dir" 65 | exit 1 66 | fi 67 | echo "folder and file exists" 68 | all_installed=true 69 | while IFS= read -r tool; do 70 | skip=$(echo "$tool" | jq -r '.skip // false') 71 | if [ "$skip" = true ]; then 72 | echo "Skipping $(echo "$tool" | jq -r '.name')" 73 | continue 74 | fi 75 | 76 | name=$(echo "$tool" | jq -r '.name') 77 | verify_command=$(echo "$tool" | jq -r '.verify_command') 78 | if [ -n "$verify_command" ]; then 79 | echo "Validating $name..." 80 | if eval "$verify_command"; then 81 | echo "$name validation successful." 82 | else 83 | echo "$name validation failed." 84 | all_installed=false 85 | fi 86 | else 87 | echo "No validation command provided for $name." 88 | fi 89 | done < <(jq -c '.[]' "$macsetup_dir/tools.json") 90 | echo "is all installed: $all_installed" 91 | if [ "$all_installed" = false ]; then 92 | echo "Some tools are not installed correctly." 93 | exit 1 94 | else 95 | echo "All tools are installed correctly." 96 | fi 97 | - name: Test help flag 98 | run: | 99 | ./macsetup.sh --help 100 | if [ $? -ne 0 ]; then 101 | echo "--help command failed." 102 | exit 1 103 | else 104 | echo "--help command succeeded." 105 | fi -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Bhanu Reddy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![alt text](images/macsetup.png) 2 | 3 | # Mac Setup Script 4 | 5 | X64 [![x64 Build Status](https://github.com/bhanurp/macsetup/actions/workflows/validate-macsetup.yaml/badge.svg?branch=main&event=push&job=validate-macsetup&matrix.arch=x64)](https://github.com/bhanurp/macsetup/actions/workflows/validate-macsetup.yaml) 6 | 7 | ARM [![ARM Build Status](https://github.com/bhanurp/macsetup/actions/workflows/validate-macsetup.yaml/badge.svg?branch=main&event=push&job=validate-macsetup&matrix.arch=arm64)](https://github.com/bhanurp/macsetup/actions/workflows/validate-macsetup.yaml) 8 | ------------ 9 | 10 | Macsetup 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. 11 | 12 | ## How It Works 13 | 14 | 1. **Download Configuration**: The script first tries to download the `config/tools.json` file into the `~/.macsetup` directory if it is not already present. 15 | 2. **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. 16 | 3. **Skip Certain Files**: Any file that ends with `*.json.d` will be skipped and not used for installation. 17 | 4. **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. 18 | 19 | ## Features 20 | 21 | - Installs a list of predefined tools defined in tools.json. 22 | - Sample json 23 | ```json 24 | { 25 | "name": "go", 26 | "install_command": "brew install go", 27 | "verify_command": "go version" 28 | } 29 | ``` 30 | - Checks the installation status of each tool using the verify_command. 31 | - Displays a formatted table with the status of each tool given in tools.json. 32 | - Prompts the user to install all non-available binaries. 33 | - **New Feature**: A JSON file placed in `$HOME/.macsetup` in the following format can be used to install and verify tools: 34 | ```json 35 | { 36 | "name": "ghostty", 37 | "install_command": "brew install ghostty", 38 | "verify_command": "ghostty --version", 39 | "notes": "Ghostty is a terminal emulator" 40 | } 41 | ``` 42 | - **Default Tools**:The default tools.json file is located in config/tools.json. 43 | - **Sample Configurations**: Sample JSON configuration files are available in the samples directory and can be added to the ~/.macsetup directory for custom tool installations. 44 | 45 | ## JSON Object Properties 46 | 47 | - `name`: The name of the tool. 48 | - `install_command`: The command to install the tool. 49 | - `verify_command`: The command to verify the installation of the tool. 50 | - `notes`: A description of what the tool does. 51 | - `skip`: If set to `true`, skips both installation and verification of the tool. 52 | - `post_installation`: An optional command to run after installation and before verification. 53 | - **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. 54 | 55 | ## Installation command example 56 | 57 | ```sh 58 | curl -sSL https://raw.githubusercontent.com/bhanurp/macsetup/main/macsetup.sh | bash -s -- --status --install 59 | ``` 60 | 61 | ## Usage 62 | 63 | ### Checking Installation Status 64 | 65 | To check the installation status of all predefined tools and applications, use the `--status` flag: 66 | 67 | ```sh 68 | ./macsetup.sh --status 69 | ``` 70 | 71 | ### Install Homebrew 72 | 73 | ```sh 74 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 75 | ``` 76 | 77 | ### Install ZSH and configure shell 78 | 79 | ```sh 80 | brew install zsh 81 | brew install oh-my-zsh 82 | brew install powerlevel10k 83 | echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc 84 | p10k configure 85 | ``` 86 | 87 | ### Install Dev Tools 88 | 89 | ```sh 90 | brew install git 91 | brew install --cask iterm2 92 | brew install python 93 | brew install go 94 | brew install openjdk@17 95 | brew install --cask visual-studio-code 96 | brew install --cask slack 97 | brew install --cask postman 98 | brew install jq 99 | brew install --cask docker 100 | brew install --cask rancher 101 | brew install gh 102 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash 103 | export NVM_DIR="$HOME/.nvm" 104 | nvm install stable 105 | brew install httpie 106 | brew install k9s 107 | brew install aws 108 | brew install --cask sdm 109 | brew install jfrog-cli 110 | brew install kubectl 111 | brew install fzf 112 | brew install tree 113 | brew install git-lfs 114 | ``` 115 | 116 | ### Browsers 117 | 118 | ```sh 119 | brew install --cask arc 120 | brew install --cask brave-browser 121 | ``` 122 | 123 | ### Productivity Tools 124 | 125 | ```sh 126 | brew install rectangle 127 | brew install speedtest-cli 128 | brew install bat 129 | brew install clipper 130 | ``` 131 | 132 | ### Configurations 133 | 134 | #### Screenshots in separate folder 135 | 136 | 1. Use ```Shift``` + ```Command``` + ```5``` to open the screenshot tool. 137 | 2. Click on "Options". Then click "Other Location...". 138 | 3. Select that specific location that you created earlier. 139 | 140 | #### Show hidden files 141 | 142 | ```sh 143 | defaults write com.apple.finder AppleShowAllFiles -bool true 144 | killall Finder 145 | ``` 146 | 147 | #### Speedup Dock Auto-Hide Delay 148 | 149 | ```sh 150 | defaults write com.apple.dock autohide-delay -float 0 151 | defaults write com.apple.dock autohide-time-modifier -float 0.5 152 | killall Dock 153 | ``` 154 | 155 | #### Make VIM default editor 156 | 157 | ```sh 158 | export EDITOR=vim 159 | export VISUAL=vim 160 | ``` 161 | 162 | #### Show Full Path in Finder Title Bar 163 | 164 | ```sh 165 | defaults write com.apple.finder _FXShowPosixPathInTitle -bool true 166 | killall Finder 167 | ``` 168 | 169 | #### Git global config 170 | 171 | ```sh 172 | git config --global user.name "Your Name" 173 | git config --global user.email "your.email@example.com" 174 | git config --global core.editor vim 175 | ``` 176 | 177 | ### Music 178 | 179 | ```sh 180 | brew install spotify 181 | ``` 182 | 183 | ## Default Tools 184 | 185 | The following table lists all the binaries that are installed via the default `tools.json` in 186 | 187 | tools.json 188 | 189 | : 190 | 191 | Tool Name | Installation Command | Verification Command | Notes | 192 | |-----------|----------------------|----------------------|-------| 193 | | zsh | `brew install zsh` | `zsh --version` | zsh is a shell similar to bash | 194 | | omz | `sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && export ZSH=$HOME/.oh-my-zsh` | | oh my zsh is a zsh framework | 195 | | git | `brew install git` | `git --version` | git is a version control system | 196 | | iterm2 | `brew install --cask iterm2` | `brew list --cask iterm2` | iTerm2 is a terminal emulator | 197 | | ghostty | `brew install ghostty` | `ghostty --version` | Ghostty is a terminal emulator | 198 | | python3 | `brew install python` | `python3 --version` | Python is a programming language | 199 | | go | `brew install go` | `go version` | Go is a programming language | 200 | | java | `brew install openjdk@17` | `java -version` | Java is a programming language | 201 | | code | `brew install --cask visual-studio-code` | `code --version` | Visual Studio Code is a code editor | 202 | | slack | `brew install --cask slack` | `brew list --cask slack` | Slack is a messaging app | 203 | | postman | `brew install --cask postman` | `brew list --cask postman` | Postman is an API client | 204 | | jq | `brew install jq` | `jq --version` | jq is a terminal JSON processor | 205 | | docker | `brew install --cask docker` | `brew list --cask docker` | Docker Desktop is a containerization platform | 206 | | rancher | `brew install --cask rancher` | `brew list --cask rancher` | Rancher Desktop is an alternative to Docker Desktop | 207 | | gh | `brew install gh` | `gh --version` | gh is the GitHub CLI | 208 | | http | `brew install httpie` | `http --version` | httpie is a HTTP client | 209 | | k9s | `brew install k9s` | `k9s version` | k9s is a Kubernetes TUI application | 210 | | aws | `brew install awscli` | `aws --version` | awscli is the AWS CLI | 211 | | sdm | `brew install --cask sdm` | `brew list --cask sdm` | StrongDM is an access management tool | 212 | | jfrog | `brew install jfrog-cli` | `jfrog --version` | jfrog is a CLI for JFrog products | 213 | | kubectl | `brew install kubectl` | `kubectl version --client` | kubectl is the Kubernetes CLI | 214 | | arc | `brew install --cask arc` | `brew list --cask arc` | Arc is a fancy browser | 215 | | brave | `brew install --cask brave-browser` | `brew list --cask brave-browser` | Brave is a privacy-focused browser | 216 | | rectangle | `brew install rectangle` | `brew list rectangle` | Rectangle is a window manager | 217 | | speedtest | `brew install speedtest-cli` | `speedtest --version` | speedtest-cli is a network speed test tool | 218 | | bat | `brew install bat` | `bat --version` | bat is a cat clone on steroids | 219 | | clipper | `brew install clipper` | `clipper --version` | clipper is a clipboard manager | 220 | | spotify | `brew install spotify` | `brew list spotify` | Spotify is a music streaming service | 221 | | fzf | `brew install fzf` | `fzf --version` | fzf is a fuzzy finder generally used with other terminal applications | 222 | | tree | `brew install tree` | `tree` | tree is a directory listing program | 223 | | git-lfs | `brew install git-lfs` | | git-lfs is a Git extension for large files | 224 | | lsd | `brew install lsd` | `lsd` | lsd is a modern ls command | 225 | | whatsapp | `brew install whatsapp` | | WhatsApp is a messaging app | 226 | | ffmpeg | `brew install ffmpeg` | `ffmpeg -version` | ffmpeg is a multimedia framework and tool suite to edit video and audio | 227 | | mpv | `brew install mpv` | `mpv --version` | mpv is a terminal media player | 228 | 229 | ## GitHub Actions 230 | 231 | The 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. 232 | -------------------------------------------------------------------------------- /config/tools.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "zsh", 4 | "install_command": "brew install zsh", 5 | "verify_command": "zsh --version", 6 | "notes": "zsh is a shell similar to bash" 7 | }, 8 | { 9 | "name": "omz", 10 | "install_command": "sh -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\" && export ZSH=$HOME/.oh-my-zsh", 11 | "verify_command": "", 12 | "notes": "oh my zsh is a zsh framework" 13 | }, 14 | { 15 | "name": "git", 16 | "install_command": "brew install git", 17 | "verify_command": "git --version", 18 | "notes": "git is a version control system" 19 | }, 20 | { 21 | "name": "iterm2", 22 | "install_command": "brew install --cask iterm2", 23 | "verify_command": "brew list --cask iterm2", 24 | "notes": "iTerm2 is a terminal emulator" 25 | }, 26 | { 27 | "name": "ghostty", 28 | "install_command": "brew install ghostty", 29 | "verify_command": "ghostty --version", 30 | "notes": "Ghostty is a terminal emulator" 31 | }, 32 | { 33 | "name": "python3", 34 | "install_command": "brew install python", 35 | "verify_command": "python3 --version", 36 | "notes": "Python is a programming language" 37 | }, 38 | { 39 | "name": "go", 40 | "install_command": "brew install go", 41 | "verify_command": "go version", 42 | "notes": "Go is a programming language" 43 | }, 44 | { 45 | "name": "java", 46 | "install_command": "brew install openjdk@17", 47 | "verify_command": "java -version", 48 | "notes": "Java is a programming language" 49 | }, 50 | { 51 | "name": "code", 52 | "install_command": "brew install --cask visual-studio-code", 53 | "verify_command": "code --version", 54 | "notes": "Visual Studio Code is a code editor" 55 | }, 56 | { 57 | "name": "slack", 58 | "install_command": "brew install --cask slack", 59 | "verify_command": "brew list --cask slack", 60 | "notes": "Slack is a messaging app" 61 | }, 62 | { 63 | "name": "postman", 64 | "install_command": "brew install --cask postman", 65 | "verify_command": "brew list --cask postman", 66 | "notes": "Postman is an API client" 67 | }, 68 | { 69 | "name": "jq", 70 | "install_command": "brew install jq", 71 | "verify_command": "jq --version", 72 | "notes": "jq is a terminal JSON processor" 73 | }, 74 | { 75 | "name": "docker", 76 | "install_command": "brew install --cask docker", 77 | "verify_command": "brew list --cask docker", 78 | "notes": "Docker Desktop is a containerization platform" 79 | }, 80 | { 81 | "name": "gh", 82 | "install_command": "brew install gh", 83 | "verify_command": "gh --version", 84 | "notes": "gh is the GitHub CLI" 85 | }, 86 | { 87 | "name": "http", 88 | "install_command": "brew install httpie", 89 | "verify_command": "http --version", 90 | "notes": "httpie is a HTTP client" 91 | }, 92 | { 93 | "name": "k9s", 94 | "install_command": "brew install k9s", 95 | "verify_command": "k9s version", 96 | "notes": "k9s is a Kubernetes TUI application" 97 | }, 98 | { 99 | "name": "aws", 100 | "install_command": "brew install awscli", 101 | "verify_command": "aws --version", 102 | "notes": "awscli is the AWS CLI" 103 | }, 104 | { 105 | "name": "sdm", 106 | "install_command": "brew install --cask sdm", 107 | "verify_command": "brew list --cask sdm", 108 | "notes": "StrongDM is an access management tool" 109 | }, 110 | { 111 | "name": "jfrog", 112 | "install_command": "brew install jfrog-cli", 113 | "verify_command": "jfrog --version", 114 | "notes": "jfrog is a CLI for JFrog products" 115 | }, 116 | { 117 | "name": "kubectl", 118 | "install_command": "brew install kubectl", 119 | "verify_command": "kubectl version --client", 120 | "notes": "kubectl is the Kubernetes CLI" 121 | }, 122 | { 123 | "name": "arc", 124 | "install_command": "brew install --cask arc", 125 | "verify_command": "brew list --cask arc", 126 | "notes": "Arc is a fancy browser" 127 | }, 128 | { 129 | "name": "brave", 130 | "install_command": "brew install --cask brave-browser", 131 | "verify_command": "brew list --cask brave-browser", 132 | "notes": "Brave is a privacy-focused browser" 133 | }, 134 | { 135 | "name": "rectangle", 136 | "install_command": "brew install rectangle", 137 | "verify_command": "brew list rectangle", 138 | "notes": "Rectangle is a window manager" 139 | }, 140 | { 141 | "name": "speedtest", 142 | "install_command": "brew install speedtest-cli", 143 | "verify_command": "speedtest --version", 144 | "notes": "speedtest-cli is a network speed test tool" 145 | }, 146 | { 147 | "name": "bat", 148 | "install_command": "brew install bat", 149 | "verify_command": "bat --version", 150 | "notes": "bat is a cat clone on steroids" 151 | }, 152 | { 153 | "name": "clipper", 154 | "install_command": "brew install clipper", 155 | "verify_command": "clipper --version", 156 | "notes": "clipper is a clipboard manager" 157 | }, 158 | { 159 | "name": "spotify", 160 | "install_command": "brew install spotify", 161 | "verify_command": "brew list spotify", 162 | "notes": "Spotify is a music streaming service" 163 | }, 164 | { 165 | "name": "fzf", 166 | "install_command": "brew install fzf", 167 | "verify_command": "fzf --version", 168 | "notes": "fzf is a fuzzy finder generally used with other terminal applications" 169 | }, 170 | { 171 | "name": "tree", 172 | "install_command": "brew install tree", 173 | "verify_command": "tree", 174 | "notes": "tree is a directory listing program" 175 | }, 176 | { 177 | "name": "git-lfs", 178 | "install_command": "brew install git-lfs", 179 | "verify_command": "", 180 | "notes": "git-lfs is a Git extension for large files" 181 | }, 182 | { 183 | "name": "lsd", 184 | "install_command": "brew install lsd", 185 | "verify_command": "lsd", 186 | "notes": "lsd is a modern ls command" 187 | }, 188 | { 189 | "name": "whatsapp", 190 | "install_command": "brew install whatsapp", 191 | "verify_command": "", 192 | "notes": "WhatsApp is a messaging app" 193 | }, 194 | { 195 | "name": "ffmpeg", 196 | "install_command": "brew install ffmpeg", 197 | "verify_command": "ffmpeg -version", 198 | "notes": "ffmpeg is a multimedia framework and tool suite to edit video and audio" 199 | }, 200 | { 201 | "name": "mpv", 202 | "install_command": "brew install mpv", 203 | "verify_command": "mpv --version", 204 | "notes": "mpv is a terminal media player" 205 | } 206 | ] -------------------------------------------------------------------------------- /images/mac_setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhanurp/macsetup/e631d9b11291382d892dae49445a3550c681e528/images/mac_setup.png -------------------------------------------------------------------------------- /images/macsetup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bhanurp/macsetup/e631d9b11291382d892dae49445a3550c681e528/images/macsetup.png -------------------------------------------------------------------------------- /macsetup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Define color codes 4 | GREEN='\033[0;32m' 5 | RED='\033[0;31m' 6 | YELLOW='\033[0;33m' 7 | NC='\033[0m' 8 | TICK='[✅]' 9 | CROSS='[❌]' 10 | HYPHEN='[➖]' 11 | 12 | # check and log the status 13 | check_and_log() { 14 | tool_name=$1 15 | check_command=$2 16 | 17 | # Check if installed via Homebrew 18 | eval "$check_command" &> /dev/null 19 | if [ $? -eq 0 ]; then 20 | printf "%-20s ${GREEN}%s${NC}\n" "$tool_name" "Already Installed (via brew)" 21 | else 22 | # Check if installed directly 23 | if command -v $tool_name &> /dev/null; then 24 | printf "%-20s ${GREEN}%s${NC}\n" "$tool_name" "Already Installed (not via brew)" 25 | else 26 | printf "%-20s ${RED}%s${NC}\n" "$tool_name" "Not Installed" 27 | fi 28 | fi 29 | } 30 | 31 | # install and log the status 32 | install_and_log() { 33 | tool_name=$1 34 | install_command=$2 35 | verify_command=$3 36 | 37 | echo "Installing $tool_name..." 38 | eval "$install_command" 39 | 40 | if [ $? -eq 0 ]; then 41 | echo -e "${GREEN}$tool_name installed successfully.${NC}" 42 | if [ -n "$verify_command" ]; then 43 | echo "Verifying $tool_name installation..." 44 | eval "$verify_command" 45 | if [ $? -eq 0 ]; then 46 | echo -e "${GREEN}$tool_name verification successful. $TICK${NC}" 47 | else 48 | echo -e "${RED}$tool_name verification failed. $CROSS${NC}" 49 | fi 50 | else 51 | echo -e "${YELLOW}Verification skipped for $tool_name since verification command is not provided. $HYPHEN${NC}" 52 | fi 53 | else 54 | echo -e "${RED}$tool_name installation failed.${NC}" 55 | fi 56 | } 57 | 58 | debug_echo() { 59 | if [ "$DEBUG" = true ]; then 60 | echo "$1" 61 | fi 62 | } 63 | 64 | # Function to setup alias 65 | setup_alias() { 66 | read -p "Do you want to set up the following aliases? (y/n): 67 | alias ls=lsd 68 | alias ll='ls -latrh' 69 | alias cat=bat 70 | " response 71 | 72 | if [[ "$response" =~ ^[Yy]$ ]]; then 73 | alias ls=lsd 74 | alias ll='ls -latrh' 75 | alias cat=bat 76 | 77 | write_to_shell_profile "alias ls=lsd" 78 | write_to_shell_profile "alias ll='ls -latrh'" 79 | write_to_shell_profile "alias cat=bat" 80 | echo "Aliases have been added to your shell profile." 81 | else 82 | echo "Aliases setup skipped." 83 | fi 84 | } 85 | 86 | # Function to detect shell and write content to the appropriate profile 87 | write_to_shell_profile() { 88 | content=$1 89 | 90 | if [ "$SHELL" = "/bin/bash" ]; then 91 | profile_file="$HOME/.bashrc" 92 | elif [ "$SHELL" = "/bin/zsh" ]; then 93 | profile_file="$HOME/.zshrc" 94 | else 95 | echo "Unsupported shell: $SHELL" 96 | return 1 97 | fi 98 | 99 | echo "Writing to $profile_file..." 100 | echo "$content" >> "$profile_file" 101 | echo "Content written to $profile_file. Please restart your shell or run 'source $profile_file' to apply the changes." 102 | } 103 | 104 | # Function to check and install Homebrew 105 | check_and_install_brew() { 106 | # Check if brew is installed 107 | if command -v brew >/dev/null 2>&1; then 108 | echo "Homebrew is already installed." 109 | else 110 | echo "Homebrew is not installed. Installing now..." 111 | # Install Homebrew 112 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 113 | if [ $? -eq 0 ]; then 114 | echo -e "${GREEN}Homebrew installed successfully.${NC}" 115 | else 116 | echo -e "${RED}Failed to install Homebrew. Please check your internet connection or permissions.${NC}" 117 | exit 1 118 | fi 119 | fi 120 | } 121 | 122 | # Function to check and install jq 123 | check_and_install_jq() { 124 | if command -v jq >/dev/null 2>&1; then 125 | echo "jq is already installed." 126 | else 127 | echo "jq is not installed. Installing now..." 128 | brew install jq 129 | if [ $? -eq 0 ]; then 130 | echo -e "${GREEN}jq installed successfully.${NC}" 131 | else 132 | echo -e "${RED}Failed to install jq. Please check your internet connection or permissions.${NC}" 133 | exit 1 134 | fi 135 | fi 136 | } 137 | 138 | # Read tools from JSON file and install them 139 | install_tools_from_json() { 140 | json_file=$1 141 | if [ ! -f "$json_file" ]; then 142 | echo -e "${RED}Error: JSON file $json_file not found.${NC}" 143 | exit 1 144 | fi 145 | 146 | tools=$(jq -c '.[]' "$json_file") 147 | if [ $? -ne 0 ]; then 148 | echo -e "${RED}Error: Failed to parse JSON file $json_file.${NC}" 149 | exit 1 150 | fi 151 | 152 | echo "$tools" | while IFS= read -r tool; do 153 | skip=$(echo "$tool" | jq -r '.skip // false') 154 | if [ "$skip" = true ]; then 155 | echo "Skipping $(echo "$tool" | jq -r '.name')" 156 | continue 157 | fi 158 | 159 | name=$(echo "$tool" | jq -r '.name') 160 | install_command=$(echo "$tool" | jq -r '.install_command') 161 | verify_command=$(echo "$tool" | jq -r '.verify_command') 162 | 163 | if [ -z "$name" ] || [ -z "$install_command" ]; then 164 | echo -e "${RED}Error: Missing required fields in JSON file.${NC}" 165 | exit 1 166 | fi 167 | 168 | install_and_log "$name" "$install_command" "$verify_command" 169 | done 170 | } 171 | 172 | # Function to check non-available tools 173 | check_non_available_tools() { 174 | non_available_tools=() 175 | for tool in "${tools[@]}"; do 176 | IFS=":" read -r tool_name install_command check_command <<< "$tool" 177 | eval "$check_command" &> /dev/null 178 | if [ $? -ne 0 ] && ! command -v $tool_name &> /dev/null; then 179 | printf "%-20s\n" "$tool_name" 180 | non_available_tools+=("$tool") 181 | fi 182 | done 183 | } 184 | 185 | display_help() { 186 | echo "Usage: $0 [--skip] [--install] [--debug] [--status] [--help]" 187 | echo " --skip Skip downloading tools.json from URL and use existing file in ~/.macsetup" 188 | echo " --install Automatically proceed with the installation of all non-available binaries" 189 | echo " --debug Enable debug mode to print additional information" 190 | echo " --status Check the status of tools and install non-available binaries" 191 | echo " --help Display this help message" 192 | exit 0 193 | } 194 | 195 | # Check and install Homebrew 196 | check_and_install_brew 197 | 198 | # Check and install jq 199 | check_and_install_jq 200 | 201 | # Check if ~/.macsetup directory exists and create it if necessary 202 | macsetup_dir="$HOME/.macsetup" 203 | if [ ! -d "$macsetup_dir" ]; then 204 | echo "Directory $macsetup_dir does not exist. Creating now..." 205 | mkdir -p "$macsetup_dir" 206 | fi 207 | 208 | # Parse command-line arguments 209 | skip_download=false 210 | auto_install=false 211 | DEBUG=false 212 | while [[ "$1" != "" ]]; do 213 | case $1 in 214 | --help) 215 | display_help 216 | ;; 217 | --skip) 218 | skip_download=true 219 | ;; 220 | --install) 221 | auto_install=true 222 | ;; 223 | --debug) 224 | DEBUG=true 225 | ;; 226 | --status) 227 | # Ensure tools.json is downloaded before checking status 228 | if [ "$skip_download" = false ] && [ ! -f "$macsetup_dir/tools.json" ]; then 229 | echo "Downloading tools.json..." 230 | curl -L -o "$macsetup_dir/tools.json" "https://raw.githubusercontent.com/bhanurp/macsetup/main/config/tools.json" 231 | fi 232 | 233 | # Check for eligible JSON files in ~/.macsetup directory 234 | json_files=("$macsetup_dir"/*.json) 235 | eligible_files=() 236 | for json_file in "${json_files[@]}"; do 237 | if [[ "$json_file" != *.json.d ]]; then 238 | eligible_files+=("$json_file") 239 | fi 240 | done 241 | 242 | # Download the default tools.json into ~/.macsetup if no eligible files are found 243 | if [ ${#eligible_files[@]} -eq 0 ]; then 244 | echo "No eligible JSON files found. Downloading tools.json..." 245 | curl -L -o "$macsetup_dir/tools.json" "https://raw.githubusercontent.com/bhanurp/macsetup/main/config/tools.json" 246 | eligible_files+=("$macsetup_dir/tools.json") 247 | else 248 | echo "Using existing JSON files in ~/.macsetup" 249 | fi 250 | 251 | # Load tools from tools.json 252 | tools=$(jq -c '.[]' "$macsetup_dir/tools.json") 253 | if [ $? -ne 0 ]; then 254 | echo -e "${RED}Error: Failed to parse JSON file $macsetup_dir/tools.json.${NC}" 255 | exit 1 256 | fi 257 | 258 | check_and_install_brew 259 | printf "%-20s %s\n" "--------------------" "--------------------" 260 | printf "%-20s %s\n" "Tool" "Status" 261 | printf "%-20s %s\n" "--------------------" "--------------------" 262 | echo "$tools" | while IFS= read -r tool; do 263 | skip=$(echo "$tool" | jq -r '.skip // false') 264 | if [ "$skip" = true ]; then 265 | echo "Skipping $(echo "$tool" | jq -r '.name')" 266 | continue 267 | fi 268 | 269 | tool_name=$(echo "$tool" | jq -r '.name') 270 | debug_echo "Checking tool name [$tool_name]..." 271 | check_command=$(echo "$tool" | jq -r '.verify_command') 272 | debug_echo "Checking [${tool_name}]...[${check_command}]" 273 | check_and_log "${tool_name}" "${check_command}" 274 | done 275 | printf "%-20s %s\n" "--------------------" "--------------------" 276 | 277 | # Display non-available binaries 278 | echo -e "\nNon-Available Binaries on Mac:" 279 | check_non_available_tools 280 | 281 | # Ask user if they want to proceed with installation 282 | if [ "$auto_install" = true ]; then 283 | response="y" 284 | else 285 | read -p "Would you like to proceed with the installation of all non-available binaries? [Y/n] " response 286 | fi 287 | response=$(echo "$response" | tr '[:upper:]' '[:lower:]') # Convert to lowercase 288 | if [[ "$response" =~ ^(yes|y| ) ]] || [[ -z "$response" ]]; then 289 | for tool in "${non_available_tools[@]}"; do 290 | tool_name=$(echo "$tool" | jq -r '.name') 291 | install_command=$(echo "$tool" | jq -r '.install_command') 292 | check_command=$(echo "$tool" | jq -r '.verify_command') 293 | install_and_log "$tool_name" "$install_command" "$check_command" 294 | done 295 | 296 | # Re-run the check for non-available tools after installation 297 | echo -e "\nRe-checking non-available binaries on Mac:" 298 | check_non_available_tools 299 | else 300 | echo "Installation aborted." 301 | fi 302 | exit 0 303 | ;; 304 | *) 305 | echo "Usage: $0 [--skip] [--install] [--status]" 306 | echo " --skip Skip downloading tools.json from URL and use existing file in ~/.macsetup" 307 | echo " --install Automatically proceed with the installation of all non-available binaries" 308 | echo " --status Check the status of tools and install non-available binaries" 309 | exit 1 310 | ;; 311 | esac 312 | shift 313 | done 314 | 315 | # Check for eligible JSON files in ~/.macsetup directory 316 | json_files=("$macsetup_dir"/*.json) 317 | eligible_files=() 318 | for json_file in "${json_files[@]}"; do 319 | if [[ "$json_file" != *.json.d ]]; then 320 | eligible_files+=("$json_file") 321 | fi 322 | done 323 | 324 | # Download the default tools.json into ~/.macsetup if not skipping and no eligible files are found 325 | if [ "$skip_download" = false ] && [ ${#eligible_files[@]} -eq 0 ]; then 326 | echo "No eligible JSON files found. Downloading tools.json..." 327 | curl -L -o "$macsetup_dir/tools.json" "https://raw.githubusercontent.com/bhanurp/macsetup/main/config/tools.json" 328 | eligible_files+=("$macsetup_dir/tools.json") 329 | else 330 | echo "Skipping download of tools.json and using existing file in ~/.macsetup" 331 | fi 332 | 333 | # Process JSON files in ~/.macsetup directory 334 | for json_file in "${eligible_files[@]}"; do 335 | install_tools_from_json "$json_file" 336 | done 337 | 338 | # Call setup_alias function 339 | setup_alias -------------------------------------------------------------------------------- /samples/README.md: -------------------------------------------------------------------------------- 1 | # Software Installation JSON Samples 2 | 3 | This folder contains sample JSON files that can be used as templates for automating the installation, verification, and management of various software tools. Each JSON file represents a structured format for installing and verifying specific software using standard commands. 4 | 5 | ## Structure 6 | 7 | Each JSON file includes: 8 | - **`name`**: The name of the software. 9 | - **`install_command`**: The command to install the software. 10 | - **`verify_command`**: A command to verify the software installation. 11 | - **`notes`**: Additional information or context about the software. 12 | 13 | ### Example JSON Format 14 | 15 | ```json 16 | [ 17 | { 18 | "name": "example-software", 19 | "install_command": "brew install example-software", 20 | "verify_command": "example-software --version", 21 | "notes": "This is a placeholder for demonstration purposes." 22 | } 23 | ] 24 | ``` 25 | 26 | ## How to Use 27 | 28 | 1. **Reuse**: Copy any of the provided JSON samples into your project for automation purposes. 29 | 2. **Update**: Modify the `install_command`, `verify_command`, or `notes` fields as needed to suit your specific requirements. 30 | 3. **Extend**: Add new JSON files for additional software by following the structure outlined in the example. 31 | 32 | ## Why Use These JSON Files? 33 | 34 | - **Consistency**: Maintain a uniform structure for software installation instructions. 35 | - **Reusability**: Adapt and reuse the JSON samples by moving them into ~/.macsetup directory 36 | 37 | ## Contributing 38 | 39 | If you'd like to add more samples or improve existing ones: 40 | 1. Fork this repository. 41 | 2. Create a new JSON file or modify an existing one. 42 | 3. Submit a pull request with your changes. -------------------------------------------------------------------------------- /samples/backend-dev.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Node.js", 4 | "install_command": "brew install node", 5 | "verify_command": "node --version", 6 | "notes": "Node.js is a JavaScript runtime for server-side programming." 7 | }, 8 | { 9 | "name": "nvm", 10 | "install_command": "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash", 11 | "verify_command": "nvm --version", 12 | "notes": "nvm is a version manager for Node.js, allowing you to install and switch between multiple versions of Node.js." 13 | }, 14 | { 15 | "name": "PostgreSQL", 16 | "install_command": "brew install postgresql", 17 | "verify_command": "psql --version", 18 | "notes": "PostgreSQL is a powerful, open-source relational database system." 19 | }, 20 | { 21 | "name": "MySQL", 22 | "install_command": "brew install mysql", 23 | "verify_command": "mysql --version", 24 | "notes": "MySQL is an open-source relational database management system." 25 | }, 26 | { 27 | "name": "MongoDB", 28 | "install_command": "brew install mongodb-community", 29 | "verify_command": "mongod --version", 30 | "notes": "MongoDB is a NoSQL database for modern application development." 31 | }, 32 | { 33 | "name": "Redis", 34 | "install_command": "brew install redis", 35 | "verify_command": "redis-server --version", 36 | "notes": "Redis is an in-memory key-value store for caching and message brokering." 37 | }, 38 | { 39 | "name": "Docker", 40 | "install_command": "brew install --cask docker", 41 | "verify_command": "docker --version", 42 | "notes": "Docker is a platform for containerizing applications." 43 | }, 44 | { 45 | "name": "Kubernetes", 46 | "install_command": "brew install kubectl", 47 | "verify_command": "kubectl version --client", 48 | "notes": "Kubernetes is a container orchestration platform." 49 | }, 50 | { 51 | "name": "Git", 52 | "install_command": "brew install git", 53 | "verify_command": "git --version", 54 | "notes": "Git is a distributed version control system." 55 | }, 56 | { 57 | "name": "Golang", 58 | "install_command": "brew install go", 59 | "verify_command": "go version", 60 | "notes": "Golang (Go) is a statically typed programming language designed for backend development." 61 | }, 62 | { 63 | "name": "Visual Studio Code (VS Code)", 64 | "install_command": "brew install --cask visual-studio-code", 65 | "verify_command": "brew list --cask | grep visual-studio-code", 66 | "notes": "VS Code is a lightweight, highly customizable code editor." 67 | }, 68 | { 69 | "name": "Vim", 70 | "install_command": "brew install vim", 71 | "verify_command": "vim --version", 72 | "notes": "Vim is a highly configurable text editor for efficient coding." 73 | }, 74 | { 75 | "name": "k9s", 76 | "install_command": "brew install k9s", 77 | "verify_command": "k9s version", 78 | "notes": "k9s is a terminal UI for managing Kubernetes clusters." 79 | }, 80 | { 81 | "name": "GitHub CLI (gh)", 82 | "install_command": "brew install gh", 83 | "verify_command": "gh --version", 84 | "notes": "GitHub CLI provides a command-line interface for interacting with GitHub." 85 | }, 86 | { 87 | "name": "cURL", 88 | "install_command": "brew install curl", 89 | "verify_command": "curl --version", 90 | "notes": "cURL is a command-line tool for making HTTP requests." 91 | }, 92 | { 93 | "name": "Postman", 94 | "install_command": "brew install --cask postman", 95 | "verify_command": "brew list --cask | grep postman", 96 | "notes": "Postman is an API testing tool." 97 | }, 98 | { 99 | "name": "nginx", 100 | "install_command": "brew install nginx", 101 | "verify_command": "nginx -v", 102 | "notes": "nginx is a high-performance HTTP server and reverse proxy." 103 | }, 104 | { 105 | "name": "Elasticsearch", 106 | "install_command": "brew install elasticsearch", 107 | "verify_command": "elasticsearch --version", 108 | "notes": "Elasticsearch is a distributed search and analytics engine." 109 | }, 110 | { 111 | "name": "K6", 112 | "install_command": "brew install k6", 113 | "verify_command": "k6 version", 114 | "notes": "K6 is a performance testing tool for modern web apps." 115 | }, 116 | { 117 | "name": "Vegeta", 118 | "install_command": "brew install vegeta", 119 | "verify_command": "vegeta -version", 120 | "notes": "Vegeta is a load testing tool for HTTP services." 121 | }, 122 | { 123 | "name": "OpenSSL", 124 | "install_command": "brew install openssl", 125 | "verify_command": "openssl version", 126 | "notes": "OpenSSL is a toolkit for SSL and TLS protocols." 127 | }, 128 | { 129 | "name": "jq", 130 | "install_command": "brew install jq", 131 | "verify_command": "jq --version", 132 | "notes": "jq is a lightweight command-line JSON processor." 133 | }, 134 | { 135 | "name": "HTTPie", 136 | "install_command": "brew install httpie", 137 | "verify_command": "http --version", 138 | "notes": "HTTPie is a user-friendly HTTP client for the terminal." 139 | }, 140 | { 141 | "name": "asciinema", 142 | "install_command": "brew install asciinema", 143 | "verify_command": "asciinema --version", 144 | "notes": "asciinema records and shares terminal sessions." 145 | }, 146 | { 147 | "name": "Swagger CLI", 148 | "install_command": "npm install -g swagger-cli", 149 | "verify_command": "swagger-cli --version", 150 | "notes": "Swagger CLI is a tool for validating and bundling OpenAPI specifications." 151 | }, 152 | { 153 | "name": "Terraform", 154 | "install_command": "brew install terraform", 155 | "verify_command": "terraform --version", 156 | "notes": "Terraform is an Infrastructure as Code (IaC) tool." 157 | }, 158 | { 159 | "name": "yq", 160 | "install_command": "brew install yq", 161 | "verify_command": "yq --version", 162 | "notes": "yq is a lightweight and portable command-line YAML processor, similar to jq for JSON." 163 | } 164 | ] -------------------------------------------------------------------------------- /samples/devops.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Docker", 4 | "install_command": "brew install --cask docker", 5 | "verify_command": "docker --version", 6 | "notes": "Docker is a platform for containerizing applications." 7 | }, 8 | { 9 | "name": "Kubernetes (kubectl)", 10 | "install_command": "brew install kubectl", 11 | "verify_command": "kubectl version --client", 12 | "notes": "kubectl is the command-line tool for interacting with Kubernetes clusters." 13 | }, 14 | { 15 | "name": "Minikube", 16 | "install_command": "brew install minikube", 17 | "verify_command": "minikube version", 18 | "notes": "Minikube allows you to run a local Kubernetes cluster." 19 | }, 20 | { 21 | "name": "Helm", 22 | "install_command": "brew install helm", 23 | "verify_command": "helm version", 24 | "notes": "Helm is a package manager for Kubernetes." 25 | }, 26 | { 27 | "name": "Terraform", 28 | "install_command": "brew install terraform", 29 | "verify_command": "terraform --version", 30 | "notes": "Terraform is an Infrastructure as Code (IaC) tool." 31 | }, 32 | { 33 | "name": "Ansible", 34 | "install_command": "brew install ansible", 35 | "verify_command": "ansible --version", 36 | "notes": "Ansible is an open-source automation tool for configuration management and application deployment." 37 | }, 38 | { 39 | "name": "Jenkins", 40 | "install_command": "brew install jenkins-lts", 41 | "verify_command": "jenkins --version", 42 | "notes": "Jenkins is an automation server for building, testing, and deploying applications." 43 | }, 44 | { 45 | "name": "Git", 46 | "install_command": "brew install git", 47 | "verify_command": "git --version", 48 | "notes": "Git is a distributed version control system for source code management." 49 | }, 50 | { 51 | "name": "GitHub CLI (gh)", 52 | "install_command": "brew install gh", 53 | "verify_command": "gh --version", 54 | "notes": "GitHub CLI provides a command-line interface for interacting with GitHub." 55 | }, 56 | { 57 | "name": "AWS CLI", 58 | "install_command": "brew install awscli", 59 | "verify_command": "aws --version", 60 | "notes": "AWS CLI is a unified tool to manage AWS services from the command line." 61 | }, 62 | { 63 | "name": "Azure CLI", 64 | "install_command": "brew install azure-cli", 65 | "verify_command": "az --version", 66 | "notes": "Azure CLI is a command-line tool to manage Azure resources." 67 | }, 68 | { 69 | "name": "Google Cloud SDK", 70 | "install_command": "brew install --cask google-cloud-sdk", 71 | "verify_command": "gcloud --version", 72 | "notes": "Google Cloud SDK provides tools to interact with Google Cloud resources." 73 | }, 74 | { 75 | "name": "Prometheus", 76 | "install_command": "brew install prometheus", 77 | "verify_command": "prometheus --version", 78 | "notes": "Prometheus is a monitoring and alerting toolkit." 79 | }, 80 | { 81 | "name": "Grafana", 82 | "install_command": "brew install grafana", 83 | "verify_command": "grafana-server -v", 84 | "notes": "Grafana is a visualization tool for monitoring and observability." 85 | }, 86 | { 87 | "name": "ngrok", 88 | "install_command": "brew install ngrok", 89 | "verify_command": "ngrok --version", 90 | "notes": "ngrok exposes local servers to the internet for testing." 91 | }, 92 | { 93 | "name": "k9s", 94 | "install_command": "brew install k9s", 95 | "verify_command": "k9s version", 96 | "notes": "k9s is a terminal UI for managing Kubernetes clusters." 97 | }, 98 | { 99 | "name": "Vault", 100 | "install_command": "brew install vault", 101 | "verify_command": "vault --version", 102 | "notes": "Vault is a tool for securely managing secrets and access to sensitive data." 103 | }, 104 | { 105 | "name": "Consul", 106 | "install_command": "brew install consul", 107 | "verify_command": "consul --version", 108 | "notes": "Consul is a service mesh solution for connecting and securing applications." 109 | }, 110 | { 111 | "name": "Postman", 112 | "install_command": "brew install --cask postman", 113 | "verify_command": "brew list --cask | grep postman", 114 | "notes": "Postman is an API testing tool." 115 | }, 116 | { 117 | "name": "nvm", 118 | "install_command": "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash", 119 | "verify_command": "nvm --version", 120 | "notes": "nvm is a version manager for Node.js." 121 | }, 122 | { 123 | "name": "jq", 124 | "install_command": "brew install jq", 125 | "verify_command": "jq --version", 126 | "notes": "jq is a lightweight command-line JSON processor." 127 | }, 128 | { 129 | "name": "HTTPie", 130 | "install_command": "brew install httpie", 131 | "verify_command": "http --version", 132 | "notes": "HTTPie is a user-friendly HTTP client for the terminal." 133 | }, 134 | { 135 | "name": "asciinema", 136 | "install_command": "brew install asciinema", 137 | "verify_command": "asciinema --version", 138 | "notes": "asciinema records and shares terminal sessions." 139 | }, 140 | { 141 | "name": "Vegeta", 142 | "install_command": "brew install vegeta", 143 | "verify_command": "vegeta -version", 144 | "notes": "Vegeta is a load testing tool for HTTP services." 145 | }, 146 | { 147 | "name": "K6", 148 | "install_command": "brew install k6", 149 | "verify_command": "k6 version", 150 | "notes": "K6 is a performance testing tool for modern web apps." 151 | } 152 | ] -------------------------------------------------------------------------------- /samples/frontend-dev.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Node.js", 4 | "install_command": "brew install node", 5 | "verify_command": "node --version", 6 | "notes": "Node.js is required for running JavaScript on the backend and installing frontend dependencies." 7 | }, 8 | { 9 | "name": "npm", 10 | "install_command": "brew install npm", 11 | "verify_command": "npm --version", 12 | "notes": "npm is a package manager for Node.js." 13 | }, 14 | { 15 | "name": "yarn", 16 | "install_command": "brew install yarn", 17 | "verify_command": "yarn --version", 18 | "notes": "Yarn is an alternative package manager to npm." 19 | }, 20 | { 21 | "name": "Visual Studio Code (VS Code)", 22 | "install_command": "brew install --cask visual-studio-code", 23 | "verify_command": "brew list --cask | grep visual-studio-code", 24 | "notes": "VS Code is a lightweight, extensible code editor popular for frontend development." 25 | }, 26 | { 27 | "name": "Vue.js CLI", 28 | "install_command": "npm install -g @vue/cli", 29 | "verify_command": "vue --version", 30 | "notes": "Vue.js CLI is a standard tool for scaffolding and managing Vue.js projects." 31 | }, 32 | { 33 | "name": "React", 34 | "install_command": "npm install -g create-react-app", 35 | "verify_command": "npx create-react-app --version", 36 | "notes": "React is a popular library for building user interfaces." 37 | }, 38 | { 39 | "name": "Vite", 40 | "install_command": "npm install -g create-vite", 41 | "verify_command": "vite --version", 42 | "notes": "Vite is a fast build tool and development server for modern web projects, supporting frameworks like Vue and React." 43 | }, 44 | { 45 | "name": "Webpack", 46 | "install_command": "npm install -g webpack webpack-cli", 47 | "verify_command": "webpack --version", 48 | "notes": "Webpack is a module bundler for JavaScript and assets." 49 | }, 50 | { 51 | "name": "React Developer Tools", 52 | "install_command": "brew install --cask react-devtools", 53 | "verify_command": "brew list --cask | grep react-devtools", 54 | "notes": "React Developer Tools help debug React applications in the browser." 55 | }, 56 | { 57 | "name": "Chrome", 58 | "install_command": "brew install --cask google-chrome", 59 | "verify_command": "brew list --cask | grep google-chrome", 60 | "notes": "Google Chrome is a widely used browser with powerful developer tools." 61 | }, 62 | { 63 | "name": "Firefox Developer Edition", 64 | "install_command": "brew install --cask firefox-developer-edition", 65 | "verify_command": "brew list --cask | grep firefox-developer-edition", 66 | "notes": "Firefox Developer Edition is tailored for web developers." 67 | }, 68 | { 69 | "name": "Tailwind CSS CLI", 70 | "install_command": "npm install -g tailwindcss", 71 | "verify_command": "tailwindcss --version", 72 | "notes": "Tailwind CSS is a utility-first CSS framework for rapid UI development." 73 | }, 74 | { 75 | "name": "PostCSS CLI", 76 | "install_command": "npm install -g postcss-cli", 77 | "verify_command": "postcss --version", 78 | "notes": "PostCSS CLI processes styles with plugins for modern CSS." 79 | }, 80 | { 81 | "name": "TypeScript", 82 | "install_command": "npm install -g typescript", 83 | "verify_command": "tsc --version", 84 | "notes": "TypeScript is a superset of JavaScript that adds static typing." 85 | }, 86 | { 87 | "name": "ESLint", 88 | "install_command": "npm install -g eslint", 89 | "verify_command": "eslint --version", 90 | "notes": "ESLint helps identify and fix problems in JavaScript code." 91 | }, 92 | { 93 | "name": "Prettier", 94 | "install_command": "npm install -g prettier", 95 | "verify_command": "prettier --version", 96 | "notes": "Prettier is a code formatter that enforces a consistent style." 97 | }, 98 | { 99 | "name": "SASS", 100 | "install_command": "npm install -g sass", 101 | "verify_command": "sass --version", 102 | "notes": "SASS is a preprocessor scripting language that compiles into CSS." 103 | }, 104 | { 105 | "name": "Figma", 106 | "install_command": "brew install --cask figma", 107 | "verify_command": "brew list --cask | grep figma", 108 | "notes": "Figma is a cloud-based design tool used for UI/UX design." 109 | }, 110 | { 111 | "name": "Storybook", 112 | "install_command": "npx storybook init", 113 | "verify_command": "npx storybook --version", 114 | "notes": "Storybook is a tool for developing UI components in isolation." 115 | }, 116 | { 117 | "name": "Browsersync", 118 | "install_command": "npm install -g browser-sync", 119 | "verify_command": "browser-sync --version", 120 | "notes": "Browsersync is a tool for live reloading during development." 121 | }, 122 | { 123 | "name": "Git", 124 | "install_command": "brew install git", 125 | "verify_command": "git --version", 126 | "notes": "Git is a version control system essential for collaboration." 127 | }, 128 | { 129 | "name": "GitHub CLI (gh)", 130 | "install_command": "brew install gh", 131 | "verify_command": "gh --version", 132 | "notes": "GitHub CLI provides a command-line interface for GitHub workflows." 133 | }, 134 | { 135 | "name": "ngrok", 136 | "install_command": "brew install ngrok", 137 | "verify_command": "ngrok --version", 138 | "notes": "ngrok exposes local development servers to the internet." 139 | }, 140 | { 141 | "name": "asciinema", 142 | "install_command": "brew install asciinema", 143 | "verify_command": "asciinema --version", 144 | "notes": "asciinema records and shares terminal sessions." 145 | }, 146 | { 147 | "name": "npm-check-updates", 148 | "install_command": "npm install -g npm-check-updates", 149 | "verify_command": "ncu --version", 150 | "notes": "npm-check-updates upgrades project dependencies to the latest versions." 151 | }, 152 | { 153 | "name": "nvm", 154 | "install_command": "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash", 155 | "verify_command": "nvm --version", 156 | "notes": "nvm is a version manager for Node.js, allowing you to install and switch between multiple versions of Node.js." 157 | } 158 | ] -------------------------------------------------------------------------------- /samples/tech-writer.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Draw.io (Desktop)", 4 | "install_command": "brew install --cask drawio", 5 | "verify_command": "brew list --cask | grep drawio", 6 | "notes": "Draw.io is a diagramming tool for creating flowcharts, diagrams, and other visuals." 7 | }, 8 | { 9 | "name": "Lucidchart Desktop", 10 | "install_command": "brew install --cask lucidchart", 11 | "verify_command": "brew list --cask | grep lucidchart", 12 | "notes": "Lucidchart Desktop is a powerful diagramming tool for creating flowcharts, org charts, and more." 13 | }, 14 | { 15 | "name": "Pencil Project", 16 | "install_command": "brew install --cask pencil", 17 | "verify_command": "brew list --cask | grep pencil", 18 | "notes": "Pencil Project is an open-source tool for creating mockups and diagrams." 19 | }, 20 | { 21 | "name": "Microsoft Visio", 22 | "install_command": "brew install --cask visio", 23 | "verify_command": "brew list --cask | grep visio", 24 | "notes": "Microsoft Visio is a well-known tool for creating professional diagrams and flowcharts." 25 | }, 26 | { 27 | "name": "Inkscape", 28 | "install_command": "brew install --cask inkscape", 29 | "verify_command": "inkscape --version", 30 | "notes": "Inkscape is an open-source vector graphics editor, useful for creating diagrams and illustrations." 31 | }, 32 | { 33 | "name": "yEd Graph Editor", 34 | "install_command": "brew install --cask yed", 35 | "verify_command": "brew list --cask | grep yed", 36 | "notes": "yEd Graph Editor is a powerful desktop application for creating diagrams quickly and efficiently." 37 | }, 38 | { 39 | "name": "OmniGraffle", 40 | "install_command": "brew install --cask omnigraffle", 41 | "verify_command": "brew list --cask | grep omnigraffle", 42 | "notes": "OmniGraffle is a professional diagramming tool for macOS." 43 | }, 44 | { 45 | "name": "Graphviz", 46 | "install_command": "brew install graphviz", 47 | "verify_command": "dot -version", 48 | "notes": "Graphviz is an open-source tool for drawing graphs specified in DOT language scripts." 49 | }, 50 | { 51 | "name": "PlantUML", 52 | "install_command": "brew install plantuml", 53 | "verify_command": "plantuml -version", 54 | "notes": "PlantUML is a tool to generate UML diagrams from plain text descriptions." 55 | }, 56 | { 57 | "name": "Mermaid CLI", 58 | "install_command": "npm install -g @mermaid-js/mermaid-cli", 59 | "verify_command": "mmdc --version", 60 | "notes": "Mermaid CLI is used to create diagrams and visualizations from text using Mermaid syntax." 61 | } 62 | ] -------------------------------------------------------------------------------- /samples/tui.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "k9s", 4 | "install_command": "brew install k9s", 5 | "verify_command": "k9s version", 6 | "notes": "k9s is a terminal UI for managing Kubernetes clusters." 7 | }, 8 | { 9 | "name": "ktop", 10 | "install_command": "brew install ktop", 11 | "verify_command": "ktop --version", 12 | "notes": "ktop is a monitoring tool for Kubernetes nodes and pods." 13 | }, 14 | { 15 | "name": "kubectx", 16 | "install_command": "brew install kubectx", 17 | "verify_command": "kubectx --help", 18 | "notes": "kubectx is a utility for switching between Kubernetes contexts." 19 | }, 20 | { 21 | "name": "kdash", 22 | "install_command": "brew install kdash", 23 | "verify_command": "kdash --version", 24 | "notes": "kdash is a modern terminal dashboard for Kubernetes." 25 | }, 26 | { 27 | "name": "kubescape", 28 | "install_command": "brew install kubescape", 29 | "verify_command": "kubescape version", 30 | "notes": "kubescape is a Kubernetes security scanner." 31 | }, 32 | { 33 | "name": "ctop", 34 | "install_command": "brew install ctop", 35 | "verify_command": "ctop --version", 36 | "notes": "ctop is a top-like interface for container metrics." 37 | }, 38 | { 39 | "name": "lazydocker", 40 | "install_command": "brew install lazydocker", 41 | "verify_command": "lazydocker --version", 42 | "notes": "lazydocker is a simple terminal UI for Docker." 43 | }, 44 | { 45 | "name": "dive", 46 | "install_command": "brew install dive", 47 | "verify_command": "dive --version", 48 | "notes": "dive is a tool for exploring Docker image layers." 49 | }, 50 | { 51 | "name": "jq", 52 | "install_command": "brew install jq", 53 | "verify_command": "jq --version", 54 | "notes": "jq is a lightweight command-line JSON processor." 55 | }, 56 | { 57 | "name": "lazygit", 58 | "install_command": "brew install lazygit", 59 | "verify_command": "lazygit --version", 60 | "notes": "lazygit is a simple terminal UI for git commands." 61 | }, 62 | { 63 | "name": "gitui", 64 | "install_command": "brew install gitui", 65 | "verify_command": "gitui --version", 66 | "notes": "gitui is a blazing fast terminal UI for git." 67 | }, 68 | { 69 | "name": "atac", 70 | "install_command": "brew install atac", 71 | "verify_command": "atac --version", 72 | "notes": "atac is a tool for testing APIs with customizable templates." 73 | }, 74 | { 75 | "name": "vegeta", 76 | "install_command": "brew install vegeta", 77 | "verify_command": "vegeta -version", 78 | "notes": "vegeta is a load testing tool for HTTP services." 79 | }, 80 | { 81 | "name": "k6", 82 | "install_command": "brew install k6", 83 | "verify_command": "k6 version", 84 | "notes": "k6 is a performance testing tool for modern web apps." 85 | }, 86 | { 87 | "name": "httpie", 88 | "install_command": "brew install httpie", 89 | "verify_command": "http --version", 90 | "notes": "httpie is a user-friendly HTTP client for the terminal." 91 | }, 92 | { 93 | "name": "asciinema", 94 | "install_command": "brew install asciinema", 95 | "verify_command": "asciinema --version", 96 | "notes": "asciinema records and shares terminal sessions." 97 | }, 98 | { 99 | "name": "gping", 100 | "install_command": "brew install gping", 101 | "verify_command": "gping --version", 102 | "notes": "gping is a ping tool with a graphical display." 103 | } 104 | ] --------------------------------------------------------------------------------