silicon
Turns code into a shareable image without a screenshot or a browser.
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-controlsNotes
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
| Alternative | Type | Trade-off |
|---|---|---|
| freeze | Open source | Also local, also fast, and it understands ANSI terminal output |
| carbon.now.sh and ray.so | Free | Web-based, the prettiest defaults |
| CodeSnap | Open source | A VS Code extension, so the theme matches your editor |
| A cropped screenshot | — | Nobody will notice |
Install
brew install silicon