Complete guide and Bash script to install Command Line Tools + Homebrew + iTerm2 + Fish Shell + Fisher + Plugins for development purposes
NOTE: This guide is based on tooling that is partly not available for Apple Silicon. I'm waiting for required changes from third-parties and then can check and update the guild along with the script itself. For now, it works only on Intel based Mac.
This guide is targeted for those, who wants to have a nice UI in the terminal with the rich features.
Please, raise your issue if something strange happened. I'd like to improve this script, so it could work without any errors during the installation.
Every time, I've re-installed my operating system, I spend around ~30 minutes to set up my terminal environment again. I bored of it, so I decided to make a list of all actions I doing, when setting it up, alongside with automatic script to do so, and share it with you all.
They are available here.
The script installs things related to terminal environment only:
bobthefish, which is based on popular
agnoster.
brew,
git,
./node_modules/.binand others...
Installs a lot of useful plugins for Fish Shell:
bassplugin that makes easy to use scripts written for Bash Shell in Fish Shell.
donethat notifies you when the process is finished. i.e. you can run
npm installcommand and switch back into your browser. When
npm installis done, you will get OSX notification.
fzyplugin adds a hotkey Ctrl+R that allows to show and search in your command history.
pjfunction allows to easily jump between your favorite directories. It installs with configured
~/Library/Projectsfolder, so you can jump to any of your projects by calling
pj.
uptofunction gets you to a parent folder. I.e. you're inside
a/b/c/d/e/, calling
upto bwill navigate you into
a/b.
You can achieve the same setup as mine, by manually setting up the environment (following the guide below) or automatically by executing the installer
install.sh.
Highly recommended to run the script below under Bash session in default Terminal.app. I can not guarantee proper installation outside of Terminal.app + Bash Shell.
bashManual Installation
Command Line Tools
You don't need to install the whole Xcode for it. By executing the command below, you will get only the command line tools without heavy IDE and dependencies it take:
xcode-select --installHomebrew
Homebrew is a software manager for MacOS. Its purpose is like the purpose of
apt-geton Debian-based systems oryumon Fedora. You can install command line tools from there or even full-featured applications.iTerm2
Install iTerm 2
or install it via Homebrew:
brew cask install iterm2
Get the iTerm color settings:
Just save it somewhere and open the file(s). The color settings will be imported into iTerm2. Apply them in iTerm through iTerm -> Preferences -> Profiles -> Colors -> Load Presets. You can create a different profile, other than Default if you wish to do so.
Open the downloaded font and press "Install Font".
Set this font in iTerm2 (iTerm -> Preferences -> Profiles -> Text).
Restart iTerm2 for all changes to take effect.
Download and install Fish Shell.
or using Homebrew:
brew install fish echo "/usr/local/bin/fish" | sudo tee -a /etc/shells chsh -s /usr/local/bin/fish
Fisher is a plugin manager for Fish Shell.
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish