A minimal, customizable cross-shell prompt written in Rust that shows relevant project and environment info.
homeport/termshot
A CLI that runs a terminal command and renders its colored ANSI output as a window-style PNG screenshot.
- Stars
- 976
- Forks
- 42
- Open issues
- 37
- Last commit
- last month
What is it?
termshot wraps a command in a pseudo terminal, captures its output including ANSI color and formatting codes, and renders it as an image resembling a terminal window. Unlike tools that apply syntax highlighting to pasted text, it works from the escape codes that the command itself emits, so output from tools like ls, figlet or lolcat keeps its original colors.
Usage is simple: prefix any command with termshot, and it writes out.png by default. Flags control the look (window decoration, shadow, margin, padding, column wrapping, showing the command), the output (file path or system clipboard on supported platforms), and content (opening the captured output in $EDITOR to remove sensitive lines). It can also run a full interactive shell and screenshot the session when that shell exits.
The project is still a work in progress. Many ANSI sequences are parsed, but some output, and commands that reset the cursor position, may not render correctly.
Key features
- 01Renders real ANSI color and formatting codes instead of applying syntax highlighting.
- 02Adds a terminal-style window with optional decoration, shadow, margin and padding.
- 03Lets you edit captured output in $EDITOR before generating the image.
- 04Can screenshot a full interactive shell session.
- 05Installable with Homebrew or from prebuilt binaries for macOS and Linux.
Use cases
- Creating screenshots of CLI output for blog posts, documentation or release notes.
- Sharing command output on social media or in chat while removing sensitive lines first.
- Showcasing colorful tools like figlet or lolcat with their original styling.
Quick start
- 1
Install with Homebrew on macOS or Linux
brew install homeport/tap/termshot - 2
Prefix any command with termshot to generate out.png
termshot ls -a
Things to know
- The README states it is a work in progress, and some ANSI sequences or cursor-resetting commands may not render correctly.
Topics
FAQ
- What is termshot?
- A CLI that runs a terminal command and renders its colored ANSI output as a window-style PNG screenshot. termshot wraps a command in a pseudo terminal, captures its output including ANSI color and formatting codes, and renders it as an image resembling a terminal window. Unlike tools that apply syntax highlighting to pasted text, it works from the escape codes that the command itself emits, so output from tools like ls, figlet or lolcat keeps its original colors.
- Is termshot free to use? What license does it have?
- termshot is open source under the MIT license. Check the license terms before using it in commercial products.
- Is termshot still maintained?
- Updated within 6 months. The last commit to termshot was on Sep 15, 2026.
- What can I use termshot for?
- Creating screenshots of CLI output for blog posts, documentation or release notes. Sharing command output on social media or in chat while removing sensitive lines first. Showcasing colorful tools like figlet or lolcat with their original styling.
- How do I install termshot?
- Install with Homebrew on macOS or Linux: brew install homeport/tap/termshot Prefix any command with termshot to generate out.png: termshot ls -a
- Where can I get termshot?
- The source code and installation instructions are on GitHub: https://github.com/homeport/termshot
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A terminal markdown reader and renderer that displays .md files and repos with styled formatting in the CLI.
A terminal TUI for browsing, connecting to, and managing SSH hosts defined in your ~/.ssh/config file.
A shell guardrail that intercepts dangerous terminal commands from humans and AI coding agents and requires confirmation before running them.
A Go CLI for tmux that saves sessions, windows, panes and commands, then restores them lazily from a TUI picker.
A small Go command-line tool that colorizes, filters, and reformats logfmt logs piped from stdin in your terminal.