| name | charm-freeze |
| description | Generate PNG, SVG, or WebP screenshots of code and terminal output with freeze. Use when screenshotting code, freeze, terminal-to-image, or capturing styled code snippets as images. |
charm-freeze
Generate images of code and terminal output using freeze.
Basic Usage
freeze main.go -o main.png
cat artichoke.hs | freeze -o out.svg
freeze --execute "eza -lah" -o eza.png
Output Formats
Default output is freeze.png. Supports .svg, .png, .webp.
freeze main.go -o out.svg
freeze main.go -o out.png
freeze main.go -o out.webp
freeze main.go -o out.{svg,png,webp}
If piped (e.g. freeze main.go > out.svg), outputs to stdout.
Language Detection
Auto-detects from filename or content. Override with --language:
cat script.sh | freeze --language bash
freeze file.txt --language python
Themes
freeze main.go --theme dracula
freeze main.go --theme charm
freeze main.go --theme github
Fonts
Defaults: JetBrains Mono, 14px, 1.2 line-height.
freeze main.go \
--font.family "SF Mono" \
--font.size 16 \
--line-height 1.4
freeze main.go --font.file ./FiraCode.ttf
freeze main.go --font.ligatures
Decorations
freeze main.go --window
freeze main.go --border.radius 8
freeze main.go --border.width 1 --border.color "#515151" --border.radius 8
freeze main.go --shadow.blur 20 --shadow.x 0 --shadow.y 10
freeze main.go --background "#08163f"
Layout
freeze main.go --padding 20
freeze main.go --padding 20,40
freeze main.go --padding 20,60,20,40
freeze main.go --margin 20,40
freeze main.go --height 400
Line Numbers
freeze main.go --show-line-numbers
freeze main.go --show-line-numbers --lines 10,25
Configurations
Three built-in presets:
freeze -c base main.go
freeze -c full main.go
freeze -c user main.go
freeze -c ./custom.json main.go
Example custom.json:
{
"window": true,
"border": { "radius": 8, "width": 1, "color": "#515151" },
"shadow": { "blur": 20, "x": 0, "y": 10 },
"padding": [20, 40, 20, 20],
"font": { "family": "JetBrains Mono", "size": 14 },
"line_height": 1.2
}
Interactive Mode
freeze --interactive
Opens a TUI to tweak all settings visually. Saves result to ~/.config/freeze/user.json.
Screenshot TUIs
Capture a running TUI via tmux:
tmux capture-pane -pet 1 | freeze -c full -o helix.png
Wrap Long Lines
freeze main.go --wrap 80