zsh installed on macOS by default. You still need to install oh-my-zsh for themes and plugins.
# shells installed
grep '^[^#]' /etc/shells
# shell selected
echo $SHELL
# set new shell
chsh -s $(which zsh)
# important zsh installed on macOS by default NOT oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# list themes and plugins
ls -a .oh-my-zsh/themes
ls -a .oh-my-zsh/plugins
# install homebrew before git steps
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)
# install xCode command line tools
----
# check if my apple chip is intel or arm
uname -m
# search history
alias hg="history | grep -i"
# print IP address macOS
alias ip="ipconfig getifaddr en0"
# Python
alias python=python3
alias pip=pip3
# terraform
alias taa="terraform apply --auto-approve"
alias tp="terraform plan"
alias tv="terraform validate"
alias tf="terraform fmt -recursive"
# docker-compose
alias dcb="docker-compose build"
alias dcu="docker-compose up -d && docker-compose logs -f -t"
alias dcd="docker-compose down"
# git
gitpush() {
git add .
git commit -m "$*"
git push
}
alias gp=gitpush
alias gcm="git checkout master && git pull"
alias gcb="git checkout -b "# install essential custom plugins
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git $ZSH_CUSTOM/plugins/zsh-autocomplete
# update .zshrc file
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
zsh-autocomplete
)
# load changes
source ~/.zshrc# install
brew install python
# package manager
brew install pipx
# macOS can have multiple Python versions installed
which -a python
# ensure pip installed available in terminal
pipx ensurepath
# ensure shell reflects latest settings
source ~/.zshrc# install
brew install gh
# upgrade
brew upgrade gh
# verify GitHub status
gh auth status
gh --version
# make direct Pull Requests
git config --global --add --bool push.autoSetupRemote true
# set name and email - used for commits - by directory
vi ~/.gitconfig
# Global defaults (used if no includeIf matches)
[user]
name = Default Name
email = default@example.com
[core]
editor = vim
autocrlf = input
# -------------------------
# Work repositories
# -------------------------
[includeIf "gitdir:~/work/"]
path = ~/.gitconfig-work
# -------------------------
# Personal repositories
# -------------------------
[includeIf "gitdir:~/personal/"]
path = ~/.gitconfig-personal
cat ~/.gitconfig-personal
[user]
name = foo
email = foo@users.noreply.github.comIf two-factor authentication is enabled on Github account you cannot push via HTTPS using account password.
The github cli handles authentication to GitHub. It auto stores a fine-grained Personal Access Token in macOS KeyChain.
#install
brew install go
go version
# lint
brew install golangci-lint
# unit tests
brew install gotestsum
# zsh file update to pickup golang binaries
export PATH="$PATH:$(go env GOPATH)/bin"brew update
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
# upgrade
brew upgrade hashicorp/tap/terraform
terraform --versionbrew install circleci
circleci version# node installs a bunch of tools like npm, vercel
brew install node# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
aws --version
aws-cli/2.17.31 Python/3.11.9 Darwin/23.4.0 exe/x86_64
which aws
/usr/local/bin/aws
# get ready for aws credentials
brew install aws-sso-cli
# set up - you need to find the XXXXX.awsapps.com value to complete this step
aws-sso completions -I
# web login to aws and it will prompt you to download credentials profiles from aws
aws-sso config-profiles
# aws cli command and link to profile
AWS_PROFILE=12345678:RBACfoobar aws sts get-caller-identity# install tool ( pip3 is aliased to pip )
pip install -U objection
# verify install
python3 -m pip show objection
objection version
# objection: 1.12.2
# applesign used underneath Objection
npm install -g applesign