Claude Code + CMUX: The Ultimate AI Coding Terminal
By Better Stack
Summary
Topics Covered
- Agents Control Browsers via CLI
- Spawn Sub-Agents in Split Panes
- Custom Notifications Grab Attention
- Unix Sockets Enable Fast Control
Full Transcript
This is Semox, a terminal built for coding agents that gives them the ability to open and control a browser, create sub aents in different panes, send you custom notifications and much
much more through a CLI and a socket API, but with so many other terminal agents like warp, solit Subscribe and let's get into it.
Despite its name, CMAX has nothing to do with T-Max. It's a native Mac app built
with T-Max. It's a native Mac app built on top of Lib Ghosty that uses a WebKit browser and bondsplit for the layout.
So, tabs, panes, and so on. But the real magic lies in the way the agent communicates with the app. Let me show you. So, after installing CMOX and
you. So, after installing CMOX and setting it up, we should see a regular looking terminal that supports tabs. We
can do splits, either vertical or horizontal ones, and we can have tabs inside those splits if we want to as well. Now, with CMX installed, we should
well. Now, with CMX installed, we should also have access to the CMAX CLI, which gives us options for a bunch of things like creating a new workspace and new split panes, showing information like
logs and progress in the sidebar, and even using T-Max compatible commands.
All this is thanks to the CMOX Unix socket, which we'll talk about later.
But let's do something interesting.
First, I'm going to clear this. I'm
going to open up Claude Code, which we can see has now changed the sidebar title. We'll change the model to Haiku
title. We'll change the model to Haiku so that I don't waste any tokens. And
then I'm going to ask Claude to use the CMox CLI to open the browser in a new split pane. Then navigate to google.com.
split pane. Then navigate to google.com.
Type hello world into the input and do a Google search. So, if I hit enter, then
Google search. So, if I hit enter, then Claude will do its thing. And here it's learning how to use CMOX. It's opened
the new tab to Google. And let's see if it does the search. Okay, it's starting to struggle. And it's done search for
to struggle. And it's done search for hello world and it's done the search perfectly. And I can even ask it to
perfectly. And I can even ask it to click on links. So let's say I wanted to click on this IMDb link over here. I can
say click on the hello world link from IMDb and Claude will go ahead and do that. What's really cool is that even
that. What's really cool is that even inside this split pane browser, I have access to the developer tools which will help to debug pages that I'm working on.
All this is done with browser commands that is similar to the API design of the sales agent browser. So, the benefit of having this side to side browser terminal view is that the agent can navigate through the browser, do
testing, and send back its results, which you can see as a developer in real time. Let's try something else. I'm
time. Let's try something else. I'm
going to close this tab, clear all this information. I'm going to ask Lord to
information. I'm going to ask Lord to create two instances of itself in split panes. One to understand the project and
panes. One to understand the project and another to analyze the code of this project. And when they're done, they
project. And when they're done, they should give the information back to the main claw instance and then close the pan. So, if we hit enter, it creates two
pan. So, if we hit enter, it creates two split panes and then it opens Claude in both of them. And now we can see it's giving them instructions, which is wild to see in real time. Now, the panes that
aren't selected are a bit dark, so we can click on them to make them brighter.
I'm going to fast forward this part of the video since it's going to take a while. And now that both splits are
while. And now that both splits are done, Claude has closed them automatically and has got information from the first instance here and the second instance down here, which is very cool. And you can imagine so many uses
cool. And you can imagine so many uses for this for checking permissions on different sub aents to make sure they don't get stuck. But one problem with the demo I just went through is that whenever one of them had a notification
or needed my help, there was no easy way for me to know that. But luckily, Cmox makes that easy. Let's try something else. In a new Claude Code session, I'm
else. In a new Claude Code session, I'm going to give it a prompt to create a new instance of Claude in a split pane using CMAX. And then in that plane, ask
using CMAX. And then in that plane, ask it to study and suggest code improvements for this project. Once it's
done, write an appropriate notification using CMOX and run trigger flash to get my attention. The trigger flash command
my attention. The trigger flash command activates a blue flashing border on the specified pane. So, while that's going,
specified pane. So, while that's going, I'm going to create a new workspace. And
in here, I'm going to run open code.
Now, the beauty of CMOX is that because it's a CLI, it can run with any agent harness. And just as I finish opening
harness. And just as I finish opening open code, we can see we have a notification from CMOX. If I click on the bell, we can see the parallel analysis has started. So, it hasn't quite finished. But if I click on the
quite finished. But if I click on the notification, it shows me the right pane that has the information. Now, it didn't quite do what I asked it to, so I'm going to tell it to do it again. And
while that's going, let's actually go back to Open Code and do what I was going to do originally, which is to use the CMAX CLI to add the name of the project branch and use an appropriate icon next to the name of that branch.
Now, I'm going to hit enter and let it do its thing. And we can see we have a notification from CMAX, which is the parallel analysis has started. And it
looks like it started properly this time. We can even see the message inside
time. We can even see the message inside the sidebar. So now it's done. I'm going
the sidebar. So now it's done. I'm going
to ask it to close the split pane and clear the sidebar text. And we can see here it added the name of the branch with an appropriate icon. And earlier I said SF icons, but I actually meant SF symbol. So I'm glad it's figured that
symbol. So I'm glad it's figured that out. And we can see here it's closed the
out. And we can see here it's closed the split pane and removed the text that was inside the sidebar. Now all of these examples were really simple, but I hope it gives you a glimpse into the powerful things that the CMOS terminal can do
when an agent has control over it. And I
didn't even go through some awesome features like being able to use a progress bar, adding a custom color to your workspace, using the agents to rename tabs, showing all the options in the command palette, and the fact that
cmox can read and apply your ghosty configuration. Now, I used cmox without
configuration. Now, I used cmox without any hooks or skills and I disabled the sandbox in clawed code because I would have got this error. But I highly recommend you getting the core and
browser skill for cmox made by the creator and also setting it up with claude code hooks to automatically send you notifications or even writing a custom script. All this makes much more
custom script. All this makes much more useful. But I do wish there was an
useful. But I do wish there was an easier way to set this up from scratch instead of manually having to copy and paste these skills and notifications in place. Just like with skills.sh SH that
place. Just like with skills.sh SH that automatically detects what agent harness you have and applies the skill to the right directory. I wish Semox did the
right directory. I wish Semox did the same to help with setting the whole thing up. But Semox is already an
thing up. But Semox is already an awesome tool and I'm sure a setup script can be added later on. I really like the fact that it's a native Mac app which is good for memory and performance and the fact that the CLI communicates with the
app via JSON through Unix sockets which helps make communication fast and simple. Speaking of fast and simple, did
simple. Speaking of fast and simple, did you know there's a database out there 138 times faster than SQ Lite written in Rust called Stolap? Yeah, funny name.
which you can learn all about in this video from Andress.
Loading video analysis...