Skills2026年4月13日·1 分钟阅读

VHS — Record Terminal Sessions as GIFs and Videos

VHS by Charmbracelet lets you write terminal recordings as code. Define commands in a .tape file, and VHS generates beautiful GIFs, MP4s, or WebMs — perfect for documentation, README demos, and project showcases.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Community
入口
step-1.md
直接安装命令
npx -y tokrepo@latest install 10b32515-373d-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

TL;DR
VHS generates GIFs, MP4s, and WebMs from declarative .tape scripts for terminal demos and documentation.
§01

What it is

VHS is a tool by Charmbracelet that turns terminal recordings into code. You write a .tape file describing the commands to execute, and VHS produces high-quality GIFs, MP4s, or WebMs. No screen recording software, no manual trimming, and fully reproducible output.

Developer advocates, open-source maintainers, and documentation writers use VHS to create polished terminal demos for README files, blog posts, and project showcases without the inconsistency of manual screen captures.

§02

How it saves time or tokens

VHS replaces the manual workflow of recording a terminal session, trimming the output, and converting formats. A .tape file is version-controlled and reproducible, so updating a demo for a new version means editing a text file and re-running VHS. No more re-recording from scratch when commands change.

§03

How to use

  1. Install VHS using Homebrew, Go install, or download the binary from the releases page.
  2. Write a .tape file with commands, timing, and display settings.
  3. Run vhs your-file.tape to generate the output GIF, MP4, or WebM.
§04

Example

# demo.tape - VHS recording script
Output demo.gif
Set FontSize 14
Set Width 1200
Set Height 600

Type "echo 'Hello from VHS'"
Enter
Sleep 1s

Type "ls -la"
Enter
Sleep 2s

Type "cat README.md | head -20"
Enter
Sleep 3s
# Generate the GIF
vhs demo.tape
# Output: demo.gif (ready for README or docs)
§05

Related on TokRepo

§06

Common pitfalls

  • Setting Sleep durations too short, making the output feel rushed and hard to follow.
  • Using system-specific commands in .tape files that break on other operating systems or CI environments.
  • Generating very large GIFs by recording long sessions. Keep demos under 30 seconds for README use.

常见问题

What output formats does VHS support?+

VHS supports GIF, MP4, and WebM output formats. You specify the format using the Output directive in the .tape file. GIF is the most common for README files, while MP4 and WebM offer better quality for documentation sites.

Can I use VHS in CI/CD pipelines?+

Yes. VHS runs headlessly and can be executed in CI environments. This lets you auto-generate updated demo GIFs whenever your CLI tool changes, keeping documentation in sync with code.

How do I install VHS?+

On macOS, use brew install charmbracelet/tap/vhs. On Linux, download the binary from the GitHub releases page. VHS also requires ffmpeg and a terminal rendering engine, which are bundled in most installation methods.

Can VHS record interactive applications?+

Yes. VHS can type text, press keys (Tab, Enter, Ctrl+C), and interact with terminal UIs. The .tape format supports key presses, mouse events, and timing controls for recording interactive tools.

Is VHS free and open source?+

Yes. VHS is open source under the MIT license, published by Charmbracelet on GitHub. It is free for personal and commercial use.

引用来源 (3)

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产