My Claude Code sessions kept ending with “here’s a link, go open it”, which drags you into another window. So I had Claude Code build a way for it to open things in iTerm2 panes right next to the chat: web pages on the side, images, video and music on top. How Claude Code was used: it wrote the whole thing over one long session (a dynamic browser profile, a pane-opening script on iTerm2’s Python API, a small localhost file server, and a viewer page), and now calls it on its own whenever it wants me to look at something. What I learned: - iTerm2 3.6+ has a built-in browser profile type. Almost nobody uses it. - The pane won’t load file:// URLs, so local files have to come from a token-protected localhost server. - Sound won’t autoplay until you grant audioPlayback in iTerm’s BrowserPermissions table. A keystroke sent through the iTerm API doesn’t count as the user allowing it. - A pane doesn’t load at all until it has been the active session once, so the script focuses it for a second and hands focus back. Full write-up with the code: https://blog.alastor.space/images-video-websites-and-media-directly-inside-the-terminal/ submitted by /u/VelvetMaverik
Originally posted by u/VelvetMaverik on r/ClaudeCode
