The purpose of this repository is to describe an installation of a new macOS environment with all the needed "goodies" for a kick ass environment.
These settings were tested on:
- macOS Big Sur
- Version 11.6
- Install XCode from the app store.
- Install the command line tools from XCode installations (This will install git for example..).
- Create the
Developmentsdirectory:
cd ~
mkdir ./Developments
cd ./Developments- Clone the repository:
git clone https://github.com/kazazor/env-setup- Go to this link and install the package manager for macOS.
- Now lets update homebrew with all the newest formulas:
brew update
brew doctorRun
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"In the second row, replace %c with %~ in this file:
sudo vi ~/.oh-my-zsh/themes/robbyrussell.zsh-themeThen add these lines to the bottom of your ~/.zshrc file.
# Git
source ~/Developments/env-setup/git/aliasCreate a symlink to the .gitconfig file:
ln -s ~/Developments/env-setup/git/.gitconfig ~/.gitconfigLoad the aliases in the open terminal (for new terminals it will be set already):
source ~/.zshrcClone the Git repositories.
git clone https://github.com/zsh-users/zsh-docker.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-docker
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlightingRun the command open ~/.oh-my-zshand navigate to .oh-my-zsh > custom > plugins directory to view the cloned directory.
Then, add the plugin to the plugin section of the ~/.zshrc config file:
plugins=(git docker zsh-syntax-highlighting zsh-autosuggestions)- Change your global git configuration:
git config --global user.name "<my full name>"
git config --global user.email "<my email>"
git config --global core.editor "code --wait"- Update the
push.defaultbehavior on your machine:
git config --global push.default nothing(What does this configuration do? Basically it forces you to specify on which branch you would like to push the code, so you won't accidentally push the code to master or any other branch. This settings is being done in order to avoid mistakes for those of us working with git from the command line. It will not effect SourceTree or alike tools.. For more info go here).
Install nvm using the instructions here.
Then, install the node version you would like to have using:
nvm install <version>In order to use the new version instead of your system version you could run nvm list to see all the versions you've installed, and then use the specific version:
nvm use <version>In order to activate NVM for all the terminal windows you'll open in the future you'll need to add to the ~/.zshrc file the following section:
# NVM
# Start nvm in the new session
export NVM_DIR="/Users/orkazaz/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
# Showing what version of node is being used
export NVM_NODE_CURRENT=$(nvm current);
echo "#################################"
echo "Using Node version: $NVM_NODE_CURRENT";
echo "#################################"In order to load it for all the existing terminals, you'll need to run this command:
source ~/.zshrcInstall yarn
npm install --global yarnAdd this to your ~/.zshrc file
# Yarn
export PATH=~/.yarn/bin:$PATHInstall VSCode
- Docker
- Mocha Test Explorer
- ESLint
- Prettier - Code formatter
- vscode-icons
- VSCode commander - to make VS Code the default git editor: Run command + shift + P then write "Shell" and choose "Install 'code' command in PATH"
- Git Lens - Get hisotry while viewing the file
- Solidity - Solidity support and highlighting
- Markdown Preview Enhanced
Install Docker for Mac.
Install kubectl. Easiest way would be using brew.
Then install Minikube for local development using Kubernetes.
Part of the Minikube installation requirements is VirtualBox. You can install it via brew like this:
brew cask install virtualboxYou'll probably get an error that you need to approve the installation to run. Just follow the instructions (when you add --force --verbose --debug to see the problem):
To install and/or use virtualbox you may need to enable their kernel extension in
System Preferences → Security & Privacy → General
For more information refer to vendor documentation or the Apple Technical Note:
https://developer.apple.com/library/content/technotes/tn2459/_index.html
- FlyCut
When opening a new terminal window (after performing this step), you might get this error:
N/A version x.x.x is not installed yetWhy is this hapening?
You might have an alias for a node version you uninstalled / doesn't exists. Like described in thie github issue.
In order to fix that, just change the alias to point to a new node version you do have install. For example:
nvm alias default 4.4.4