• Stars
    star
    375
  • Rank 114,096 (Top 3 %)
  • Language
    Shell
  • License
    MIT License
  • Created almost 7 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Semi-automatic installer for Command Line Tools + Homebrew + iTerm2 + Fish Shell + Fisher + Plugins/Themes

Command Line Tools + Homebrew + iTerm2 + Fish Shell + Fisher + Plugins

Tired of using the built-in shell that has a bad developer experience? Do you want to have the awesomeness in your terminal with a cool autocomplete, 24-bit colors, customized prompt to display the info you need most? In such case, this guide is for you!

The Problem

I use my terminal environment a lot for different tasks. When you work with your terminal a lot, eventually, you end up with plugins you use, themes you installed, external dependencies you need and stuff like that.

Once you re-install the operating system, you need to go through configuration again - pain! The same happened to me, so I’ve decided that I can automate installation for my terminal environment.

Moreover, I shared it with you all in a handy Bash script that is easy to use.

Demo

Bash Installer is smart enough to detect the missing parts
Bash installer is smart enough to detect the missing parts
Fish Completions Customized Prompt
Fish Completions Customized Prompt
Native Notifications Node.js Version Manager
Native Notifications Node.js Version Manager
Colorized built-ins Colorized man pages
Colorized built-ins Colorized man pages
Jump between Projects up to directory
Jump between Projects up to directory

Features

  • Bash script that automates the whole configuration routine and easy to use, just copy paste.
  • The commands in script are idempotent, so that you can run the script as many times as you like.
  • Detects if your machine does not have something installed and installs it automatically.
  • Command Line Tools, Homebrew, iTerm2, Color Scheme, Nerd Fonts, Fish Shell, Fisher and Plugins included.
  • Theme bobthefish which is based on popular agnoster and configured to use nerd fonts.
  • Plugins included like bass to support Bash scripts in Fish, functions like pj to jump between projects, etc.

Automatic Installation

Just copy and paste the command into your terminal - simple. The installer detects what is absent from your machine and will install it. In case your machine already has a dependency, it will skip the installation for it.

bash <(curl --silent --location "https://github.com/ghaiklor/iterm-fish-fisher-osx/blob/master/install.sh?raw=true")

Manual Installation

In case you want to set up everything manually, this section is for you.

Command Line Tools

Command Line Tools are the tools that are required to use your Mac as a developer machine. This package contains tools like git, header files, etc... Although, you don’t need to install the whole XCode app for that. You can install only the required part by executing:

xcode-select --install

Homebrew

Homebrew is “The Missing Package Manager for macOS”. It provides the way to install the packages to your machine as with usual package managers on Linux, like yum or apt-get.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

NOTE: Depending on the MacBook you have, the path where Homebrew will be installed differs. For Intel based Mac it's /usr/local/bin/brew, while for ARM based Mac it's /opt/homebrew/bin/brew.

iTerm2

iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with macOS 10.14 or newer. iTerm2 brings the terminal into the modern age with features you never knew you always wanted.

This is one of the terminal emulators, that works great with color fidelity and patched fonts with ligatures. Also, it has a tmux support and a lot of other stuff. Check out their website for more details.

brew install --cask iterm2

iTerm 2 Color Scheme

Install the color scheme for iTerm2 that uses Material Design Color Palette. Download the file material-design-colors.itermcolors and open it to import into iTerm2. Afterwards, apply the color palette in Preferences -> Profiles -> Default -> Colors.

iTerm 2 Nerd Fonts

There is a project called Nerd Fonts. Nerd Fonts is a project that patches developer targeted fonts with a high number of glyphs (icons). Specifically, to add a high number of extra glyphs from popular ‘iconic fonts’ such as Font Awesome, Devicons, Octicons, and others.

We use one of their fonts to render the theme that uses ligatures from there. So you need to download the font, install it in the Font Book and apply in your terminal emulator [iTerm2].

