# Show HN: Cc-preview – Browse images pasted into Claude Code sessions

> Source: <https://github.com/Watari995/cc-preview>
> Published: 2026-06-25 09:39:04+00:00

Browse and preview images pasted into [Claude Code](https://claude.ai/code) sessions — directly from your Mac.

Claude Code displays pasted images as `[Image #N]`

placeholders. **cc-preview** extracts those images and lets you browse, preview, and copy them with a keyboard-driven native UI powered by [Hammerspoon](https://www.hammerspoon.org/).

```
brew install Watari995/tap/cc-preview
cc-preview install
```

Then press **Cmd+Shift+R** in Hammerspoon to reload, and open cc-preview with **Cmd+Shift+I**.

```
brew install Watari995/tap/cc-preview
```

Download the latest binary for your Mac from [Releases](https://github.com/Watari995/cc-preview/releases), then place it in your `PATH`

:

```
# Apple Silicon
curl -L https://github.com/Watari995/cc-preview/releases/latest/download/cc-preview_darwin_arm64.tar.gz | tar xz
sudo mv cc-preview /usr/local/bin/

# Intel
curl -L https://github.com/Watari995/cc-preview/releases/latest/download/cc-preview_darwin_amd64.tar.gz | tar xz
sudo mv cc-preview /usr/local/bin/
go install github.com/Watari995/cc-preview@latest
```

After installing the binary, run the one-time installer:

```
cc-preview install
```

This automatically:

- Registers a
`SessionStart`

hook in`~/.claude/settings.json`

- Deploys the Hammerspoon script to
`~/.hammerspoon/`

- Updates
`~/.hammerspoon/init.lua`

Then reload Hammerspoon (**Cmd+Shift+R**).

- macOS
[Claude Code](https://claude.ai/code)[Hammerspoon](https://www.hammerspoon.org/)

| Action | Shortcut |
|---|---|
| Open cc-preview | Cmd+Shift+I |
| Filter sessions / images | Type to search |
| Preview image | Enter or Space |
| Close preview | Esc or Space |
| Copy image to clipboard | ⌘C while previewing |
| Go back | Esc |
| Close everything | Click outside the window |

- A
`SessionStart`

hook records each Claude Code session to`~/.claude-preview/sessions.json`

`cc-preview sessions`

lists sessions that contain images`cc-preview images <session-id>`

extracts base64-encoded images from the JSONL transcript and caches them under`~/.claude-preview/image-cache/`

- The Hammerspoon script calls these commands and renders a native macOS chooser UI

Edit the `config`

table at the top of `~/.hammerspoon/cc-preview.lua`

:

```
local config = {
    copyMods = {"cmd"},  -- modifiers for copy shortcut
    copyKey  = "c",      -- key for copy shortcut
}
```

To change the global shortcut (default **Cmd+Shift+I**):

```
hs.hotkey.bind({"cmd", "shift"}, "I", showSessions)
```

MIT — see [LICENSE](/Watari995/cc-preview/blob/main/LICENSE)
