终端工具
- 跨平台终端命令的 benchmark tool:hyperfine
作者在 repo 上还加入了 py 可视化分析的脚本代码 - csv 文件命令行统计工具:xsv
作者还写了 rust-csv crate,可以让 Rust 调用操作 csv 的函数 - 关于系统命令行替代品的工具:https://sts10.github.io/2019/04/08/terminal-redox-alacritty.html
- eva 替代 ls 命令的彩色终端命令,同时做到 ls+tree ```bash $ exa -L=3 -T -l # 显示 3 级目录和文件树和详细信息 drwxrwxr-x - ubuntu 19 Apr 10:05 . .rw-rw-r— 172 ubuntu 18 Apr 00:36 ├── Cargo.lock .rw-rw-r— 426 ubuntu 18 Apr 00:35 ├── Cargo.toml drwxrwxr-x - ubuntu 18 Apr 20:02 ├── src drwxrwxr-x - ubuntu 18 Apr 09:16 │ ├── bin .rw-rw-r— 2.6k ubuntu 18 Apr 09:16 │ │ ├── workout_flawed_closure_demo.rs .rw-rw-r— 2.4k ubuntu 18 Apr 09:16 │ │ └── workout_generics_closure.rs .rw-rw-r— 806 ubuntu 18 Apr 20:02 │ └── main.rs .rw-rw-r— 82 ubuntu 16 Apr 00:30 └── Xargo.toml
$ exa -L=3 -D -T -l # 显示 3 级目录树和详细信息 drwxrwxr-x - ubuntu 19 Apr 10:05 . drwxrwxr-x - ubuntu 18 Apr 20:02 └── src drwxrwxr-x - ubuntu 18 Apr 09:16 └── bin

- dust 统计目录和文件的大小,用颜色提示每个目录中占用硬盘空间最大的目录/文件,以树形结构和图形化展示,du+tree

```bash
# 我的习惯设置
alias dust="dust -b -r -i -n 18"
alias exa="exa -T -L=3 -l --no-user"
- 终端空间:zellij
切分当前终端成多个网格,并且有 tabs,支持 wasm 拓展插件。适用于 linux / macos
- 流量监控:bandwhich
- 代码/文本拼写检查工具:https://github.com/crate-ci/typos
- The minimal, blazing-fast, and infinitely customizable prompt for any shell! https://github.com/starship/starship
- nushell:A new type of shell. https://www.nushell.sh/
终端与数据分析结合,也能集成到 jupyter notebook,还能直接在终端中做统计分析,比 pandas 快。
一些命令:
# 显示某软件的大小
$ let p = (which cargo | get path) | ls $p
───┬───────────────────────────────┬──────┬─────────┬─────────────
# │ name │ type │ size │ modified
───┼───────────────────────────────┼──────┼─────────┼─────────────
0 │ /home/ubuntu/.cargo/bin/cargo │ File │ 15.7 MB │ 1 month ago
───┴───────────────────────────────┴──────┴─────────┴─────────────
# 显示 Rust 项目中 examples 文件下二进制的大小
# `regex` 不支持负向断言,所以使用 `-v` flag
$ ls target/debug/examples/ | match name \w+[(\.d)|-] -v
───┬──────────────────────────────────┬──────┬────────┬────────────
# │ name │ type │ size │ modified
───┼──────────────────────────────────┼──────┼────────┼────────────
0 │ target/debug/examples/many │ File │ 5.5 MB │ 1 hour ago
1 │ target/debug/examples/multiline │ File │ 5.2 MB │ 1 hour ago
2 │ target/debug/examples/simple │ File │ 5.2 MB │ 1 hour ago
3 │ target/debug/examples/stresstest │ File │ 5.2 MB │ 1 hour ago
───┴──────────────────────────────────┴──────┴────────┴────────────
# 而 `ls` 命令显示很多我们不关心的文件
$ ls target/debug/examples/
────┬─────────────────────────────────────────────────────┬──────┬────────┬────────────
# │ name │ type │ size │ modified
────┼─────────────────────────────────────────────────────┼──────┼────────┼────────────
0 │ target/debug/examples/many │ File │ 5.5 MB │ 1 hour ago
1 │ target/debug/examples/many-17061242fb2ef7ad │ File │ 5.5 MB │ 1 hour ago
2 │ target/debug/examples/many-17061242fb2ef7ad.d │ File │ 328 B │ 1 hour ago
3 │ target/debug/examples/many.d │ File │ 545 B │ 1 hour ago
4 │ target/debug/examples/multiline │ File │ 5.2 MB │ 1 hour ago
5 │ target/debug/examples/multiline-a229b6f39cc5df5c │ File │ 5.2 MB │ 1 hour ago
6 │ target/debug/examples/multiline-a229b6f39cc5df5c.d │ File │ 322 B │ 1 hour ago
7 │ target/debug/examples/multiline.d │ File │ 500 B │ 1 hour ago
8 │ target/debug/examples/simple │ File │ 5.2 MB │ 1 hour ago
9 │ target/debug/examples/simple-820128b43359a183 │ File │ 5.2 MB │ 1 hour ago
10 │ target/debug/examples/simple-820128b43359a183.d │ File │ 307 B │ 1 hour ago
11 │ target/debug/examples/simple.d │ File │ 494 B │ 1 hour ago
12 │ target/debug/examples/stresstest │ File │ 5.2 MB │ 1 hour ago
13 │ target/debug/examples/stresstest-ec0f53ccd530fa58 │ File │ 5.2 MB │ 1 hour ago
14 │ target/debug/examples/stresstest-ec0f53ccd530fa58.d │ File │ 339 B │ 1 hour ago
15 │ target/debug/examples/stresstest.d │ File │ 506 B │ 1 hour ago
────┴─────────────────────────────────────────────────────┴──────┴────────┴────────────
- 内存分析:https://github.com/koute/bytehound
- 纯 Rust 写的新 shell:https://github.com/adam-mcdaniel/dune
- find 命令的替代品:https://github.com/sharkdp/fd
- Hurl:https://github.com/Orange-OpenSource/hurl
- A new way to see and navigate directory trees:https://github.com/Canop/broot
- The terminal that supercharges your developer workflow:https://www.warp.dev/
Warp is a blazingly fast, Rust-based terminal that makes you and your team more productive at coding and DevOps. - https://pauljuliusmartinez.github.io/:jless — a command-line JSON viewer
- A cat(1) clone with syntax highlighting and Git integration:https://github.com/sharkdp/bat
- Like jq, but for HTML. Uses CSS selectors to extract bits of content from HTML files:https://github.com/mgdm/htmlq
- 获取系统信息的命令行工具汇总:see rustcc | see reddit
- alternative to sysctl(8) with a terminal user interface:https://github.com/orhun/systeroid
- Duf is a simple file server. Support static serve, search, upload, delete:https://github.com/sigoden/duf
- A tiny, self-contained, configurable paste bin and URL shortener written in Rust:https://github.com/szabodanika/microbin
- (TUI)Run multiple commands in parallel:https://github.com/pvolok/mprocs
- (TUI)A powerful log analyzer application for the terminal written in Rust:https://github.com/MrCasCode/log-analyzer-pro
- PowerShell version of asciinema based on Windows Pseudo Console(ConPTY):https://github.com/Watfaq/PowerSession-rs
- (f)low (s)tate (r)eading e(x)change – flow state reading in the terminal:https://github.com/coloradocolby/fsrx
- A modern replacement for ps written in Rust:https://github.com/dalance/procs
A command line tool to download release assets from GitHub:https://github.com/devmatteini/dra
录屏
Linux/MacOs 终端/窗口录制 GIF(命令行工具): https://github.com/sassman/t-rec-rs
Linux 录制 GIF (带交互界面): https://github.com/phw/peek
TUI
tui-rs:https://github.com/fdehau/tui-rs
Git
https://github.com/o2sh/onefetch:A command-line Git information tool written in Rust
- https://github.com/Byron/gitoxide:An idiomatic, lean, fast & safe pure Rust implementation of Git
https://github.com/tkellogg/dura:a background process that watches your Git repositories and commits your uncommitted changes without impacting HEAD, the current branch, or the Git index (staged files)
CI
grcov 代码覆盖率:Measuring the coverage of a rust program in Github Actions
- GH CI 提高编译速度:https://www.reillywood.com/blog/rust-faster-ci/