# Which command line tools do you use?

**URL:** <https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800>\
**Category:** General Dev Chat\
**Tags:** terminal, command-line\
**Created:** [15 February 2022 21:21 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800 "2022-02-15T21:21:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.devtalk.com/user_avatar/forum.devtalk.com/astonj/32/7_2.png) [@AstonJ](https://forum.devtalk.com/u/AstonJ)\
**Post date:** [15 February 2022 21:21 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/1 "2022-02-15T21:21:39Z")

</div>

I’ve been watching Prag Dave’s Elixir course and I noticed he uses [tree](https://linux.die.net/man/1/tree):

> Tree is a recursive directory listing program that produces a depth indented listing of files. Color is supported ala _dircolors_ if the **LS\_COLORS** environment variable is set, output is to a tty, and the **-C** flag is used. With no arguments, _tree_ lists the files in the current directory. When directory arguments are given, _tree_ lists all the files and/or directories found in the given directories each in turn. Upon completion of listing all files/directories found, _tree_ returns the total number of files and/or directories listed.

On Mac install with: `brew install tree`

EG:

```plaintext
$tree
.
├── README.md
├── lib
│ └── hangman.ex
├── mix.exs
└── mix.lock

```

You can use the options to ignore directories or files.

Any other cool command line tools you know of or use?

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.devtalk.com/user_avatar/forum.devtalk.com/dimitarvp/32/5599_2.png) [@dimitarvp](https://forum.devtalk.com/u/dimitarvp)\
**Post date:** [15 February 2022 22:33 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/3 "2022-02-15T22:33:59Z")

</div>

In short, a heck ton of them. I can write a series of articles about which tools I use. I made it a credo to gather as much as possible CLI and TUI tools and become master at them. The latter part still eludes me – not enough time and energy still – but I have become quite the small encyclopaedia of CLI/TUI tools.

Waiting for Aston’s “you should write a blog about it Dimi!”. :003:

---

<div class="post-metadata">

**Author:** ![Maartz](https://forum.devtalk.com/user_avatar/forum.devtalk.com/maartz/32/240_2.png) [@Maartz](https://forum.devtalk.com/u/Maartz)\
**Post date:** [16 February 2022 10:12 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/4 "2022-02-16T10:12:26Z")

</div>

You should definitely write about them!

I’m a hundred percent sure it will be a huge wealth of wisdom.

---

<div class="post-metadata">

**Author:** ![Maartz](https://forum.devtalk.com/user_avatar/forum.devtalk.com/maartz/32/240_2.png) [@Maartz](https://forum.devtalk.com/u/Maartz)\
**Post date:** [16 February 2022 10:17 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/5 "2022-02-16T10:17:44Z")

</div>

I like a tool called `tl;dr`.  
It gives you basic knowledge of many commands.  
On macOS it’s a good’ol `brew install tldr`  
They also have a nodejs client, so it can be installed with npm.

EG:

```auto
❯ tldr grep

grep

Find patterns in files using regular expressions.
More information: <https://www.gnu.org/software/grep/manual/grep.html>.

- Search for a pattern within a file:
    grep "search_pattern" path/to/file

- Search for an exact string (disables regular expressions):
    grep --fixed-strings "exact_string" path/to/file

- Search for a pattern in all files recursively in a directory, showing line numbers of matches, ignoring binary files:
    grep --recursive --line-number --binary-files=without-match "search_pattern" path/to/directory

- Use extended regular expressions (supports `?`, `+`, `{}`, `()` and `|`), in case-insensitive mode:
    grep --extended-regexp --ignore-case "search_pattern" path/to/file

- Print 3 lines of context around, before, or after each match:
    grep --context|before-context|after-context=3 "search_pattern" path/to/file

- Print file name and line number for each match:
    grep --with-filename --line-number "search_pattern" path/to/file

- Search for lines matching a pattern, printing only the matched text:
    grep --only-matching "search_pattern" path/to/file

- Search stdin for lines that do not match a pattern:
    cat path/to/file | grep --invert-match "search_pattern"

```

If a command does not exist, you can add it with a PR on their repo.  
It’s a community-based FOSS tool.

Saves me a ton of time in googling and reading man pages.

---

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.devtalk.com/user_avatar/forum.devtalk.com/astonj/32/7_2.png) [@AstonJ](https://forum.devtalk.com/u/AstonJ)\
**Post date:** [16 February 2022 12:56 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/6 "2022-02-16T12:56:23Z")

</div>

> [@Maartz](#):
>
> You should definitely write about them!
> 
> I’m a hundred percent sure it will be a huge wealth of wisdom.

What he said!! ^^

Tldr looks great too - installed! :023:

---

<div class="post-metadata">

**Author:** ![jaeyson](https://forum.devtalk.com/user_avatar/forum.devtalk.com/jaeyson/32/6395_2.png) [@jaeyson](https://forum.devtalk.com/u/jaeyson)\
**Post date:** [17 February 2022 03:43 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/7 "2022-02-17T03:43:13Z")

</div>

> [@dimitarvp](#):
>
> I can write a series of articles about which tools I use.

> [@dimitarvp](#):
>
> but I have become quite the small encyclopaedia of CLI/TUI tools.

I’m definitely one on the **waiting list** , bookmarked! 💪

---

<div class="post-metadata">

**Author:** ![OvermindDL1](https://forum.devtalk.com/user_avatar/forum.devtalk.com/overminddl1/32/52_2.png) [@OvermindDL1](https://forum.devtalk.com/u/OvermindDL1)\
**Post date:** [17 February 2022 15:40 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/8 "2022-02-17T15:40:17Z")

</div>

Yeah, the amount of CLI/TUI tools are… immense and numerous, lol…

Let’s see, of non-posix-standard ones the two I use most often are `rg` (ripgrep) and `jq` (json query)` if someone wants a place to start.

---

<div class="post-metadata">

**Author:** ![Hallski](https://forum.devtalk.com/user_avatar/forum.devtalk.com/hallski/32/610_2.png) [@Hallski](https://forum.devtalk.com/u/Hallski)\
**Post date:** [17 February 2022 20:07 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/9 "2022-02-17T20:07:07Z")

</div>

Another one for `tree`, `rg` and `jq`.

Some others:

- `fzf` Fuzzy finder - [GitHub - junegunn/fzf: A command-line fuzzy finder](https://github.com/junegunn/fzf)
- `gh` Github CLI tool - [https://cli.github.com](https://cli.github.com)
- `tig` Text-mode Git interface - [Introduction · Tig - Text-mode interface for Git](https://jonas.github.io/tig/) (don’t use it much after moving back to Emacs though)
- `bat` nicer `cat` - [GitHub - sharkdp/bat: A cat(1) clone with wings.](https://github.com/sharkdp/bat)
- `batman` use `bat` for man pages - [bat-extras/batman.md at master · eth-p/bat-extras · GitHub](https://github.com/eth-p/bat-extras/blob/master/doc/batman.md)

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.devtalk.com/user_avatar/forum.devtalk.com/dimitarvp/32/5599_2.png) [@dimitarvp](https://forum.devtalk.com/u/dimitarvp)\
**Post date:** [17 February 2022 23:15 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/10 "2022-02-17T23:15:30Z")

</div>

- `bat`: I can completely vouch for it, it made my surfing in projects much much better. Had to open everything in Emacs before discovering it. And I am not quite at learning `nvim` just yet. Oh, and bonus for opening files in read-only mode (it’s a viewer after all). Spared me from accidentally edit things I shouldn’t.

- `fzf` also changed my life. Hop in a directory, type `bat `, press Ctrl-T, pick what file to open by fuzzy-finding its name, press Enter twice, done. It’s going much further than that but that’s a matter for a bigger topic.

- `fd`: a file finder, a much faster `find`. Automatically ignores most things that should be ignored in dev projects; if that’s not desired and you want to look through all files you just pass `fd -HI` and still find whatever you need. Called `fd-find` in various repos, Homebrew and some Linuxes included.

- Recently got introduced to `jless` in HN. Absolutely amazing!

---

<div class="post-metadata">

**Author:** ![OvermindDL1](https://forum.devtalk.com/user_avatar/forum.devtalk.com/overminddl1/32/52_2.png) [@OvermindDL1](https://forum.devtalk.com/u/OvermindDL1)\
**Post date:** [18 February 2022 15:33 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/11 "2022-02-18T15:33:01Z")

</div>

All of the above are awesome yes!

In addition, another I use more than I thought I would is `broot`, It’s a simple TUI to let you rather efficiently “explore directory trees and launch commands”, it has a surprising amount of functionality.

---

<div class="post-metadata">

**Author:** ![Maartz](https://forum.devtalk.com/user_avatar/forum.devtalk.com/maartz/32/240_2.png) [@Maartz](https://forum.devtalk.com/u/Maartz)\
**Post date:** [20 February 2022 21:02 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/12 "2022-02-20T21:02:04Z")

</div>

> [@Hallski](#):
>
> `gh` Github CLI tool - [https://cli.github.com](https://cli.github.com)

`glab` Gitlab CLI tool - [GitHub - profclems/glab: The GitLab CLI tool. Archived: now officially adopted by GitLab as the official CLI tool and maintained at https://gitlab.com/gitlab-org/cli. See https://github.com/profclems/glab/issues/983](https://github.com/profclems/glab#installation)

It’s not an official tool like GH’s. GH’s CLI is terrific and not being able to do the same with Gitlab was a shame. It’s patched!

---

<div class="post-metadata">

**Author:** ![conradwt](https://forum.devtalk.com/user_avatar/forum.devtalk.com/conradwt/32/778_2.png) [@conradwt](https://forum.devtalk.com/u/conradwt)\
**Post date:** [21 February 2022 07:19 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/13 "2022-02-21T07:19:56Z")

</div>

I really like using the following tools:

vtop:

- install → $ npm install -g vtop

 ![Screen Shot 2022-02-20 at 10.58.56 PM](https://forum.devtalk.com/uploads/default/original/2X/1/147bf73d9cf1ab67504663a0c18f1f55a932adda.png)

Oh-My-Zsh with Spaceship Theme:

- install =\> [https://ohmyz.sh](https://ohmyz.sh)

Github CLI:

- install → [GitHub - cli/cli: GitHub’s official command line tool](https://github.com/cli/cli)

wrk:

- install → [GitHub - wg/wrk: Modern HTTP benchmarking tool](https://github.com/wg/wrk)

gcloud CLI:

- install → [Install the gcloud CLI &nbsp;|&nbsp; Google Cloud CLI Documentation](https://cloud.google.com/sdk/docs/install)

grpcurl:

- install → [GitHub - fullstorydev/grpcurl: Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers](https://github.com/fullstorydev/grpcurl)

protoc:

- install → [Protocol Buffer Compiler Installation | gRPC](https://grpc.io/docs/protoc-installation)

fly or flyctl:

- install → [Install flyctl · Fly Docs](https://fly.io/docs/getting-started/installing-flyctl)

---

<div class="post-metadata">

**Author:** ![DevotionGeo](https://forum.devtalk.com/user_avatar/forum.devtalk.com/devotiongeo/32/1140_2.png) [@DevotionGeo](https://forum.devtalk.com/u/DevotionGeo)\
**Post date:** [23 February 2022 01:01 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/14 "2022-02-23T01:01:39Z")

</div>

- tree
- man
- curl
- oh-my-zsh with modified robbyrussel theme which gives me Vim mode
- Do asdf, git, node, npm, irb, go, iex, mix, psql etc count?

Edit: I forgot my most favorite tool, `cal`. It saves me from taking the cursor to the auto-hidden menu-bar to see the date. It shows me the whole calendar instead of just the date, with the current date highlighted. 🙂

---

<div class="post-metadata">

**Author:** ![andrea](https://forum.devtalk.com/user_avatar/forum.devtalk.com/andrea/32/6677_2.png) [@andrea](https://forum.devtalk.com/u/andrea)\
**Post date:** [23 February 2022 07:38 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/15 "2022-02-23T07:38:33Z")

</div>

Thank you for the suggestion. This should be helpful. 🙂

---

<div class="post-metadata">

**Author:** ![Maartz](https://forum.devtalk.com/user_avatar/forum.devtalk.com/maartz/32/240_2.png) [@Maartz](https://forum.devtalk.com/u/Maartz)\
**Post date:** [23 February 2022 08:53 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/16 "2022-02-23T08:53:01Z")

</div>

I reeeeeeaaaally like [btop](https://github.com/aristocratos/btop)!

I also use [httpie](https://httpie.io/cli) a lot.

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.devtalk.com/user_avatar/forum.devtalk.com/dimitarvp/32/5599_2.png) [@dimitarvp](https://forum.devtalk.com/u/dimitarvp)\
**Post date:** [23 February 2022 18:34 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/17 "2022-02-23T18:34:38Z")

</div>

> [@DevotionGeo](#):
>
> Edit: I forgot my most favorite tool, `cal`. It saves me from taking the cursor to the auto-hidden menu-bar to see the date. It shows me the whole calendar instead of just the date, with the current date highlighted. 🙂

Can you give us a link to that?

---

<div class="post-metadata">

**Author:** ![Hallski](https://forum.devtalk.com/user_avatar/forum.devtalk.com/hallski/32/610_2.png) [@Hallski](https://forum.devtalk.com/u/Hallski)\
**Post date:** [23 February 2022 19:54 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/18 "2022-02-23T19:54:04Z")

</div>

You probably have it installed already if you are on Linux or macOS.

> **[cal (command)](https://en.m.wikipedia.org/wiki/Cal_(command))**
>
> cal is a command-line utility on a number of computer operating systems including Unix, Plan 9, Inferno and Unix-like operating systems such as Linux that prints an ASCII calendar of the given month or year. If the user does not specify any command-line options, cal will print a calendar of the current month. The command is a standard program on Unix and specified in the Single UNIX Specification.
> The cal command was present in 1st Edition Unix.
> A cal command is also part of ASCII's MSX-DOS2 To...

---

<div class="post-metadata">

**Author:** ![DevotionGeo](https://forum.devtalk.com/user_avatar/forum.devtalk.com/devotiongeo/32/1140_2.png) [@DevotionGeo](https://forum.devtalk.com/u/DevotionGeo)\
**Post date:** [24 February 2022 02:34 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/19 "2022-02-24T02:34:45Z")

</div>

[cal (command) - Wikipedia](https://en.wikipedia.org/wiki/Cal_(command)#:~:text=cal%20is%20a%20command%2Dline,calendar%20of%20the%20current%20month).

If you are on Mac or Linux, it’s already there on your computer.

Running;  
`cal` displays the current month,  
`cal -3` displays prev/current/next months  
`cal -j` displays days of the year instead of days of the current month  
`cal -y` displays the whole year  
`cal 2023` displays Calendar of 2023  
`cal 02 2023` displays Febraury 2023

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.devtalk.com/user_avatar/forum.devtalk.com/dimitarvp/32/5599_2.png) [@dimitarvp](https://forum.devtalk.com/u/dimitarvp)\
**Post date:** [24 February 2022 03:43 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/20 "2022-02-24T03:43:23Z")

</div>

Thank you and @Hallski, never heard of it lol. Pretty useful!

---

<div class="post-metadata">

**Author:** ![Hallski](https://forum.devtalk.com/user_avatar/forum.devtalk.com/hallski/32/610_2.png) [@Hallski](https://forum.devtalk.com/u/Hallski)\
**Post date:** [24 February 2022 06:34 UTC](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800/21 "2022-02-24T06:34:02Z")

</div>

I had forgotten about it but will try to remember as it’s nicer than moving mouse and focus like @DevotionGeo said. Though now that I am back in Emacs, it’s more likely to be `M-x calendar` For the same reason. 😁

[Next page](https://forum.devtalk.com/t/which-command-line-tools-do-you-use/40800.md?page=2)
