[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73222":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},73222,"freeze","charmbracelet\u002Ffreeze","charmbracelet","Generate images of code and terminal output 📸","",null,"Go",4668,98,11,49,0,1,25,116,3,27.99,"MIT License",false,"main",true,[],"2026-06-12 02:03:10","# Freeze\n\n\u003Cp>\n  \u003Ca href=\"https:\u002F\u002Fstuff.charm.sh\u002Ffreeze\u002Ffreeze-4k.png\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fassets\u002F25087\u002Fde76b799-fa67-4b5b-8da2-d990ca5b4e06\" width=\"500\" \u002F>\u003C\u002Fa>\u003Cbr>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Freleases\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frelease\u002Fcharmbracelet\u002Ffreeze.svg\" alt=\"Latest Release\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Factions\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fworkflows\u002Fbuild\u002Fbadge.svg\" alt=\"Build Status\">\u003C\u002Fa>\n\u003C\u002Fp>\n\nGenerate images of code and terminal output.\n\n\u003Cp align=\"left\">\n  \u003Ca>\u003Cimg width=\"600\" src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-1C6z5SUKlTdqdj4KL1ADlH.gif\" alt=\"Freeze code screenshot\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n## Examples\n\nFreeze generates PNGs, SVGs, and WebPs of code and terminal output alike.\n\n### Generate an image of code\n\n```sh\nfreeze artichoke.hs -o artichoke.png\n```\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fassets\u002F42545625\u002Ff15efdda-8e9b-4cb1-9e87-3d32b692eb7c\">\n    \u003Cimg alt=\"output of freeze command, Haskell code block\" src=\".\u002Ftest\u002Fgolden\u002Fsvg\u002Fshadow.svg\" width=\"800\" \u002F>\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n### Generate an image of terminal output\n\nYou can use `freeze` to capture ANSI output of a terminal command with the\n`--execute` flag.\n\n```bash\nfreeze --execute \"eza -lah\"\n```\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fassets\u002F42545625\u002Faa5447ed-999a-4809-909d-67093d758f5a\">\n    \u003Cimg alt=\"output of freeze command, ANSI\" src=\".\u002Ftest\u002Fgolden\u002Fsvg\u002Feza.svg\" width=\"800\" \u002F>\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\nFreeze is also [super customizable](#customization) and ships with an [interactive TUI](#interactive-mode).\n\n## Installation\n\n```sh\n# macOS or Linux\nbrew install charmbracelet\u002Ftap\u002Ffreeze\n\n# Arch Linux (btw)\nyay -S freeze\n\n# Nix\nnix-env -iA nixpkgs.charm-freeze\n```\n\nOr, download it:\n\n- [Packages][releases] are available in Debian and RPM formats\n- [Binaries][releases] are available for Linux, macOS, and Windows\n\nOr, just install it with `go`:\n\n```sh\ngo install github.com\u002Fcharmbracelet\u002Ffreeze@latest\n```\n\n[releases]: https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Freleases\n\n## Customization\n\n### Interactive mode\n\nFreeze features a fully interactive mode for easy customization.\n\n```bash\nfreeze --interactive\n```\n\n\u003Cimg alt=\"freeze interactive mode\" src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-1AGhIlc2Mtn9Ltc8vPtaAP.gif\" width=\"400\" \u002F>\n\nSettings are written to `$XDG_CONFIG\u002Ffreeze\u002Fuser.json` and can be accessed with\n`freeze --config user`.\n\n### Flags\n\nScreenshots can be customized with `--flags` or [Configuration](#configuration) files.\n\n> [!NOTE]\n> You can view all freeze customization with `freeze --help`.\n\n- [`-b`](#background), [`--background`](#background): Apply a background fill.\n- [`-c`](#configuration), [`--config`](#configuration): Base configuration file or template.\n- [`-l`](#language), [`--language`](#language): Language to apply to code\n- [`-m`](#margin), [`--margin`](#margin): Apply margin to the window.\n- [`-o`](#output), [`--output`](#output): Output location for .svg, .png, .jpg.\n- [`-p`](#padding), [`--padding`](#padding): Apply padding to the code.\n- [`-r`](#border-radius), [`--border.radius`](#border-radius): Corner radius of window.\n- [`-t`](#theme), [`--theme`](#theme): Theme to use for syntax highlighting.\n- [`-w`](#window), [`--window`](#window): Display window controls.\n- [`-H`](#height), [`--height`](#height): Height of terminal window.\n- [`--border.width`](#border-width): Border width thickness.\n- [`--border.color`](#border-width): Border color.\n- [`--shadow.blur`](#shadow): Shadow Gaussian Blur.\n- [`--shadow.x`](#shadow): Shadow offset x coordinate.\n- [`--shadow.y`](#shadow): Shadow offset y coordinate.\n- [`--font.family`](#font): Font family to use for code.\n- [`--font.ligatures`](#font): Use ligatures in the font.\n- [`--font.size`](#font): Font size to use for code.\n- [`--font.file`](#font): File path to the font to use (embedded in the SVG).\n- [`--line-height`](#font): Line height relative to font size.\n- [`--show-line-numbers`](#line-numbers): Show line numbers.\n- [`--lines`](#line-numbers): Lines to capture (start,end).\n\n### Language\n\nIf possible, `freeze` auto-detects the language from the file name or analyzing\nthe file contents. Override this inference with the `--language` flag.\n\n```bash\ncat artichoke.hs | freeze --language haskell\n```\n\n\u003Cbr \u002F>\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fassets\u002F42545625\u002Fd746f028-3d51-4bfd-ba81-94bbc47b3587\">\n  \u003Cimg alt=\"output of freeze command, Haskell code block\" src=\".\u002Ftest\u002Fgolden\u002Fsvg\u002Fhaskell.svg\" width=\"600\" \u002F>\n\u003C\u002Fa>\n\n### Theme\n\nChange the color theme.\n\n```bash\nfreeze artichoke.hs --theme dracula\n```\n\n\u003Cbr \u002F>\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fassets\u002F42545625\u002Fc693dc80-89b8-43c6-a34e-2d49a332d0c7\">\n  \u003Cimg alt=\"output of freeze command, Haskell code block with dracula theme\" src=\".\u002Ftest\u002Fgolden\u002Fsvg\u002Fdracula.svg\" width=\"600\" \u002F>\n\u003C\u002Fa>\n\n### Output\n\nChange the output file location, defaults to `out.svg` or stdout if piped. This\nvalue supports `.svg`, `.png`, `.webp`.\n\n```bash\nfreeze main.go --output out.svg\nfreeze main.go --output out.png\nfreeze main.go --output out.webp\n\n# or all of the above\nfreeze main.go --output out.{svg,png,webp}\n```\n\n### Font\n\nSpecify the font family, font size, and font line height of the output image.\nDefaults to `JetBrains Mono`, `14`(px), `1.2`(em).\n\n```bash\nfreeze artichoke.hs \\\n  --font.family \"SF Mono\" \\\n  --font.size 16 \\\n  --line-height 1.4\n```\n\nYou can also embed a font file (in TTF, WOFF, or WOFF2 format) using the\n`--font.file` flag.\n\nTo use ligatures in the font, you can apply the `--font.ligatures` flag.\n\n### Line Numbers\n\nShow line numbers in the terminal window with the `--show-line-numbers` flag.\n\n```bash\nfreeze artichoke.hs --show-line-numbers\n```\n\nTo capture only a specific range of line numbers you can use the `--lines` flag.\n\n```bash\nfreeze artichoke.hs --show-line-numbers --lines 2,3\n```\n\n### Border Radius\n\nAdd rounded corners to the terminal.\n\n```bash\nfreeze artichoke.hs --border.radius 8\n```\n\n\u003Cbr \u002F>\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fassets\u002F42545625\u002F50932b10-56fd-4312-adbd-f64b36a15441\">\n  \u003Cimg alt=\"code screenshot with corner radius of 8px\" src=\".\u002Ftest\u002Fgolden\u002Fsvg\u002Fborder-radius.svg\" width=\"600\" \u002F>\n\u003C\u002Fa>\n\n### Window\n\nAdd window controls to the terminal, macOS-style.\n\n```bash\nfreeze artichoke.hs --window\n```\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fassets\u002F42545625\u002Fba46bc4a-fb36-4718-88d4-f63b93343615\">\n  \u003Cimg alt=\"output of freeze command, Haskell code block with window controls applied\" src=\".\u002Ftest\u002Fgolden\u002Fsvg\u002Fwindow.svg\" width=\"600\" \u002F>\n\u003C\u002Fa>\n\n### Background\n\nSet the background color of the terminal window.\n\n```bash\nfreeze artichoke.hs --background \"#08163f\"\n```\n\n### Height\n\nSet the height of the terminal window.\n\n```bash\nfreeze artichoke.hs --height 400\n```\n\n### Border Width\n\nAdd a border outline to the terminal window.\n\n```bash\nfreeze artichoke.hs --border.width 1 --border.color \"#515151\" --border.radius 8\n```\n\n\u003Cbr \u002F>\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fassets\u002F42545625\u002Fb9207976-50fe-479b-974b-e1bf2ad1684c\">\n  \u003Cimg alt=\"output of freeze command, Haskell code block with border applied\" src=\".\u002Ftest\u002Fgolden\u002Fsvg\u002Fborder-width.svg\" width=\"600\" \u002F>\n\u003C\u002Fa>\n\n### Padding\n\nAdd padding to the terminal window. You can provide 1, 2, or 4 values.\n\n```bash\nfreeze main.go --padding 20          # all sides\nfreeze main.go --padding 20,40       # vertical, horizontal\nfreeze main.go --padding 20,60,20,40 # top, right, bottom, left\n```\n\n\u003Cbr \u002F>\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fassets\u002F42545625\u002F41da80bb-a6d8-402b-9f14-c73050720c0f\">\n  \u003Cimg alt=\"output of freeze command, Haskell code block with padding applied\" src=\".\u002Ftest\u002Fgolden\u002Fsvg\u002Fpadding.svg\" width=\"600\" \u002F>\n\u003C\u002Fa>\n\n### Margin\n\nAdd margin to the terminal window. You can provide 1, 2, or 4 values.\n\n```bash\nfreeze main.go --margin 20          # all sides\nfreeze main.go --margin 20,40       # vertical, horizontal\nfreeze main.go --margin 20,60,20,40 # top, right, bottom, left\n```\n\n\u003Cbr \u002F>\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fassets\u002F42545625\u002Feca78a8e-2dbc-4cfa-81da-6c2194925238\">\n  \u003Cimg alt=\"output of freeze command, Haskell code block with margin applied\" src=\".\u002Ftest\u002Fgolden\u002Fsvg\u002Fmargin.svg\" width=\"720\" \u002F>\n\u003C\u002Fa>\n\n### Shadow\n\nAdd a shadow under the terminal window.\n\n```bash\nfreeze artichoke.hs --shadow.blur 20 --shadow.x 0 --shadow.y 10\n```\n\n\u003Cbr \u002F>\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fassets\u002F42545625\u002Fb9a8cc17-5ec6-4004-941b-5ae1b65d2b18\">\n  \u003Cimg alt=\"output of freeze command, Haskell code block with a shadow\" src=\".\u002Ftest\u002Fgolden\u002Fsvg\u002Fshadow.svg\" width=\"720\" \u002F>\n\u003C\u002Fa>\n\n## Screenshot TUIs\n\nUse `tmux capture-pane` to generate screenshots of TUIs.\n\nRun your TUI in `tmux` and get it to the state you want to capture.\nNext, use `capture-pane` to capture the pane and pipe that to freeze.\n\n```bash\nhx # in a separate pane\ntmux capture-pane -pet 1 | freeze -c full\n```\n\n\u003Cimg width=\"650px\" src=\".\u002Ftest\u002Fgolden\u002Fsvg\u002Fhelix.svg\" alt=\"helix captured with freeze\">\n\n## Configuration\n\nFreeze also supports configuration via a JSON file which can be passed with the\n`--config` \u002F `-c` flag. In general, all `--flag` options map directly to keys\nand values in the config file\n\nThere are also some default configurations built into `freeze` which can be passed by name.\n\n- `base`: Simple screenshot of code.\n- `full`: macOS-like screenshot.\n- `user`: Uses `~\u002F.config\u002Ffreeze\u002Fuser.json`.\n\nIf you use `--interactive` mode, a configuration file will be created for you at\n`~\u002F.config\u002Ffreeze\u002Fuser.json`. This will be the default configuration file used\nin your screenshots.\n\n```bash\nfreeze -c base main.go\nfreeze -c full main.go\nfreeze -c user main.go # alias for ~\u002F.config\u002Ffreeze\u002Fuser.json\nfreeze -c .\u002Fcustom.json main.go\n```\n\nHere's what an example configuration looks like:\n\n```json\n{\n  \"window\": false,\n  \"border\": {\n    \"radius\": 0,\n    \"width\": 0,\n    \"color\": \"#515151\"\n  },\n  \"shadow\": false,\n  \"padding\": [20, 40, 20, 20],\n  \"margin\": \"0\",\n  \"font\": {\n    \"family\": \"JetBrains Mono\",\n    \"size\": 14\n  },\n  \"line_height\": 1.2\n}\n```\n\n## Contributing\n\nSee [contributing][contribute].\n\n[contribute]: https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fcontribute\n\n## Feedback\n\nWe’d love to hear your thoughts on this project. Feel free to drop us a note!\n\n- [Twitter](https:\u002F\u002Ftwitter.com\u002Fcharmcli)\n- [The Fediverse](https:\u002F\u002Fmastodon.social\u002F@charmcli)\n- [Discord](https:\u002F\u002Fcharm.sh\u002Fchat)\n\n## License\n\n[MIT](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Ffreeze\u002Fraw\u002Fmain\u002FLICENSE)\n\n---\n\nPart of [Charm](https:\u002F\u002Fcharm.sh).\n\n\u003Ca href=\"https:\u002F\u002Fcharm.sh\u002F\">\n  \u003Cimg\n    alt=\"The Charm logo\"\n    width=\"400\"\n    src=\"https:\u002F\u002Fstuff.charm.sh\u002Fcharm-badge.jpg\"\n  \u002F>\n\u003C\u002Fa>\n\nCharm热爱开源 • Charm loves open source\n","Freeze 是一个用于生成代码和终端输出图像的工具。它支持将代码片段或终端命令的 ANSI 输出转换为 PNG、SVG 和 WebP 格式的图片，具有高度可定制性，用户可以通过命令行参数或交互式界面调整背景颜色、语言高亮等设置。该工具使用 Go 语言编写，安装简便，适用于需要展示代码示例或终端操作结果的技术文档编写、博客撰写以及演示材料制作等场景。",2,"2026-06-11 03:44:36","high_star"]