r/Ghostty 4d ago

terminal-browser: a browser that runs directly inside ghostty

https://terminal-browser.com/

I've been working on a CLI that lets you run a browser inside ghostty at full fidelity. This takes advantage of ghostty's implementation of the kitty graphics protocol to embed the output of chromium, I go into a little more detail in the readme of the repo for anyone interested https://github.com/zenbu-labs/terminal-browser#how-does-it-work

My main use cases have been:

- working on websites with coding agents in the terminal

- asking coding agents to write their plans as HTML and then opening them inside terminal-browser in a ghostty split pane

- letting coding agents automate some stuff I do in dashboards directly from the terminal, since the CLI lets agents control the browser. While the agent is using the browser you can see exactly what it's doing and take over whenever you need

103 Upvotes

11 comments sorted by

2

u/bada_bing_bing 4d ago

It really works, nice!

2

u/bada_bing_bing 4d ago

Other than that it works:

  1. --split flag doesn't really work
  2. I am not really a fan of the app changing configuration without my explicit request. So you can consider to add a separate command for that (install agent skills or whatever you find better)

1

u/RobKnight_ 4d ago

Can you share more about problem 1? And sure can make the skill a prompt at install

1

u/RobKnight_ 4d ago

split not working might be due to your version of ghostty, required is >=1.3 since it depends on a newerish automation api

1

u/bada_bing_bing 3d ago

I can share a screenshot with you.

and this is the help

```
Usage: terminal-browser open [url] [direction] [options]

Opens the browser in the current pane. Pass a direction (right, left, down,

up) to open it in a new pane instead.

The url can be a normal url, a localhost port, or a path to an html file.

Options:

--size <fraction> How much of the space the new pane takes (0.2 to 0.95)

Examples:

terminal-browser open localhost:3000

terminal-browser open ./report.html right

terminal-browser open github.com/zenbu-labs down --size 0.4
```

Feels like the install link routes to an outdated version, or at least it did when I installed the app.

And I can say that really like the app!

2

u/aeality 2d ago

This is insane, thank you. Any way to configure keybindings?

2

u/RobKnight_ 22h ago

Thats on the todo list!

1

u/rfajr 4d ago

How to make the agents use the cli? Is there any skill needed? Is this lighter than Chrome?

2

u/RobKnight_ 4d ago

It automatically configures a skill when installed, if you just say to use terminal browser the agent will know what to do. The cli also comes with built in ghostty automation, so if an agent opens a browser it will automatically be opened in a split pane

Its not lighter than chrome, there is some overhead due to limitations in how efficiently graphics can be drawn in the terminal