Topics
- modern fast replacements for established use cases
- new more powerful tools
- interactive command line tools aka text UI or TUI
These are faster better stronger replacements for established use cases.
mortgage-engine$ time grep user # does not finish
# does not finish
mortgage-engine$ time rg user # skipps anything in git ignore by default
# rg user 0.08s user 0.30s system 211% cpu 0.179 total
mortgage-engine$ time rg -vvv user # search it all!
# rg -vvv user 0.27s user 0.51s system 37% cpu 2.072 total
mortgage-engine$ time find . -name user.rb
# ./app/models/brokers/user.rb
# ./app/models/user.rb
# find . -name user.rb 0.19s user 2.73s system 99% cpu 2.932 total
mortgage-engine$ time fd user.rb
# app/models/admin_user.rb
# app/models/brokers/application_user.rb
# app/models/brokers/user.rb
# app/models/user.rb
# db/migrate/20201022095750_remove_provider_from_user.rb
# db/migrate/20210111150109_add_role_to_admin_user.rb
# db/migrate/20210203090756_add_intercom_id_to_user.rb
# db/migrate/20210617153246_add_names_to_admin_user.rb
# db/migrate/20210622124717_add_oauth_fields_to_admin_user.rb
# db/migrate/20210728081905_add_phone_number_to_broker_user.rb
# fd user.rb 0.04s user 0.06s system 426% cpu 0.023 total
Demo in shell.
Remember to
unalias ls
unalias cat
These are tools that allow easier scripting and new workflows without leaving the terminal.
fzf is a general-purpose command-line fuzzy finder.
gh pr view --web $(gh pr list | fzf | cut -f 1)
# gh is githubs cli
# cut allows to cut a string into parts (split)
# and only take certain fields (here the first split by <space>)
# With input prompt
sttr
# Direct input
sttr md5 "Hello World"
# File input
sttr md5 file.text
sttr base64-encode image.jpg
# Reading from different processor like cat, curl, printf etc..
echo "Hello World" | sttr md5
cat file.txt | sttr md5
# Writing output to a file
sttr yaml-json file.yaml > file-output.json
It's nice why would you ever lave to use a mouse :D.
There are interactive tools, that often replace GUI functions. But unlike GUI apps, they are designed to be used keyboard first.
Write slides in markdown. You have been seeing this in action for a while now.
mortgage-engine$ lazygit
Downloads$ vd entries.csv
One of the oldest TUI available :D. But it plays really nice with all its new friends. Specially NeoVim with terminal and floating window support.
mortgage-engine$ vim
- glow will render markdown on the command line for you.
- termdbms seams to be a SQL client TUI
- Kubelive kubernetes cluster management
- share-cli quick temporary file sharing
- emma-cli node package browser
I love this stuff, talk to me anytime ;) .