asciinema [as-kee-nuh-muh] 是一个免费开源的终端会话录制和分享工具。 你可以访问 asciinema.org 了解更多关于 asciinema 的信息。
本项目是 asciinema 的跨平台版本,使用 go 语言编写,拥有完整的功能,比官方asciinema工具更强大,更方便好用。你可以在MacOS/Linux/Windows上使用它来 创建、编辑、上传、转换(转换为gif) 一个 asciinema格式的录像。
当你需要写文档,做教程,分享终端相关的操作时,asciinema会非常实用。
-
推荐安装方法:通过版本管理器vmr进行安装.
-
通过go自带命令进行安装acast.
go install github.com/gvcgo/asciinema/cmd/acast@latest
- 从releases页面下载后手动解压. releases
subcommand | args example | desc |
---|---|---|
auth | - | 将本地ID授权到你注册的asciinema.org账户,这样你就可以使用本地ID来上传cast文件到官网了. |
convert-to-gif | input.cast output.gif | 将cast文件转换为gif动图,需要用到agg,建议使用vm一键安装agg |
cut | --start=0.0 --end=2.9 input.cast output.cast | 剪切掉cast文件中不需要的时间段,单位是秒. |
play | input.cast | 播放cast文件. |
quantize | --ranges=1.0,5.0 input.cast output.cast | 更新特定区间内的延迟. |
record | xxx.cast | 录制cast文件. |
speed | --start=0.0 --end=2.9 --factor=0.7 input.cast output.cast | 通过一个参数因子,调节某个指定时间区间内的播放速度. |
upload | xxx.cast | 上传cast文件到asciinema.org,需要auth授权. |
version | - | 显示acast的版本信息. |
- go-asciinema provided most of the code for unix-like platforms.
- PowerSession-rs inspired me the conpty fixes.
- conpty-go
- conpty
- asciinema-edit
- agg