This is the devlog series about Clay, the malleable browser for power users I’m working on. If you want to start from the very beginning, with the background and the why, read Devlog #000.
I love building my own tools. As soon as I started working on thinking about building a browser, I immediately felt it would be a long journey of choices and trade-offs, but since I am my own user, the feedback loop would help me steer quickly, and hopefully, in the right direction.
Tech stack
Since this is the very first technical devlog, here is the tech stack behind Clay at the moment.
Clay is client-server (like tmux, Rex, X11 etc), and almost fully cross-platform. The user-facing app (which most people call “the browser”) is the only native layer.
Rust: the server, holds all the state, the terminals and the commands
Rust: the CLI, drives everything from the shell or from AI agents
Swift and Obj-C++: the native macOS app embedding CEF
CEF (Chromium Embedded Framework): renders the web pages, I’ll talk about it in a second
libghostty: runs and draws the terminals
Lua: for plugins and config, each one in its own sandbox
JSON over a Unix socket: how the app, the CLI and the server talk
I knew that starting from scratch was close to impossible for a single person, with a crazy number of problems to handle. The folks at Ladybird are heroes, they’ve been working on it for years, and their goal is very noble, but different from mine.
My goal is not to focus on, or change, any part of the core: rendering, networking and the JS engine are not what drives me to build something new. I kept the door open anyway, the architecture is modular enough to allow for a change in the future.
I picked CEF with Alloy style (bare chromium core without any UI features) not without considerations.
I don’t have a fork of Chromium to maintain myself. it’s just a library so updates are simpler. It gives me the full DevTools Protocol and the same engine on every system and for every user. I get Chromium’s sandbox on for every page. It draws nothing, which is good, because the UI is entirely on me.
Although, the extension API doesn’t work with Alloy style, so Clay’s own Lua plugins aim to cover chrome extensions. Finally, no DRM (Widevine) out of the box for Netflix and similar. No native sync, no password manager or autofill for free, which are on me too.
The alternatives were:
A Chromium fork. What Brave, Vivaldi, Edge, Opera and Arc do. I could change everything but it would break things in a lot of places: focus, keys, fullscreen, popups, and I’d spend my time fighting Chromium instead of building what I want. Also, Chromium ships new stable versions often, and I’d spend time on merge conflicts. And of course they decide the product direction right where I actually want to have mine.
Electron. The fastest way to start, running everywhere and under the hood it ships the same Chromium core. Electron is a framework for apps: it puts Node/JavaScript/HTML at the center and the UI in HTML, and I honestly prefer to have more control and a native feel, more of a gut decision than anything else here.
WebKit (system webview). This is where I actually started the prototype. It’s light and ships with macOS so there’s nothing to maintain. It ties to it though, adding cost for another adapter layer, with bridges and pages that would behave differently. Most importantly WebKit doesn’t give me the protocol I need for each page to have its own proxy, or to block and rewrite requests on its own.
New engines like Servo. Made to be embedded and backed by the Linux Foundation. I excluded it for now (keeping the door open) just because it’s not yet mature in supporting every website and its devtools lag behind chromium’s.
Firefox. Can’t be embedded on desktop afaik, so it would mean a fork, like Zen, with the same pain as a Chromium fork.
Tauri. Uses the system webview, so on the Mac it has the same limits as WebKit.
First features: Windows, Tabs and Panes
I still haven’t shown any feature. Unacceptable.
Lack of pane was the very first pain. pun intended, sorry...
Browsers don’t natively give you much freedom to lay out, arrange and move pages and this was the first reason to build the very first prototype. Since I’m extremely addicted to doing as much work as possible without reaching for the mouse, the first step was to replicate the workflow I have in tmux and Rex.
The app, the CLI and agents all talk to Clay the same way: they send commands over a Unix socket, same for mouse drags, which become just a stream of commands. This way almost everything you do by hand can be scripted using the clay CLI. Each pane has one live view: break out a pane into its own window, or join it into another tab, and the page comes along without reloading, so scroll positions and filled-in forms are kept.
If you’ve used tmux, Vim or Rex, most of the keys will feel very familiar, anyway all of them are completely configurable as code in the config or through the UI with a precedence rule.
Clay has two kinds of bindings:
Chords/shortcuts like
cmd+t: single step, the most obvious one where you press all of them together.Sequences like
prefix>d: two steps, press the prefix (ctrl+aunless you change it), then hitd.
This is the core of the design principles I wanted to bring into Clay, there’s much more than this and I’ll uncover it all in the next episodes.
I hope you find it interesting or learned something. Don’t worry, I plan to open Clay as soon as I feel it’s ready, and to collect feedback and interest while I keep on developing it.

