Skip to content

silicon

Turns code into a shareable image without a screenshot or a browser.

Homebrew formula

What it does

silicon takes a file or piped text and renders a highlighted code image — window frame, rounded corners, drop shadow, optional line numbers — straight to PNG or the clipboard. No browser, no screenshot cropping.

silicon hugo.yaml -o hugo.png
silicon --from-clipboard --to-clipboard -l yaml
silicon main.go -o out.png --theme Dracula --no-window-controls

Notes

Fonts are resolved from the system, set with --font 'JetBrains Mono=16'. --list-themes shows the bundled Sublime-compatible themes. For terminal output rather than source code, freeze is the better fit.

Alternative to

AlternativeTypeTrade-off
freezeOpen sourceAlso local, also fast, and it understands ANSI terminal output
carbon.now.sh and ray.soFreeWeb-based, the prettiest defaults
CodeSnapOpen sourceA VS Code extension, so the theme matches your editor
A cropped screenshot—Nobody will notice

Install

brew install silicon

Links

This post is licensed under CC BY 4.0 by the author.
Last updated on