Freeze: Generate Stunning Images of Code and Terminal Output

Freeze: Generate Stunning Images of Code and Terminal Output

Summary

Freeze is a powerful command-line tool developed by Charmbracelet that allows users to generate beautiful images of code snippets and terminal output. It supports various output formats like PNG, SVG, and WebP, and offers extensive customization options for themes, fonts, and window styles. This makes Freeze an excellent utility for creating high-quality visuals for documentation, presentations, or social media.

Repository Info

Updated on November 14, 2025
View on GitHub

Tags

Click on any tag to explore related repositories

Introduction

Freeze, a powerful command-line tool from Charmbracelet, empowers developers to effortlessly generate stunning images of code snippets and terminal output. Whether you need to create visuals for documentation, presentations, or social media, Freeze provides a highly customizable solution. It supports various output formats including PNG, SVG, and WebP, ensuring flexibility for different use cases. With features like syntax highlighting, interactive mode, and extensive styling options, Freeze makes capturing and sharing your code and terminal interactions both simple and visually appealing.

Installation

Getting started with Freeze is straightforward. You can install it using popular package managers or directly from source:

  • macOS or Linux (Homebrew):
    brew install charmbracelet/tap/freeze
    
  • Arch Linux (yay):
    yay -S freeze
    
  • Nix:
    nix-env -iA nixpkgs.charm-freeze
    
  • Go:
    go install github.com/charmbracelet/freeze@latest
    
  • Direct Download: Packages in Debian and RPM formats, as well as binaries for Linux, macOS, and Windows, are available on the official releases page.

Examples

Freeze offers simple commands to generate images of both code and terminal output.

Generate an image of code

To capture a code file, simply pass it as an argument:

freeze artichoke.hs -o artichoke.png

Generate an image of terminal output

You can also capture the ANSI output of any terminal command using the --execute flag:

freeze --execute "eza -lah"

Freeze is highly customizable, allowing you to adjust themes, fonts, borders, shadows, and more, either through command-line flags or an interactive TUI.

Why Use Freeze?

Freeze stands out as an essential tool for several reasons:

  • High-Quality Visuals: Create professional-looking images of your code and terminal sessions, perfect for blogs, tutorials, and presentations.
  • Extensive Customization: Tailor every aspect of your screenshots, including syntax highlighting themes, font families and sizes, line numbers, window controls, background colors, borders, padding, margin, and shadows.
  • Interactive Mode: Easily configure your desired styles with an intuitive interactive terminal user interface (TUI), which saves your preferences for future use.
  • Multiple Output Formats: Export your images as SVG, PNG, or WebP, providing flexibility for different platforms and needs.
  • Capture Terminal Output: Beyond static code, Freeze can execute commands and capture their ANSI output, making it ideal for demonstrating CLI tools.
  • TUI Screenshot Integration: Seamlessly integrate with tmux to capture complex terminal user interfaces, showcasing interactive applications with ease.
  • Open Source: Being an open-source project from Charmbracelet, it benefits from community contributions and transparency.

Links