When you download the font, you can open it by double clicking. It will open the Font Book and install the font. Afterwards, go to iTerm2 -> Preferences -> Profiles -> Default -> Text and set the font FiraCode Nerd Font.

Set the same font for "Non-ASCII text" and do not forget to check the “Use ligatures“ checkbox.

Fish Shell

Fish Shell is a smart and user-friendly command line shell for Linux, macOS, and the rest of the family.

First, install the shell using homebrew:

brew install fish

Now, we can’t change the default shell without adding it to the list of known shells:

command -v fish | sudo tee -a /etc/shells

Change the default shell to Fish Shell:

chsh -s "$(command -v fish)"

Fisher

Restart your terminal emulator and make sure that you are under Fish Shell now.

In case you own an ARM based Mac, you will have a Homebrew installed in /opt/homebrew/bin/brew. The problem is that this path is not added by default, so you need to add it yourself.

fish_add_path /opt/homebrew/bin/

Afterwards, you can install Fisher. Fisher is a plugin manager for Fish. It helps manage functions, completions, bindings, and snippets from the command line.

curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher

Plugins

Small things left. Just install the plugins using Fisher. Here is the list of plugins:

When you finished installing the plugins, you need to configure some of them. You need to enable the Nerd Fonts support for the theme, change the color palette and set the path where your projects located.

set --universal --export theme_nerd_fonts yes
set --universal --export theme_color_scheme zenburn
set --universal --export PROJECT_PATHS ~/Library/Projects

Afterwards, update the completions for Fish Shell to get an amazing auto-complete in your shell:

fish_update_completions

License

MIT

More Repositories

1

type-challenges-solutions

Solutions for the collection of TypeScript type challenges with explanations
HTML
470
star
2

generator-sails-rest-api

Yeoman generator for scaffolding Sails REST API with predefined features
JavaScript
334
star
3

llvm-kaleidoscope

LLVM Tutorial: Kaleidoscope (Implementing a Language with LLVM)
C++
233
star
4

kittik

Create slides in TypeScript and present them in the terminal using ASCII only!
TypeScript
179
star
5

terminal-canvas

Manipulate the cursor in your terminal via high-performant, low-level, canvas-like API
TypeScript
171
star
6

awesome-internals

A curated list of awesome resources and learning materials in the field of X internals
128
star
7

telegram-bot-github

Allows to you receive GitHub notifications right in the Telegram
JavaScript
119
star
8

ghaiklor-os-gcc

Simple operating system with its own bootloader, drivers for screen and keyboard, libc (for educational purposes)
C
117
star
9

backup-my-github

Clones all your repositories to local machine
Shell
107
star
10

sails-hook-cron

Sails hook for running cron tasks
JavaScript
89
star
11

nand-2-tetris

Computer built from the ground up on top of own CPU, while compiler and assembler for it implemented in Rust language
Assembly
74
star
12

icecast-parser

Node.js module for getting and parsing metadata from SHOUTcast/Icecast radio streams
TypeScript
70
star
13

pascal-interpreter

A simple interpreter for a large subset of Pascal language written for educational purposes
JavaScript
34
star
14

sails-service-mailer

Service for Sails framework with Mailer features [DEAD]
JavaScript
31
star
15

generator-es6-npm-module

Yeoman generator for starting ES6 npm module with Mocha, Istanbul, Travis, Coveralls
JavaScript
28
star
16

flappy-bird

Flappy Bird, a game you can barely play for more than a few seconds without throwing your phone
JavaScript
23
star
17

passport-google-plus-token

Passport strategy for authenticating with Google Plus via OAuth2 access tokens
JavaScript
23
star
18

node-print-message

Node.js module for printing out beautiful messages in console
JavaScript
21
star
19

sails-service-pusher

Service for Sails framework with Pusher features [DEAD]
JavaScript
20
star
20

advent-of-code-2015

