Mac! I absolutely love MacOS for development. It gives me the power of Unix with a whole lot of convenience. Can it be replaced with Unix? YES! Do I want to? No. As a full stack developer and CTO of my company, I spend 80% of my day in three apps:
- Shell/Terminal
- IDE
- Browser
These three are the same no matter which OS I use. I see MacOS simply as a shell for my Unix environment. On a fresh install, I'll setup iTerm, oh-my-zsh, and install my most used packages from brew. I prefer brew over DMG or other package installations.
Listed below are top 10 packages that I use with zsh and iTerm. Not all are brew based though. Allons-y mon ami!
awless
awless is a powerful, innovative and small surface command line interface (CLI) to manage Amazon Web Services.
awless is my go to tool to avoid using the clunky AWS console. Although awless does not cover all services, the most important ones are covered i.e. EC2 and RDS. I can start/stop my instances, check on health, etc across regions.
z - jump around
z tracks your most used directories, based on 'frecency'.
After a short learning phase, z will take you to the most 'frecent' directory that matches ALL of the regexes given on the command line, in order.
Working on several projects; front-end and backend requires moving around directories very rapidly. We base our project names on MCU characters which works very well for z.
z will take some time before it becomes really good at understanding where you want to jump. Once it does, though it saves a ton of time as you use shorter target names.
E.g. I'd start by using
z bifrost
But now it's down to
z bi
aria2
aria2 is a lightweight multi-protocol & multi-source command-line download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink. aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.
Downloading large files such as backups or log files is a regular occurence. I prefer to use multiple segments and resume capability. Suprisingly, browsers can only resume and in some cases that does not work as intended. I use aria2 for all large files and have a zsh alias to allow for multiple segments.
alias a2c='aria2c --max-connection-per-server=4 --min-split-size=1M --file-allocation=none '
bat
bat is a cat
clone that supports syntax highlighting for a large number of programming and markup languages. It is also pretty smart when it comes to showing binary files. Supports line numbering, pagination, etc. All of this is quite helpful while browsing through files.
I have cat
aliased to bat
and cat
aliased to ccat
for the times when I just need to echo and pbcopy
it.
ripgrep/rg/ack
ripgrep is a line-oriented search tool that recursively searches your current directory for a regex pattern. By default, ripgrep will respect your .gitignore and automatically skip hidden files/directories and binary files. ripgrep has first class support on Windows, macOS and Linux, with binary downloads available for every release. ripgrep is similar to other popular search tools like The Silver Searcher, ack and grep.
I moved from standard grep to rg mostly for code search but it has now taken over all of my search use cases.
gr (mixu/gr)
gr is a multiple git repository management tool. Managing all the repos in one command is a time saving tool. Check status of all repos? One command. Update all repos? One command. It hasn't been updated in a while but it still works as intended.
With support for auto repo detection, tags and many other features, it is an indispensable tool in my shell kit.
httpie
HTTPie (aitch-tee-tee-pie) is a user-friendly command-line HTTP client for the API era. It comes with JSON support, syntax highlighting, persistent sessions, wget-like downloads, plugins, and more.
I use Postman only for complicated use cases. My go to tool for regular HTTP API calls is the command line httpie. Works amazingly well and does not have the GUI clunkiness of Postman.
parallel
GNU parallel is a command line tool for running jobs in parallel. It allows you to do a ton of stuff when working with multiple files. It goes beyond mere execution. The docs can be difficult to work with initially but once you get the hang of it, it becomes essential.
One of my use case, is to redeploy containers across multiple aws clusters. I could use a for loop to do it but parallel makes it much easier. Example:
parallel aws --region us-east-1 ecs update-service --service apps-svc-prod --force-new-deployment --cluster {} ::: prod-a prod-b prod-c
The above command will run the same command with 3 different arguments in parallel. You get the power of replacement with parallelism.
mtr
mtr is a powerful tool that enables administrators to diagnose and isolate networking errors and provide reports of network status to upstream providers. MTR represents an evolution of the traceroute command by providing a greater data sample as if augmenting traceroute with ping output.
exa
exa is a modern replacement for the venerable file-listing command-line program ls that ships with Unix and Linux operating systems, giving it more features and better defaults. It uses colours to distinguish file types and metadata. It knows about symlinks, extended attributes, and Git. And it’s small, fast, and just one single binary.
I've configured exa as a replacement with many options as aliases.
l='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store"'
la='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store" --extended --tree --level=1'
lac='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store" --sort=accessed --time=accessed'
lar='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store" --extended --tree --level=2'
lara='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store" --extended --tree'
larr='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store" --extended --tree --level=3'
larrr='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store" --extended --tree --level=4'
larrrr='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store" --extended --tree --level=5'
lb='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store" --sort=size'
lch='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store" --sort=changed --time=changed'
lcr='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store" --sort=created --time=created'
ll='exa -lhgF'
lm='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store" --sort=modified --time=modified'
lr='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store|node_modules" --git-ignore --tree --level=2'
lra='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store|node_modules" --git-ignore --tree'
lrr='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store|node_modules" --git-ignore --tree --level=3'
lrrr='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store|node_modules" --git-ignore --tree --level=4'
lrrrr='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store|node_modules" --git-ignore --tree --level=5'
lt='exa --long --all --header --classify --group --color-scale --ignore-glob=".git|.DS_Store" --modified --changed --created --accessed'
Hope you guys liked the post!
Top comments (0)