跳到主要内容

Modern CLI Tools

For modern CLI Tools on x86_64 Linux distros, see: CLI Prebuilts.

I'll recommend some best plugins I use frequently.

mise

mise is a runtime manager to auto install and manager different software versions, like asdf, but much faster as it's built upon Rust.

Suppose you need to use node version 21, but your distro do not support now. With mise, you can skip the procedure from downloading the package, build, and add to environment variable PATH; instead, you only need to:

mise global node@21

Later in some day, you find some legacy projects and it's build upon node 18, you can simply do:

mise local node@18

mise is compatible with asdf. you can see all supported plugins on asdf-plugins.

rg

Fast grep-like, git-aware code-search with colourized output, written in Rust.

It’s a tool intended for performing blazing fast searches of your code, but unlike grep, it respects the patterns defined in your .gitignore file, and it doesn’t search your .git directory either.

To search with rg, use:

-t > rg md README

README.md
1:# README

black/README.md
974: Use the badge in your project README.md:
980: Using the badge in README.rst:

fd

Fast git-aware file searching with colourized output.

fd is for find what Ripgrep is for grep: It searches filenames and respects your .gitignore patterns. But unlike the find command, the options are easy to remember.

To search with filename:

passwd > fd /etc
/etc/default/passwd
/etc/pam.d/passwd
/etc/passwd

To search all markdown files, use -e:

-e > fd md
CONTRIBUTING.md
README.md

fzf

fzf is a general-purpose command-line fuzzy finder.

备注

Suggest to install rg and fd before using fzf.

It offers key bindings CTRL-T to search for filenames with fuzzy in an interactive way.

eza or lsd.

eza and lsd are git-aware ls replacements with clever utilization of colour. eza is a fork of original project exa which is not under maintained anymore.