{"slug": "show-hn-cc-preview-browse-images-pasted-into-claude-code-sessions", "title": "Show HN: Cc-preview – Browse images pasted into Claude Code sessions", "summary": "A developer released cc-preview, an open-source macOS tool that extracts and displays images pasted into Claude Code sessions, replacing placeholder text with a native preview interface. The tool uses Hammerspoon to provide keyboard-driven browsing and copying of images from AI coding sessions.", "body_md": "Browse and preview images pasted into [Claude Code](https://claude.ai/code) sessions — directly from your Mac.\n\nClaude Code displays pasted images as `[Image #N]`\n\nplaceholders. **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/).\n\n```\nbrew install Watari995/tap/cc-preview\ncc-preview install\n```\n\nThen press **Cmd+Shift+R** in Hammerspoon to reload, and open cc-preview with **Cmd+Shift+I**.\n\n```\nbrew install Watari995/tap/cc-preview\n```\n\nDownload the latest binary for your Mac from [Releases](https://github.com/Watari995/cc-preview/releases), then place it in your `PATH`\n\n:\n\n```\n# Apple Silicon\ncurl -L https://github.com/Watari995/cc-preview/releases/latest/download/cc-preview_darwin_arm64.tar.gz | tar xz\nsudo mv cc-preview /usr/local/bin/\n\n# Intel\ncurl -L https://github.com/Watari995/cc-preview/releases/latest/download/cc-preview_darwin_amd64.tar.gz | tar xz\nsudo mv cc-preview /usr/local/bin/\ngo install github.com/Watari995/cc-preview@latest\n```\n\nAfter installing the binary, run the one-time installer:\n\n```\ncc-preview install\n```\n\nThis automatically:\n\n- Registers a\n`SessionStart`\n\nhook in`~/.claude/settings.json`\n\n- Deploys the Hammerspoon script to\n`~/.hammerspoon/`\n\n- Updates\n`~/.hammerspoon/init.lua`\n\nThen reload Hammerspoon (**Cmd+Shift+R**).\n\n- macOS\n[Claude Code](https://claude.ai/code)[Hammerspoon](https://www.hammerspoon.org/)\n\n| Action | Shortcut |\n|---|---|\n| Open cc-preview | Cmd+Shift+I |\n| Filter sessions / images | Type to search |\n| Preview image | Enter or Space |\n| Close preview | Esc or Space |\n| Copy image to clipboard | ⌘C while previewing |\n| Go back | Esc |\n| Close everything | Click outside the window |\n\n- A\n`SessionStart`\n\nhook records each Claude Code session to`~/.claude-preview/sessions.json`\n\n`cc-preview sessions`\n\nlists sessions that contain images`cc-preview images <session-id>`\n\nextracts base64-encoded images from the JSONL transcript and caches them under`~/.claude-preview/image-cache/`\n\n- The Hammerspoon script calls these commands and renders a native macOS chooser UI\n\nEdit the `config`\n\ntable at the top of `~/.hammerspoon/cc-preview.lua`\n\n:\n\n```\nlocal config = {\n    copyMods = {\"cmd\"},  -- modifiers for copy shortcut\n    copyKey  = \"c\",      -- key for copy shortcut\n}\n```\n\nTo change the global shortcut (default **Cmd+Shift+I**):\n\n```\nhs.hotkey.bind({\"cmd\", \"shift\"}, \"I\", showSessions)\n```\n\nMIT — see [LICENSE](/Watari995/cc-preview/blob/main/LICENSE)", "url": "https://wpnews.pro/news/show-hn-cc-preview-browse-images-pasted-into-claude-code-sessions", "canonical_source": "https://github.com/Watari995/cc-preview", "published_at": "2026-06-25 09:39:04+00:00", "updated_at": "2026-06-25 09:43:49.380001+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "large-language-models"], "entities": ["Claude Code", "Hammerspoon", "cc-preview", "Watari995", "macOS"], "alternates": {"html": "https://wpnews.pro/news/show-hn-cc-preview-browse-images-pasted-into-claude-code-sessions", "markdown": "https://wpnews.pro/news/show-hn-cc-preview-browse-images-pasted-into-claude-code-sessions.md", "text": "https://wpnews.pro/news/show-hn-cc-preview-browse-images-pasted-into-claude-code-sessions.txt", "jsonld": "https://wpnews.pro/news/show-hn-cc-preview-browse-images-pasted-into-claude-code-sessions.jsonld"}}