I put Claude Code in a browser terminal I built in Go | by Anup Shinde | May, 2026 | MediumSitemapOpen in appSign up<br>Sign in
Medium Logo
Get app<br>Write
Search
Sign up<br>Sign in
Member-only story
I put Claude Code in a browser terminal I built in Go
Anup Shinde
6 min read·<br>May 3, 2026
Listen
Share
Press enter or click to view image in full size
Claude Code, in a browser tab. The shell is real, the PTY is real; only the rendering is xterm.I built a browser-based terminal in Go as an example for godom: real PTY, real shell, rendered via xterm.js in the browser.<br>Then I ran Claude Code inside it. It just worked. No tweaks, no flags, no special handling.<br>This is also accidentally a really nice way to use a remote machine over Tailscale: scan a QR code and get a terminal in your phone’s browser.<br>Originally published at www.anupshinde.com<br>If you want to try it yourself, the godom repo has the example at examples/terminal/.<br>The “wait, what?” moment<br>The terminal example in godom is one of those things I built to test the framework. The pitch is simple: spawn a real shell with a real PTY, pipe its raw I/O to a browser, and let xterm.js render it. Around 250 lines of Go and a ~60-line JS adapter.<br>It worked. So I did the natural next thing: I typed claude into it.<br>The Claude Code welcome screen rendered. Colors, cursor, and the slash-command picker all worked (the screenshot above is exactly that). From Claude Code’s perspective, the PTY is real, $TERM is xterm-256color, the shell is the user's actual shell, and the only thing different is which process is reading the PTY's output and painting pixels.
Written by Anup Shinde<br>22 followers<br>·3 following
Programmer, Trader
Help
Status
About
Careers
Press
Blog
Privacy
Rules
Terms
Text to speech