00:00:00This is Cmux, a terminal built for coding agents that gives them the ability to open
00:00:04and control a browser, create sub-agents in different panes, send you custom notifications
00:00:09and much much more through a CLI and a socket API.
00:00:13But with so many other terminal agents like Warp, Solotam and Dmux, what makes Cmux so
00:00:19special?
00:00:20Hit subscribe and let's get into it.
00:00:24Despite its name, Cmux has nothing to do with tmux, it's a native Mac app built on top
00:00:30of libghosty that uses a webkit browser and bond split for the layout, so tabs, panes and
00:00:36so on.
00:00:37But the real magic lies in the way the agent communicates with the app.
00:00:41Let me show you.
00:00:42So after installing Cmux and setting it up, we should see a regular looking terminal that
00:00:46supports tabs, we can do splits, either vertical or horizontal ones and we can have tabs inside
00:00:53those splits if we want to as well.
00:00:55Now with Cmux installed, we should also have access to the Cmux CLI, which gives us options
00:01:00for a bunch of things like creating a new workspace and new split panes, showing information like
00:01:06logs and progress in the sidebar and even using tmux compatible commands.
00:01:11All this is thanks to the Cmux Unix socket, which we'll talk about later.
00:01:15But let's do something interesting.
00:01:16First, I'm going to clear this, I'm going to open up called code, which we can see has
00:01:20now changed the sidebar title, we'll change the model to haiku, so that I don't waste
00:01:25any tokens.
00:01:26And then I'm going to ask Claude to use the Cmux CLI to open the browser in a new split
00:01:30pane, then navigate to google.com, type hello world into the input and do a Google search.
00:01:36So if I hit enter, then Claude will do his thing.
00:01:38And here it's learning how to use Cmux.
00:01:40It's opened the new tab to Google.
00:01:42And let's see if it does the search.
00:01:44Okay, it's starting to struggle.
00:01:45And it's done search for hello world.
00:01:47And it's done the search perfectly.
00:01:49And I can even ask it to click on links.
00:01:51So let's say I wanted to click on this IMDb link over here, I can say click on the hello
00:01:55world link from IMDb.
00:01:57And Claude will go ahead and do that.
00:01:59What's really cool is that even inside this split pane browser, I have access to the developer
00:02:04tools, which will help to debug pages that I'm working on.
00:02:07All this is done with browser commands that is similar to the API design of the cells agent
00:02:11browser.
00:02:12So the benefit of having this side to side browser terminal view is that the agent can
00:02:16navigate through the browser, do testing and send back its results, which you can see as
00:02:20a developer in real time.
00:02:21Let's try something else.
00:02:22I'm going to close this tab, clear all this information.
00:02:25I'm going to ask Claude to create two instances of itself in split panes, one to understand
00:02:30the project, and another to analyse the code of this project.
00:02:33And when they're done, they should give the information back to the main Claude instance,
00:02:38and then close the panes.
00:02:39So if we hit enter, it creates two split panes, and then it opens Claude in both of them.
00:02:45And now we can see it's giving them instructions, which is wild to see in real time.
00:02:50Now the panes that aren't selected are a bit dark, so we can click on them to make
00:02:53them brighter.
00:02:54I'm going to fast forward this part of the video since it's going to take a while.
00:02:57And now that both splits are done, Claude has closed them automatically and has got information
00:03:02from the first instance here and the second instance down here, which is very cool.
00:03:07And you can imagine so many uses for this for checking permissions on different sub agents
00:03:11to make sure they don't get stuck.
00:03:12But one problem with the demo I just went through is that whenever one of them had a
00:03:16notification or needed my help, there was no easy way for me to know that.
00:03:21But luckily Cmux makes that easy.
00:03:23Let's try something else.
00:03:24In a new Claude code session, I'm going to give it a prompt to create a new instance of
00:03:28Claude in a split pane using Cmux and then in that plane, ask it to study and suggest
00:03:33code improvements for this project.
00:03:36Once it's done, write an appropriate notification using Cmux and run trigger flash to get my
00:03:40attention.
00:03:41Press command activate a blue flashing border on the specified pane.
00:03:45So while that's going, I'm going to create a new workspace and in here I'm going to run
00:03:48open code.
00:03:49Now the beauty of Cmux is that because it's a CLI, it can run with any agent harness.
00:03:54And just as I finish opening open code, we can see we have a notification from Cmux.
00:03:58If I click on the bell, we can see the parallel analysis has started, so it hasn't quite finished.
00:04:03But if I click on the notification, it shows me the right pane that has the information.
00:04:07Now it didn't quite do what I asked it to, so I'm going to tell it to do it again.
00:04:10And while that's going, let's actually go back to open code and do what I was going to
00:04:13do originally, which is to use the Cmux CLI to add the name of the project branch and use
00:04:19an appropriate icon next to the name of that branch.
00:04:21Now I'm going to hit enter and let it do its thing and we can see we have a notification
00:04:25from Cmux, which is the parallel analysis has started and it looks like it started properly
00:04:29this time.
00:04:30We can even see the message inside the sidebar.
00:04:32So now it's done.
00:04:33I'm going to ask it to close the split pane and clear the sidebar text.
00:04:36And we can see here it added the name of the branch with an appropriate icon and earlier
00:04:40I said SF icons, but I actually meant SF symbol, so I'm glad it's figured that out.
00:04:45And we can see here it's closed the split pane and removed the text that was inside the sidebar.
00:04:49Now all of these examples were really simple, but I hope it gives you a glimpse into the
00:04:52powerful things that the Cmux terminal can do when an agent has control over it.
00:04:57And I didn't even go through some awesome features like being able to use a progress
00:05:00bar, adding a custom colour to your workspace, using the agents to rename tabs, showing all
00:05:05the options in the command palette and the fact that Cmux can read and apply your ghosty
00:05:10configuration.
00:05:11Now I used Cmux without any hooks or skills and I disabled the sandbox in Claude code because
00:05:16I would have got this error, but I highly recommend you getting the core and browser
00:05:20skill for Cmux made by the creator and also setting it up with Claude code hooks to automatically
00:05:26send you notifications or even writing a custom script.
00:05:29All this makes Cmux much more useful, but I do wish there was an easier way to set this
00:05:33up from scratch instead of manually having to copy and paste the skills and notifications
00:05:38in place.
00:05:39Just like with skills.sh that automatically detects what agent harness you have and applies
00:05:43the skill to the right directory, I wish Cmux did the same to help with setting the whole
00:05:48thing up.
00:05:49But Cmux is already an awesome tool and I'm sure a setup script can be added later on.
00:05:53I really like the fact that it's a native Mac app which is good for memory and performance
00:05:58and the fact that the CLI communicates with the app via JSON through Unix sockets, which
00:06:02helps make communication fast and simple.
00:06:04Speaking of fast and simple, did you know there's a database out there 138 times faster than
00:06:10SQLite written in Rust called StoolLab, which you can learn all about in this video from
00:06:17Andris.