Skip to content

Conversation

wesen
Copy link

@wesen wesen commented Jun 9, 2025

Extends the Screenshot command to support capturing terminal content as
plain text in addition to the existing PNG image format.

Usage

# Capture visual screenshot
Screenshot output.png

# Capture text content
Screenshot output.txt

@wesen wesen requested a review from a team as a code owner June 9, 2025 21:14
@wesen wesen requested review from andreynering and removed request for a team June 9, 2025 21:14
@wesen wesen changed the title Add text screenshot capability to Screenshot command feat: add text screenshot capability to Screenshot command Jun 9, 2025
@caarlos0
Copy link
Member

Hey @wesen

can you elaborate on what's your use case for this? You got me curious :)

@joshka
Copy link
Contributor

joshka commented Jul 8, 2025

Hey @wesen

can you elaborate on what's your use case for this? You got me curious :)

I'm not @wesen, but I can see significant value in this idea for the following 2 use cases:

  • creating end user docs that are validated to be exactly the same as the output of some cli / tui app
  • outputting values that can be used for snapshot testing for end-to-end testing situations

Comment on lines +769 to +770
When using `.png` extension, VHS captures a visual screenshot of the terminal.
When using `.txt` extension, VHS captures the terminal content as plain text without any styling.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing docs for .ansi

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will add!

@wesen
Copy link
Author

wesen commented Jul 11, 2025

@joshka @caarlos0 yes that's exactly my usecase. I use it very often for LLM agents to snapshot intermediate steps either for their own sake, or for me to verify they actually implemented what I wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants