- Table of Contents
- Upgrade Iterm2
- Install XCode
- Software Update
- Install Homebrew
- Homebrew Update Applications
- Update Bash
- Install Oh My Zsh
- Install Warp
- Install NerdFont
- Install Starship Prompt
- Install Snazzy Theme
- Install zsh Syntax Highlighting
- Install zsh Auto Suggestions
- Install Github CLI
- Install Autojump
- Install bat
- Install broot
- Install exa
- Install fzf
- Install httpie
- Install fig
- Install tmux
- Install jq
- Install WTF
- Install watch
- Install Graphviz
- Install pyenv
- Install SDKMan
- Install NVM
- Install Yarn
- Install GVM
- Install Terraform
- Install Helm
- Install AWS CLI
- Install AWS Shell
- Install Kafka
- Install Vault
- Install Packer
- Kubernetes Tools
- Tools
- VSCode
- VSCode Extensions
- Lens Extensions
Download and run latest Iterm2.
Move it to Applications folder.
xcode-select --install
Verify that XCode is successfully installed:
xcode-select -p
It should show:
/Library/Developer/CommandLineTools
Run Software Update Tool:
softwareupdate --all --install --force
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
If you get this error Failed to link all completions, docs and manpages: Permission denied
run:
sudo chown -R $USER:admin /usr/local/*
Run update:
brew update
Run below checkup:
brew doctor
It should show:
Your system is ready to brew.
brew update
brew outdated
brew upgrade
Install Bash 5.1:
brew install bash
Change default bash to latest:
sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
chsh -s /usr/local/bin/bash
Restart your terminal.
Check bash version:
bash --version
It should show:
GNU bash, version 5.1.12(1)-release (x86_64-apple-darwin20.6.0)
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
https://www.nerdfonts.com/font-downloads
e.g.
brew install --cask font-hack-nerd-font
Update iTerm to use the font:
Select Settings...Profiles...Text and select "Hack Nerd Font" from the Font drop-down and increase the Size to 16
.
Also consider checking the "Use ligatures" checkbox. A new terminal window must be opened for the changes to take effect.
Note:
If you notice that your profile changes are not getting saved in iTerm2 after re-boot, perform these steps:
- Quit iTerm2
- Move ~/Library/Preferences/com.googlecode.iterm2.plist to the Desktop
- Kill iTerm2 (because plist files are protected)
- Launch iTerm2 and quit it again to create a new plist file at ~/Library/Preferences/com.googlecode.iterm2.plist
- Open ~/Library/Preferences/com.googlecode.iterm2.plist in an editor
- Paste the contents of the plist file on the Desktop into the new one
- Kill and launch iTerm2 again
https://github.com/starship/starship
brew install starship
Add the following to the end of ~/.zshrc:
eval "$(starship init zsh)"
Activate zsh:
source ~/.zshrc
https://github.com/sindresorhus/iterm2-snazzy
To add Snazzy theme to iTerm2:
Right-click Snazzy.itermcolors and choose Save Link As…. Double-click the downloaded file.
Update iTerm to use the theme:
Select Settings...Profiles...Colors and select "Snazzy" in Color Presets.
https://github.com/zsh-users/zsh-syntax-highlighting
Simply clone this repository and source the script:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
Then, enable syntax highlighting in the current interactive shell:
source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
https://github.com/zsh-users/zsh-autosuggestions
- Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins)
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
- Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):
plugins=(
# other plugins...
zsh-autosuggestions
)
- Activate zsh
source ~/.zshrc
https://github.com/cli/cli
brew install gh
To authenticate with a GitHub instance, run:
gh auth login --hostname <hostname>
Set the GH_HOST environment variable in your ~/.zshrc:
export GH_HOST=<hostname>
- Clone the repo
git clone https://github.com/dlvhdr/gh-dash
- Install the extension locally
cd gh-dash/
gh extension install .
brew install wget
https://github.com/wting/autojump
brew install autojump
Add the following line to your ~/.zshrc file:
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
https://github.com/sharkdp/bat
brew install bat
https://github.com/Canop/broot
brew install broot
https://github.com/ogham/eza
brew install eza
https://github.com/junegunn/fzf
brew install fzf
To install key bindings and auto-completion:
$(brew --prefix)/opt/fzf/install
https://github.com/httpie/httpie
brew install httpie
https://github.com/withfig/autocomplete
brew install --cask fig
Note: You need to disable Secure Keyboard Entry
in iTerm so that Fig can process keyboard events and provide suggestions. If you are pasting any sensitive data and would like to disable fig then simply enable Secure Keyboard Entry
brew install tmux
brew install jq
brew tap wtfutil/wtfutil
brew install wtfutil
Create config file at ~/.config/wtf/config.yml
https://gist.github.com/HarshadRanganathan/e2795e2adf3fd6badc08faeeae2d609a
brew install watch
brew install viddy
brew install graphviz
brew install coreutils curl git
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
Add the following to ~/.zshrc:
. "$HOME/.asdf/asdf.sh"
# append completions to fpath
fpath=(${ASDF_DIR}/completions $fpath)
# initialise completions with ZSH's compinit
autoload -Uz compinit && compinit
https://github.com/pyenv/pyenv
brew install pyenv
echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
https://github.com/pyenv/pyenv/blob/master/COMMANDS.md
Install a python version:
pyenv install 3.12.3
Make python version global:
pyenv global 3.12.3
Check current active python version:
pyenv versions
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install gradle
sdk install groovy
List java versions:
sdk list java
Install java sdk:
sdk install java 21.0.3-amzn
sdk install maven
sdk install scala
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
nvm install --lts
export NVM_DIR="$HOME/.nvm"\n[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
brew install yarn
https://github.com/moovweb/gvm
Install GVM:
zsh < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
GVM requires pre-exisiting 'go' installation to be available, so we do this workaround:
brew install go
gvm install go1.17.3
gvm use go1.17.3
brew uninstall go
https://github.com/tfutils/tfenv
brew install tfenv
Install terraform version:
tfenv install 0.12.31
Make a version default:
tfenv use 0.12.31
asdf approach:
asdf plugin add terraform https://github.com/asdf-community/asdf-hashicorp
asdf install terraform 1.5.7
asdf global terraform 1.5.7
Set plugin cache dir:
export TF_PLUGIN_CACHE_DIR="$HOME/.terraform.d/plugin-cache"
For Mac arm64 provider support issues:
brew install kreuzwerker/taps/m1-terraform-provider-helper
m1-terraform-provider-helper activate
m1-terraform-provider-helper install hashicorp/template -v v2.2.0
brew install helm
- To specify which folder the AWS CLI is installed to, you must create an XML file. This file is an XML-formatted file that looks like the following example. Leave all values as shown, except you must replace the path /Users/myusername in line 9 with the path to the folder you want the AWS CLI installed to. The folder must already exist, or the command fails. This XML example specifies that the installer installs the AWS CLI in the folder /Users/myusername, where it creates a folder named aws-cli.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>choiceAttribute</key>
<string>customLocation</string>
<key>attributeSetting</key>
<string>/Users/myusername</string>
<key>choiceIdentifier</key>
<string>default</string>
</dict>
</array>
</plist>
- Download the pkg installer using the curl command. The -o option specifies the file name that the downloaded package is written to. In this example, the file is written to AWSCLIV2.pkg in the current folder.
$ curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
- Run the standard macOS installer program with the following options:
-
Specify the name of the package to install by using the -pkg parameter.
-
Specify installing to a current user only by setting the -target parameter to CurrentUserHomeDirectory.
-
Specify the path (relative to the current folder) and name of the XML file that you created in the -applyChoiceChangesXML parameter.
The following example installs the AWS CLI in the folder /Users/myusername/aws-cli.
$ installer -pkg AWSCLIV2.pkg \
-target CurrentUserHomeDirectory \
-applyChoiceChangesXML choices.xml
- Because standard user permissions typically don't allow writing to folders in your $PATH, the installer in this mode doesn't try to add the symlinks to the aws and aws_completer programs. For the AWS CLI to run correctly, you must manually create the symlinks after the installer finishes. If your $PATH includes a folder you can write to and you specify the folder as the target's path, you can run the following command without sudo. If you don't have a writable folder in your $PATH, you must use sudo for permissions to write to the specified target folder. The default location for a symlink is /usr/local/bin/.
$ sudo ln -s /Users/myusername/aws-cli/aws /usr/local/bin/aws
$ sudo ln -s /Users/myusername/aws-cli/aws_completer /usr/local/bin/aws_completer
After installation is complete, debug logs are written to /var/log/install.log.
- To verify that the shell can find and run the aws command in your $PATH, use the following commands.
$ which aws
/usr/local/bin/aws
$ aws --version
aws-cli/2.3.7 Python/3.8.8 Darwin/18.7.0 botocore/2.0.0
If the aws command cannot be found, you may need to restart your terminal.
- To enable command completion, add below lines to your
~/.zshrc
file:
autoload bashcompinit && bashcompinit
autoload -Uz compinit && compinit
complete -C '/usr/local/bin/aws_completer' aws
export AWS_CLI_AUTO_PROMPT=on-partial
-
Download the required kafka version e.g. https://kafka.apache.org/24/documentation.html#quickstart_download
-
Extract it
tar -xzf kafka_2.12-2.8.2.tgz
- Add the shell scripts to your path in
~/.zshrc
file:
export PATH="$PATH:$HOME/path/to/kafka_2.12-2.8.2/bin"
brew tap hashicorp/tap
brew install hashicorp/tap/vault
brew tap hashicorp/tap
brew install hashicorp/tap/packer
brew install kubectl
Run this command to download and install krew:
(
set -x; cd "$(mktemp -d)" &&
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
KREW="krew-${OS}_${ARCH}" &&
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&
tar zxvf "${KREW}.tar.gz" &&
./"${KREW}" install krew
)
Update your .zshrc file and append the following line:
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
https://github.com/derailed/k9s
brew install k9s
https://github.com/ahmetb/kubectx
Download the go binary from releases (0.9.0+): https://github.com/ahmetb/kubectx/releases
Extract the binary:
gzip -d kubectx_v0.9.4_darwin_x86_64.tar.gz
tar -xvf kubectx_v0.9.4_darwin_x86_64.tar
gzip -d kubectx_v0.9.5_darwin_arm64.tar.gz
tar -xvf kubectx_v0.9.5_darwin_arm64.tar
Copy the binary file to /usr/local/bin
:
cp kubectx /usr/local/bin/kubectx
curl -sS https://webi.sh/kubens | sh
https://github.com/jonmosco/kube-ps1
brew install kube-ps1
Add below lines to your ~/.zshrc
file:
source "/opt/homebrew/opt/kube-ps1/share/kube-ps1.sh"
PS1='$(kube_ps1)'$PS1
https://github.com/wercker/stern
brew install stern
https://github.com/txn2/kubefwd
brew install txn2/tap/kubefwd
https://github.com/ahmetb/kubectl-tree
kubectl krew install tree
https://github.com/itaysk/kubectl-neat
kubectl krew install neat
Add aliases and auto-completion for various kubernetes tools by adding below lines to your ~/.zshrc
file:
source <(kubectl completion zsh)
alias k=kubectl
alias kctx=kubectx
alias kns=kubens
complete -F __start_kubectl k
VSCode - https://code.visualstudio.com/
Jetbrains Toolbox - https://www.jetbrains.com/toolbox-app/
Postman - https://www.postman.com/
DBeaver - https://dbeaver.io/
Lens - https://k8slens.dev/
Note:If you have VSCode in Downloads, move it to the Applications folder
To add code
to command path:
Open the Command Palette via (⇧⌘P) and type shell command to find the Shell Command:
Install 'code' command in PATH** command.
Prettier - Code formatter
Docker
GitLens
Code Runner
Material Icon Theme
YAML
Go
Kubernetes
Terraform
Resource Map