2024-03-05 01:32:06 +01:00
|
|
|
+++
|
2024-03-05 07:54:51 +01:00
|
|
|
title = "A modern CLI renaissance?"
|
2024-03-05 01:32:06 +01:00
|
|
|
date = 2024-03-04T12:20:02-06:00
|
|
|
|
draft = true
|
|
|
|
+++
|
2024-03-09 21:44:41 +01:00
|
|
|
<!--
|
|
|
|
btop, 2021, c++
|
|
|
|
bat, 2018, rust
|
|
|
|
helix, 2020, rust
|
|
|
|
zoxide, 2020, rust
|
|
|
|
starship, 2019, rust
|
|
|
|
difftastic, 2018, rust
|
|
|
|
git-delta, 2019, rust
|
|
|
|
nushell, 2018, rust
|
|
|
|
hyperfine, 2018, rust
|
|
|
|
sd, 2018, rust
|
|
|
|
tre, 2019, rust
|
|
|
|
typst, 2019, rust
|
|
|
|
yazi, 2024, rust
|
|
|
|
fd, 2017, rust
|
|
|
|
ripgrep, 2016, rust
|
|
|
|
ast-grep, 2022, rust
|
|
|
|
pueue, 2015, rust
|
|
|
|
diskonaut, 2020, rust
|
|
|
|
broot, 2018, rust
|
|
|
|
just, 2016, rust
|
|
|
|
zellij, 2020, rust
|
|
|
|
scc, 2018, go
|
|
|
|
fzf, 2013, go
|
|
|
|
lazygit, 2018, go
|
|
|
|
grex, 2019, rust
|
|
|
|
micro, 2016, go
|
|
|
|
oh-my-posh, 2019, go
|
|
|
|
nnn, 2016, c
|
|
|
|
qalculate, 2016, c++
|
|
|
|
eza/exa, 2014, rust
|
|
|
|
lsd, 2018, rust
|
|
|
|
neovim, 2015, c
|
|
|
|
|
|
|
|
cat, cd, rm, cp, man was included in the first version of unix, in 1971
|
|
|
|
ls specifically can trace its history to 1961 (https://tldp.org/LDP/LG/issue48/fischer.html)
|
|
|
|
vi was made in 1976
|
|
|
|
sed in 1974
|
|
|
|
awk in 1985
|
|
|
|
grep in 1973
|
|
|
|
bc in 1975
|
|
|
|
diff in 1974
|
|
|
|
make in 1976
|
|
|
|
vim in 1991
|
|
|
|
ssh in 1995
|
|
|
|
midnight commander in 1994
|
|
|
|
screen in 1987
|
|
|
|
tmux in 2007
|
|
|
|
rust 1.0 in 2015
|
|
|
|
-->
|
2024-03-05 01:32:06 +01:00
|
|
|
|
2024-03-05 07:54:51 +01:00
|
|
|
Id like to talk about a trend Ive seen these past few years, where people are rewriting core CLI tools,
|
|
|
|
why I think this trend is a good thing, and why I think this trend might be happening.
|
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
## History
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-05 01:32:06 +01:00
|
|
|
The terminal has been a staple of computer user interfaces since before computer monitors were available,
|
|
|
|
with some of the first computers offering an interactive mode in the late 1950's.
|
|
|
|
The 'modern' Linux terminal traces its linage to the very first version of Unix, in 1971.
|
2024-03-05 07:54:51 +01:00
|
|
|
Many utilities that a Linux user interacts with every day,
|
2024-03-05 01:32:06 +01:00
|
|
|
commands like `rm`, `cat`, `cd`, `cp`, `man` and a host of other core commands trace their initial versions to this first version of Unix.
|
|
|
|
Other tools are a bit newer, such as `sed` (1974), `diff` (1974) `bc` (1975), `make` (1976) or `vi` (1976).
|
2024-03-05 07:54:51 +01:00
|
|
|
There were a few more tools introduced in the 90's, such as `vim` (1991) and `ssh`, (1995), but you get the picture.
|
2024-03-05 01:32:06 +01:00
|
|
|
The majority of the foundational CLI tools on a Linux pc, even one installed yesterday, are older than Linux itself is.
|
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
## Ok, so?
|
2024-03-05 01:32:06 +01:00
|
|
|
|
|
|
|
Now, theres nothing wrong with this, the tools work fine still, but,
|
|
|
|
in the half-century since they were first written,
|
2024-03-05 07:54:51 +01:00
|
|
|
Terminals and the broader Linux ecosystem have all changed.
|
2024-03-05 01:32:06 +01:00
|
|
|
Terminals now have capacity to display more colours, Unicode symbols, and even inline images.
|
2024-03-05 07:54:51 +01:00
|
|
|
Terminal programs now coexist with graphical user interfaces,
|
|
|
|
and only a small subset of computer users even know they exist,
|
|
|
|
wheras in the past, terminals were the only way one interacted with the computer.
|
2024-03-05 01:32:06 +01:00
|
|
|
|
|
|
|
Additionally, and perhaps more importantly, our knowledge has expanded,
|
|
|
|
our knowledge of user interfaces,
|
|
|
|
of what works and what doesnt,
|
|
|
|
of what usecases are common and what usecases are niche,
|
2024-03-05 07:54:51 +01:00
|
|
|
the way that error messages can teach,
|
|
|
|
the value of a good out of the box experience,
|
2024-03-05 01:32:06 +01:00
|
|
|
and the value of documentation that is easy to find and digest.
|
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
## The new tools
|
2024-03-05 01:32:06 +01:00
|
|
|
|
2024-03-05 07:54:51 +01:00
|
|
|
These changes to the environment surrounding CLI apps has, in recent years,
|
|
|
|
led to a resurgence in development of command line utilities.
|
2024-03-05 01:32:06 +01:00
|
|
|
Instead of just developing tools that dont exist,
|
2024-03-05 07:54:51 +01:00
|
|
|
Ive noticed that people are rethinking and reinventing tools that have existed since the early days of Unix.
|
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
## Exploration of the design space
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
## The lessons learned from the past
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
### A good out of the box experience
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
<!-- look at helix compared to (neo)vim-->
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
### Friendly error messages
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
<!-- look at nushells error messages-->
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
### Concise and discoverable documentation
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
<!-- look at zellij and helix and their built in keymap cheatsheets-->
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
### Common usecases should be easy
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
<!-- look at sd, rg, and fd-->
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
## Shedding historical baggage
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
<!-- look at just command runner, simplifying the common use case of make-->
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
## The trendsetter
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
<!-- did neovim kick this all off?-->
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
## The languages
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
<!-- most of the new tools are written in rust and go.-->
|
2024-03-05 07:54:51 +01:00
|
|
|
|
2024-03-09 21:44:41 +01:00
|
|
|
<!-- rusts clap and gos cobra-->
|
2024-03-05 07:54:51 +01:00
|
|
|
|