As a Full Stack Developer, a terminal is essential for daily work. It provides a faster and more efficient way to execute various tasks, especially when dealing with servers and command-line tools. Sometimes it is much easier to use a terminal than a GUI. Some actions also need to perform in the terminal than the GUI provided by the app. While the default terminal on macOS is sufficient, it lacks some features and customization options that can improve my workflow.
Therefore, having a well-configured terminal setup is crucial for productivity and efficiency. In this blog post, I’ll take you through my terminal setup, highlighting the tools and configurations that make my workflow smoother and more enjoyable. Whether you’re a seasoned developer or just starting, you’re sure to pick up some tips and tricks to level up your terminal game. So, let’s dive in and see how you can make your terminal work even better for you!
The Terminal
For a long time, I used Iterm2 when coding using Macbook. I like it compared to the MacOS terminal. Iterm2 offers an extensive range of customization options, from color schemes to keyboard shortcuts. This flexibility allows me to tailor the terminal emulator to my specific needs and preferences, further enhancing my productivity. Recently, I tried using Warp and my first impression was, “Wow, this is intriguing!” One thing that caught my attention was how the output of the commands I entered appeared from the bottom and moved upwards. Not to mention, Warp has built-in features for history and autocomplete that are even better than those in Iterm2. What’s more, Warp boasts an AI assistant that can help me when I forget a certain command. I must say, using Warp has truly elevated my command-line experience.
In this blog post, I’ll be sharing with you how I set up my terminal, whether it’s using Iterm2 or Warp. Plus, I’ll be throwing in a few tricks on how to use them both simultaneously without any hiccups. So if you’re ready to take your command-line game to the next level, keep reading!
Iterm2
Firstly, let’s install Iterm2 using this command
brew install --cask iterm2
or you can simply visit the Iterm2 website at Iterm2. Once installed, open Iterm2 and let’s start tinkering with your terminal! However, for me, I didn’t need to make many changes to the default Iterm2 settings. There are numerous features that you can explore to make your terminal experience even better.
After installing Iterm2, I recommend going further and installing Oh My Zsh to enhance your terminal’s functionality. With Oh My Zsh, you can easily manage your plugins, themes, and shortcuts, making your terminal experience more personalized and efficient.
Oh My Zsh
Oh My Zsh is an open-source framework that enhances the functionality of the ZSH shell. It offers hundreds of plugins that can help streamline workflow and save time, making developers more efficient and productive. Oh, My Zsh also provides an easy way to manage shell configuration and customize themes, aliases, and environment variables. In summary, Oh My Zsh is a great tool that can take your terminal experience to the next level.
To install it go to Oh My Zsh website and run this command
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
It will create a .zshrc
file. After that, I will install Powerlevel10k. Powerlevel10k is a Zsh theme to customize my terminal. First I will install zsh-completions and zsh-syntax-highlighting using this command
brew install zsh-completions zsh-syntax-highlighting
After that run this command
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
to install Oh My Zsh. To configure Oh My Zsh theme, update your .zshrc
file to this ZSH_THEME="powerlevel10k/powerlevel10k”
. Run source ~/.zshrc
and run p10k configure
. It will ask you a couple of questions to customize your Oh My Zsh. Select the configuration according to your wishes. After that, edit .zshrc
file again and change this line plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
to enable all the plugins that have already been installed before. Run source ~/.zshrc
again to implement the changes immediately.
You can also enable Shell Integration to open more features. You can read about Iterm2 Shell Integration in here https://iterm2.com/documentation-shell-integration.html. To enable it, go to the Iterm2 menu, and click Install Shell Integration.
Side note, by default powerlevel10k, will truncate your local branch name if longer than 32 characters. To disable it and show the full local branch name, open ~/.p10k.zsh
go to line 400 and comment this line
In the end, my Iterm2 is just like this
You can reconfigure your powerlevel10k by running p10k configure
again.
Warp
For installing Warp, you can go to the Warp website Warp or run this command to install it.
brew install --cask warp
And you’re done! Yes, that’s simple. That’s why I like Warp. Warp already shipped with powerful suggestions and history features, so you don’t need any additional plugins. For you that already installed Iterm2 and don’t want to uninstall Iterm2, these are some additional steps you need to do and it’s already mentioned in Warp docs.
In your .zshrc file, edit this line to disable Iterm2 Shell Integration. Docs for this step are here https://docs.warp.dev/features/prompt#iterm2.
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
##### WHAT YOU WANT TO DISABLE FOR WARP - BELOW
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
##### WHAT YOU WANT TO DISABLE FOR WARP - ABOVE
fi
To disable powerlevel10k, edit this line in your .zshrc file. Docs for this step are here https://docs.warp.dev/features/prompt#disabling-unsupported-prompts-for-warp-e.g.-powerlevel10k-p10k.
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
fi
Conclusion
In conclusion, setting up your terminal as a full-stack developer is essential to enhance productivity, efficiency, and enjoyment of development. Customization and efficiency are key in choosing the right tools and configuring them to fit your workflow. You can try Iterm2, Warp, or any other terminal to find your best terminal configuration. I hope this post has given you some ideas for how to improve your terminal setup. So, start exploring and find the setup that works best for you!
Top comments (0)