Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yinnx/cmd-wrapped
👩💻 A CLI Tool for Command Line Insights
https://github.com/yinnx/cmd-wrapped
atuin bash cli commandline fish rust shell zsh
Last synced: 4 days ago
JSON representation
👩💻 A CLI Tool for Command Line Insights
- Host: GitHub
- URL: https://github.com/yinnx/cmd-wrapped
- Owner: YiNNx
- License: mit
- Created: 2023-12-29T18:13:52.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-09-07T06:14:55.000Z (4 months ago)
- Last Synced: 2024-10-29T17:27:32.865Z (about 2 months ago)
- Topics: atuin, bash, cli, commandline, fish, rust, shell, zsh
- Language: Rust
- Homepage: https://crates.io/crates/cmd-wrapped
- Size: 658 KB
- Stars: 1,009
- Watchers: 7
- Forks: 27
- Open Issues: 9
-
Metadata Files:
- Readme: README-CN.md
- License: LICENSE
Awesome Lists containing this project
README
# cmd-wrapped
一个用于查看 shell 历史记录统计信息的 CLI,支持 zsh、bash、fish 和 atuin。
## 安装
- **使用 [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html)**
```shell
cargo install cmd-wrapped
```- **从 [Release](https://github.com/YiNNx/cmd-wrapped/releases/latest) 下载**
解压,赋予执行权限,然后在终端中运行二进制文件。
- **Archlinux**
```shell
yay -S cmd-wrapped
```- **Nix❄️**
```nix
nix run nixpkgs#cmd-wrapped
```## 使用
```sh
# 获取当前统计数据
cmd-wrapped# 获取特定年份的年度 shell 历史统计数据
cmd-wrapped 2024# 指定目标 shell
cmd-wrapped -s
```对 `` 支持的选项:`zsh`、`bash`、`fish`、`atuin`。
> [!NOTE]
>
> 在某些情况下,cmd-wrapped 可能无法输出正确的数据(例如 [所有输出均为 0](https://github.com/YiNNx/cmd-wrapped/issues/3))。这是因为它依赖于每个命令的时间戳记录,有时需要额外配置特定选项:
>
> - 对于 Zsh - [EXTENDED_HISTORY](https://zsh.sourceforge.io/Doc/Release/Options.html#History)(oh-my-zsh 默认启用)
> - 对于 Bash - [HISTTIMEFORMAT](https://www.gnu.org/software/bash/manual/bash.html#index-HISTTIMEFORMAT)
>
> **在配置选项之前执行的命令将不会记录时间戳,这将影响 cmd-wrapped 的统计数据**。## 致谢与许可证
- 特别感谢 [@jyi2ya](https://github.com/jyi2ya) 的绝妙想法!
- 许可证:[MIT](https://github.com/YiNNx/cmd-wrapped/blob/master/LICENSE)