Turn Bash snippets into images worth sharing, without leaving your Mac.
Shell snippets are the most copied and the most dangerous to post as an image, since nobody can paste them back out.
Codeshot detects Bash from the code you paste, so there is no language picker to get wrong. Here is the same snippet in three of the 30 themes it ships with, rendered with the app's own stylesheets.
#!/usr/bin/env bashset -euo pipefail
for file in src/**/*.swift; do
name="$(basename "$file" .swift)"
codeshot export"$file" --theme xcode --scale 2 --out "out/$name.png"done
Atom One · dark
#!/usr/bin/env bashset -euo pipefail
for file in src/**/*.swift; do
name="$(basename "$file" .swift)"
codeshot export"$file" --theme xcode --scale 2 --out "out/$name.png"done
Solarized · dark
#!/usr/bin/env bashset -euo pipefail
for file in src/**/*.swift; do
name="$(basename "$file" .swift)"
codeshot export"$file" --theme xcode --scale 2 --out "out/$name.png"done
Tokyo Night · dark
Choosing a theme for Bash
Always put the command in the post text as well as the image. A shell one-liner that people have to retype by hand from a picture will be retyped wrong.
Getting the size right
Let the image follow your content, or lock it to a ratio — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3, or 3:4 — then export at 1×, 2×, or 3× so it stays sharp on a retina display. Copy it straight to the clipboard with ⌘⇧C, or save with ⌘S.