Codeshot adds a Make Snapshot action to the Shortcuts app. It takes code and returns a PNG, without the app ever opening a window. That turns the four workflows below into a keystroke or a right-click, and each one takes about a minute to build.
You will find it listed under Codeshot when you go to add an action.
Rows marked ⚙ are settings on the shortcut itself, not actions you drag in. Anything you do not tell Make Snapshot falls back to whatever Codeshot was last set to.
The first three are ready to download if you would rather not assemble them — the last one is quick enough to build by hand.
Four workflows
Clipboard to image, on a hotkey
The one to build first. Copy code anywhere, press a key, paste the picture into Slack, a pull request, or a post. Codeshot never opens.
- Get Clipboard
- Make Snapshot — Code:
Clipboard - Copy to Clipboard
- In the shortcut’s details, add a keyboard shortcut
Snapshot the selected text
Select code in Xcode, VS Code, or a browser, then right-click and pick it from the Services menu. Nothing touches your clipboard.
- Use as Quick Action → Services Menu, receiving
Text - Make Snapshot — Code:
Shortcut Input - Copy to Clipboard
Right-click a file in Finder
Turns any source file into a PNG saved beside it. Passing the file’s name as the title puts it in the window bar and at the start of the filename.
- Use as Quick Action → Finder, receiving
Files - Get Details of Files — detail:
Name - Get Text from Input — Input:
Shortcut Input - Make Snapshot — Code:
Text, Title:Name - Save File — turn off
Ask Where to Save
Re-render a folder of snippets
Keep your snippets as plain files and regenerate every image after changing theme, which is what you want for a blog or a documentation set. Each snapshot is named for its source file and stamped with the time, so nothing overwrites anything.
- Get Contents of Folder — your snippets folder
- Repeat with Each
- Get Details of Files — detail:
Name, Input:Repeat Item - Get Text from Input — Input:
Repeat Item - Make Snapshot — Code:
Text, Title:Name - Save File — your output folder
What you can set
Only Code is required. Leave the rest blank and Make Snapshot uses whatever Codeshot was last set to, which is how one shortcut can quietly follow your taste while another pins its own look.
| Setting | Accepts | What it does |
|---|---|---|
| Code | Text | The source to render. This is the action's input, so it connects itself to whatever came before. |
| Title | Text | Shown in the window bar, and used as the start of the filename. |
| Theme | A theme name | Any of Codeshot's 30 syntax themes. Start typing to search. |
| Aspect Ratio | Original, 1:1, 4:3, 3:2, 16:9, 9:16, 2:3, 3:4 | Pads the image out to a fixed shape. Original lets the code decide. |
| Scale | 1×, 2×, 3× | Resolution of the exported image. 2× suits most screens. |
| Line Numbers | On or off | Shows the gutter down the left side. |
Worth knowing
Give each destination its own shortcut. One set to 16:9 at 2× for posting, another left on Original for a blog. Because the settings live on the action, they stop fighting each other.
Files name themselves. Every snapshot comes back as Title-2026-08-02-114830-727.png — the title, then the moment it was made, down to the millisecond. Batch runs never collide.
Add a keyboard shortcut in the shortcut's details pane and it works everywhere, including in apps that have no Services menu.
Action names vary slightly between macOS versions. If you cannot find one by name, search the Shortcuts sidebar for a word from it — the order of the steps is what matters.
Doing it by hand instead
If you would rather work in the app, the full workflow covers pasting, theming, and export. The sizing advice there applies to the Aspect Ratio setting above, and the per-platform guides say which ratio each destination wants.