Termshot
T

Termshot

Termshot

936 stars
N/A forks
N/A contributors

README

Project documentation from GitHub

Termshot: Turn Your Terminal Sessions into Beautiful Screenshots

Ever wanted to share a quick terminal demo without the hassle of recording a video or pasting raw text? Or maybe you need a clean screenshot for a blog post, presentation, or bug report? That’s where Termshot comes in.

It’s a simple CLI tool that captures your terminal output and generates a styled screenshot. No more fiddling with cropping, fonts, or background colors. Just run a command and get a shareable image that actually looks good.


What It Does

Termshot takes a shell command, executes it, and then renders the output as a clean PNG screenshot. It uses a headless browser (Chrome/Chromium in headless mode) behind the scenes to emulate a terminal window with a nice retro aesthetic.

You can choose from a few built-in themes (like “monokai” or “simple”) or create your own. The output is a pixel-perfect image that includes the terminal frame, the command prompt, and the result.


Why It’s Cool

  • No manual setup — no need to adjust your own terminal theme, resize a window, or take a screenshot with your OS tools.
  • Consistent output — everyone sees the same thing, regardless of their local terminal configuration.
  • Lightweight and scriptable — great for embedding in docs, READMEs, or sharing command results in PRs.
  • Customizable — you can tweak the background, font, and prompt to match your brand or style.
  • It’s fast — runs in a few seconds, even for complex commands.

A clever implementation detail: Termshot actually renders the text inside a real HTML page styled to look like a terminal, then uses Puppeteer (the headless browser library) to capture it. That means true font rendering, antialiasing, and proper line spacing — no pixel snapping or character clipping.


How to Try It

Installation is straightforward via go install (since it’s written in Go):

go install github.com/homeport/termshot/cmd/termshot@latest

Then run:

termshot ls -la

This will create a file like ls -la.png in your current directory. You can also pipe output or use --theme to switch looks.

For a full list of options:

termshot --help

Want to see it in action? The

Did you like this issue?

Join our weekly newsletter

Love discovering amazing projects?

Help us continue bringing you the best open-source discoveries every week.

Back to Projects
Last updated: May 30, 2026