Solutions for Advent of Code - a series of small programming puzzles for a variety of skill levels
JavaScript
19
star
21

assetsjsloader

Async loader which loads CSS and JS files
JavaScript
15
star
22

iterum

Interpreter for a subset of ECMA specification implemented on top of recursive descent parser
TypeScript
15
star
23

sails-service-payment

Service for Sails framework with Payment features [DEAD]
JavaScript
15
star
24

sails-service-sms

Service for Sails framework with SMS features [DEAD]
JavaScript
12
star
25

passport-instagram-token

Passport strategy for authenticating with Instagram via OAuth2 access tokens
JavaScript
12
star
26

sails-service-image

Service for Sails framework with Image features [DEAD]
JavaScript
10
star
27

sails-service-storage

Service for Sails framework with Storage features [DEAD]
JavaScript
10
star
28

passport-github-token

Passport strategy for authenticating with GitHub via OAuth2 access tokens
JavaScript
10
star
29

battlecity

The most popular game clone from our childhood
JavaScript
10
star
30

codemirror-mode-jsonata

CodeMirror mode for the JSONata language
JavaScript
8
star
31

sails-service-social

Service for Sails framework with Social features [DEAD]
JavaScript
8
star
32

tiny-three-pass-compiler-codewars

Three-pass compiler for a simple programming language into a small assembly language
JavaScript
7
star
33

polycolors

Yet another command-line coloring library with RGB support
JavaScript
5
star
34

sails-service-cipher

Service for Sails framework with Cipher features [DEAD]
JavaScript
5
star
35

bash-im-terminal

Terminal client for viewing Bash.IM
JavaScript
5
star
36

sails-service-location

Service for Sails framework with Location features [DEAD]
JavaScript
4
star
37

openlayers-tools

OpenLayers wrapper, which simplifies work with it
JavaScript
4
star
38

sails-service-hash

Service for Sails framework with Hash features [DEAD]
JavaScript
4
star
39

arves

Another RISC-V Educational Softcore
VHDL
4
star
40

passport-soundcloud-token

Passport strategy for authenticating with SoundCloud via OAuth2 access tokens
JavaScript
3
star
41

passport-reddit-token

Passport strategy for authenticating with Reddit via OAuth2 access tokens
JavaScript
3
star
42

sails-hook-acl

Sails hook that implements ACL that don't tight with session or databases and easy configurable [DEAD]
JavaScript
3
star
43

passport-vkontakte-token

Passport strategy for authenticating with Vkontakte via OAuth2 access tokens
JavaScript
2
star
44

passport-yahoo-token

Passport strategy for authenticating with Yahoo via OAuth2 access tokens
JavaScript
2
star
45

cloudflare-multiplex-sw-2016

Technical task for CloudFlare company (Aug 2016)
JavaScript
2
star
46

passport-twitch-token

Passport strategy for authenticating with Twitch via OAuth2 access tokens
JavaScript
2
star
47

passport-yandex-token

Passport strategy for authenticating with Yandex via OAuth2 access tokens
JavaScript
1
star
48

tessel-vesnasoft-2015

Tessel application for demonstrating accel, ambient, camera, climate, servo and leds
JavaScript
1
star
49

ghaiklor-os-rust

Simple operation system created in educational purposes with Rust.
Rust
1
star
50

atmega-2560-hexapod

Arduino sketch for DAGU Spider controller
C++
1
star
51

flood-it

Flood It! is a simple addictive strategy game in which you have to flood the whole game board with one color
JavaScript
1
star
52

passport-windows-live-token

Passport strategy for authenticating with Windows Live via OAuth2 access tokens
JavaScript
1
star
53

dimension-shock-poc

A re-imagining of the chess game, where game involves playing in two distinct dimensions simultaneously
JavaScript
1
star
54

passport-amazon-token

Passport strategy for authenticating with Amazon via OAuth2 access tokens
JavaScript
1
star