AI Engineer Guide

How to use Agentic CLI like Claude Code in Your Browser via ttyd

Today I learned about ttyd which lets you use your browser to interact with the CLI 2025-10-24-at-23.38.342x.png

I really like this approach.

I don’t need to switch to different app just to use interact with my terminal.

How to get started?

You can install ttyd on macOS using Homebrew:

brew install ttyd

For other OS, please refer to their docs

Once you’ve installed it, you can run ttyd by running the following command

ttyd [options] <command> [arguments...]

And these are the common command arguments

OptionDescriptionExample
-WEnables write mode (interactive mode). Without this, the terminal is read-only.ttyd -W bash
-p <port>Specifies the port number for the web server.ttyd -p 8080 -W bash
-c user:passwordEnables basic authentication to restrict access.ttyd -W -c admin:secret bash
--readonlyForces read-only mode, even if -W is used.ttyd --readonly bash

For interactive sessions (write mode), use the -W flag.

By default, it launches in read-only mode which might be ideal for viewing logs

For example, to run Claude Code it come like this

ttyd -W claude --dangerously-skip-permissions 

2025-10-24-at-23.32.322x.png

And now you should be able to access it your terminal and interact with it at http://localhost:7681 Except for things like not being able to upload images other things works perfectly.

If you pair it with VPN like Tailscale, you can access your terminal anywhere like even in your mobile.

Happy agentic coding!

#Tools #Claude-Code

Stay Updated

Get the latest AI engineering insights delivered to your inbox.

No spam. Unsubscribe at any time.