35 lines
1.8 KiB
Markdown
35 lines
1.8 KiB
Markdown
|
---
|
||
|
title: "Better CLI tools"
|
||
|
date: 2022-06-29T01:42:46+02:00
|
||
|
---
|
||
|
|
||
|
These are a collection of command line tools that I use (on Windows) in place of the more traditional tools you would find in a \*NIX system.
|
||
|
|
||
|
- **What**: What is the tool for
|
||
|
- **OG**: Conventional tool
|
||
|
- **Better**: Better tool to use
|
||
|
- **Lang**: Language the tool is written in
|
||
|
- **Multi**: Works on all major platforms (Windows, Linux, Mac, \*BSD)
|
||
|
|
||
|
| What | OG | Better | Lang | Multi | How to install |
|
||
|
| ------------------------- | ----- | --------- | ---- | -------- | ---------------------------------------------- |
|
||
|
| Find text in files | grep | [ripgrep] | Rust | ✔️ | `cargo install ripgrep` |
|
||
|
| List files in a directory | ls | [exa] | Rust | ❌[^fn1] | `cargo install exa` |
|
||
|
| Read file content | cat | [bat] | Rust | ✔️ | Package manager (+ choco) |
|
||
|
| Find files by name | find | [fzf] | Go | ✔️ | Package manager (+ choco) |
|
||
|
| Count lines of code | cloc | [loc] | Rust | ✔️ | `cargo install loc` |
|
||
|
| Navigate/manipulate JSON | _jq?_ | [yq] | Go | ✔️ | `go install github.com/mikefarah/yq/v4@latest` |
|
||
|
| Navigate/manipulate HTML | _N/A_ | [pup] | Go | ✔️ | `go install github.com/ericchiang/pup@latest` |
|
||
|
|
||
|
[ripgrep]: https://github.com/BurntSushi/ripgrep
|
||
|
[loc]: https://github.com/cgag/loc
|
||
|
[bat]: https://github.com/sharkdp/bat
|
||
|
[jq]: https://stedolan.github.io/jq/
|
||
|
[pup]: github.com/ericchiang/pup
|
||
|
[fzf]: https://github.com/junegunn/fzf
|
||
|
[exa]: https://the.exa.website/
|
||
|
[many]: https://gist.github.com/willurd/5720255
|
||
|
[yq]: https://github.com/mikefarah/yq
|
||
|
|
||
|
[^fn1]: `exa` doesn't compile on Windows
|