1011: Tmux + Terminal Maxxing With Ben Vinegar

š **Source:** [1011: Tmux + Terminal Maxxing With Ben Vinegar](https://share.snipd.com/episode/398ef192-a6eb-4b23-a8ee-29e776788f07)
## Highlights
- **Run Persistent Workspaces With Tmux**
- Use tmux to build persistent terminal workspaces you can detach and reattach from anywhere.
- Ben keeps multiple windows and split panes on a remote box so sessions survive disconnection and can be resumed instantly.
Transcript:
Ben Vinegar
And Tmux is a window multiplexer. There's other ones of these that are more modern, like Zellage. Zellage is a popular one. I played around with that. But I'll explain why Tmux maybe a little bit more later because there's some real advantages to it. Tmux is a window manager for the terminal. So that gives you a couple of things. Like one, you can actually create windows like panes. You can split the terminal just as you could split Ghosty or iTerm or even Chrome. You can split like inside a Chrome tab. You can split that now if you played around with that. So the same thing you can get on Tmux and then you can have like, well, I can have my coding agent on the left. So I can have OpenCode or Pi or Claude there on the left. And then on the right, I'll usually just have maybe just like a raw terminal, and I'll go into an editor, I'll look at a diff tool. And that's usually most of how I work. If I need to look at a server, I can also get to that via tail scale. Or often I'll just like build something and push it to a branch and let... I use Vercel a lot, like using Vercel preview branches do the work for me of like making, you know, if you have reasonable confidence in the agent today to build something somewhat correctly, You know, then I can go and take a look at the preview branch and poke around with it. If we're talking like a web project, for example, I'm building a lot of terminal stuff. So I just use that on the terminal.
Scott Tolinski
How is Tmux different than splitting your ghosty term? Because I use split panes in my term all the time. But what makes TMUX panes different than that?
Ben Vinegar
Two major reasons. One is that you can detach and reattach to your TMUX session from anywhere, whether that's Ghosty or iTerm or another computer, you know, in a different room. And I think that's really great because you end up, you kind of build a little workspace, you know? So I'll usually have five windows with different projects that I can kind of tab between. And there's commands that you learn for doing this. And each of ([TimeĀ 0:09:59](https://share.snipd.com/snip/9c9ea489-d3d5-4085-bb03-102be62a4862))
- **Tmux CLI Enables Agent Interaction**
- Tmux's CLI makes it automatable so coding agents can inspect, send keys, and read pane buffers.
- Ben uses tmux capture/send-keys so agents can read logs, scroll buffers, and debug live processes in other panes.
Transcript:
Ben Vinegar
Like an easier one to use. I've played around with it. Some people in this office here that use it. But the second reason why Tmux is this and not Zellige. Tmux has a CLI interface that's pretty cool. It allows you to inspect active sessions and to send keys and to manipulate them. So from one session, you can be like, hey, go read the logs in Tmux pane one. Okay. And now your coding agent just has to run a bunch of CLI commands, which looks something like Tmux space capture pane one. Tmux space, you know, send keys one. It can inspect the sessions. It can figure out which pane you're even talking about pretty effectively. I'm talking about using any coding agent you know open code plus like a like you know probably like a sonnet or uh you know even like a kimmy like you actually don't need a super smart model To do this i find like even kimmy k25 will do this totally effectively so that's valuable for a bunch of things. One, I don't know Tmux, man. Like, I didn't learn these keys. So like the first thing I did, and this was a total experiment, was give me a tour of Tmux to a coding agent. You're in a Tmux session, give me a tour. And it just started opening up panes and windows and being like, go check this out. I opened up this, I opened up that. And I'm like, wow. Okay. So you don't even need to learn the commands. If you just want to get started with this, you just got to start Tmux and you tell your agent, probably even figure it out that it's in one. And you can ask it what you want. Like I want this in this pane on the right, I want this. I want you to split the pane this way. You can just use natural language and you can get the environment that you want without being like an expert. Does that make sense?
Scott Tolinski
Yeah. Yeah, so it's AI. You can talk, you can control the term directly from your local agents. Yeah, that seems very useful to me. Okay.
Ben Vinegar
I couldn't get it to work with Zellige. This is one of the things where Tmux is like, I don't know, it's old, right? It's kind of old. But all that stuff gets baked into the models if it's old enough and popular enough. So they're really good at navigating it. So that's just for getting you started, right? Or I still use it because I don't know all the commands. I've gotten better at it. Eventually, you decide to learn the hotkeys. But I still reach for the agent to help me out. But I think more meaningful is thinking of Tmux as a superpower where your agent can just go and read these other panes. So I'm running a server in pane two. Okay, I'll go debug that by just reading that pane. And it can even scroll ([TimeĀ 0:12:40](https://share.snipd.com/snip/34cd2996-b5ec-4cc3-9d10-967e2e1e3f7a))
- **Let Agents Teach You Tmux**
- Let coding agents drive tmux with natural language instead of memorising hotkeys initially.
- Ben had an agent 'give me a tour of tmux' and it opened panes and explained the layout so he learned interactively.
Transcript:
Ben Vinegar
So like the first thing I did, and this was a total experiment, was give me a tour of Tmux to a coding agent. You're in a Tmux session, give me a tour. And it just started opening up panes and windows and being like, go check this out. I opened up this, I opened up that. And I'm like, wow. Okay. So you don't even need to learn the commands. If you just want to get started with this, you just got to start Tmux and you tell your agent, probably even figure it out that it's in one. And you can ask it what you want. Like I want this in this pane on the right, I want this. I want you to split the pane this way. You can just use natural language and you can get the environment that you want without being like an expert. Does that make sense?
Scott Tolinski
Yeah. Yeah, so it's AI. You can talk, you can control the term directly from your local agents. Yeah, that seems very useful to me. Okay.
Ben Vinegar
I couldn't get it to work with Zellige. This is one of the things where Tmux is like, I don't know, it's old, right? It's kind of old. But all that stuff gets baked into the models if it's old enough and popular enough. So they're really good at navigating it. So that's just for getting you started, right? Or I still use it because I don't know all the commands. I've gotten better at it. Eventually, you decide to learn the hotkeys. ([TimeĀ 0:13:49](https://share.snipd.com/snip/c799b1f5-13f0-4ba1-acb3-c926ae01c80b))
- **Terminal Apps Can Be GUI-Like With OpenTui**
- Terminal UIs can offer rich, mouse-driven interfaces using libraries like OpenTui, not just plain text.
- Ben builds sidebars, modals, and command palettes in terminal apps so they behave like lightweight GUIs over SSH.
Transcript:
Ben Vinegar
I really did not. Maybe just because I had no need. It never crossed my mind that I would ever have to do that. But it does. It works pretty good. It works over SSH. So not just, I think people have seen a lot more tui apps right like cloud code is the ultimate version of that it's clear that it uses um the mouse but it also works over ssh too uh because It's just like um ssh will like pass key codes back and forth that sort of represent where the mouse position is it works pretty well. So you can get GUIs over the terminal. OpenTui is a library that is what's under the hood of open code. So if you've used open code and you know that it's got these kind of like user interface mechanisms that you like, you can have like sticky components, right? You can have sidebars, you can have sticky footers, pop-ups, toasts, modals, like all of that stuff is actually very achievable. And OpenTui, you can write OpenTui apps in a variety of ways, I think React and solid. So for me as a web developer, I was like, oh, I can just write the things that I understand. And I get these UI components on the terminal. But it's all the stuff that I remember about on-click handlers and stuff like that. Does that make sense? Like render apps. So one, I think you're seeing a wave of new apps that use the terminal because this technology exists. That's cool. So a lot of things that I didn't think were possible a year or two years ago, and maybe they always were, right? It just took me to look. You can, you can scroll, you can use your mouse, you can do so much of this stuff. ([TimeĀ 0:18:34](https://share.snipd.com/snip/20cfc81e-277e-4442-9cb8-b7324f9759f5))
- **Isolate Agent Work On Dedicated Boxes**
- Run agents on separate remote boxes to avoid giving them broad access to your personal machine.
- Ben keeps dedicated Linux machines (e.g., a basement server) with limited personal data and uses TailScale for SSH access.
Transcript:
Ben Vinegar
Think it's worth, like, look, I like experimenting, so I've got a bunch of things. I have a framework desktop in my basement on Fiber that's running Omarchi that I keep up to date. And that I pretty much just use for coding. And then I think it's got like Steam games on there. Yeah. Because it's connected to a TV. Like, that's it. It doesn't it there's no i'm not signed into anything personal i guess you could drain my steam games or something like maybe in the worst case yeah get my team fortress skins or something
Wes Bos
But do you not want it to have access to to a lot of your things like that's that's why everyone went nuts over OpenClaus. People are like, I wanted to have access to my SMS and my Google Calendar. And I guess that's more like personal agent stuff versus like development.
Ben Vinegar
Yeah, it is more personal agent stuff. I haven't gone too deep in it. Look, we build an agent. I've built a full OpenClaw style, like open source agent that we run as well on a VPS. Yeah. That's exposed over Slack and everybody at Modem can use this. So I built some of that as well. I just, I accept that people get increasingly comfort with like YOLO mode or dangerous mode because 99.99% of the time, it's not going to do anything bad. ([TimeĀ 0:25:07](https://share.snipd.com/snip/403bd60c-2135-4d19-9f0e-83a400c382cf))
- **Gate Agent Actions To Prevent Missteps**
- Agents can misinterpret intent and take unwanted actions, so gate destructive capabilities.
- Ben recounts a modem incident where an agent opened a public GitHub issue instead of a private ticket, highlighting risk of 'YOLO' modes.
Transcript:
Ben Vinegar
And I just, like my position and the position of the company, for example, is we just, everything is gated. We don't just let agents go YOLO. A good example is early in Modem's development, we were working with a design partner. And what they had asked the agent to do was to create an issue for something that they were looking at. They were using GitHub, they wanted to. And so Modem is a, it's agent. It exists on the web in Slack. It's not unlike having an open claw for your team, but it just does product and project work. It also connects to some of your stuff like GitHub. So we had a customer who, our design partner, early on who wanted it to open up a ticket for themselves on GitHub. But because of the context, because of what they were talking about, it decided that what the user wanted was to go and open a public issue on an open source repository. So modem just went, you know, as you've probably seen people talk about, just went and opened like an open source ticket on behalf of this user, which is not what they wanted. Now, is that going and destroying your computer or like reading your emails or whatever? No. I think it's just that an agent can, it's very possible for an LLM to misconstrue your intent, right? Because if you said to an agent, depending on what agent you use, like, you know, go ruin my day and delete a bunch of stuff, it can do that with an asterisk that Claude will, I think has some Guards. It'll be like, I don't think that you should do that, but you know. So if you can logic, if you can like reasonably, if the agent can reason itself into a position, like it will go and do things that you don't want it to do i just don't see how that's like unavoidable Because to me it's almost like it's like talking to a human it's just possible like what's in your brain and what you want and how you communicate that to the llm on the other side like something Can be lost in translation it has nothing to do with the effectiveness of the llm or whatever this doesn't make it sense frequently i would say it almost, it often does, especially for
Scott Tolinski
Me because I make assumptions, right? Like, and like, why would you possibly have thought to do it that way? And then you go back and you read your prompt and you're like, oh, I, you know, there's so much innate things that I think that it knows when it's really like, it's doing what you told it To do. And if you didn't give it clear enough instructions, yeah, very easily get off track.
Ben Vinegar
So I don't know. I think I'm more sensitive than most. And maybe like we're also running a business. We hit the like, I think that the bar for us has to be higher. Yeah. Yeah. I don't want to write one of these tweets about, about torching my email. That seems bad. It seems bad for business. So to me, I just prefer to put everything in a position where it's like not even possible. Does that make sense? Yeah, totally. I don't know. Cautionary tales, you know? ([TimeĀ 0:26:43](https://share.snipd.com/snip/609e2b8e-38d7-4ad3-b26d-3957602f0f8e))
- **Agent Solved A Tough Linux Game Crash**
- Coding agents made Ben debug a gaming compatibility issue on Linux quickly by reading crash logs and suggesting commands.
- He had Googled for an hour but the agent found the Proton compatibility command fix in minutes.
Transcript:
Ben Vinegar
If you heard, I use Steam. The little sidetrack here, but I think this is fun because I use Steam. I use this framework desktop on Linux as like a gaming machine hooked up to a TV. Okay, yeah. It works because of all the work that Steam has done with this compatibility bit layer Proton for the Steam Deck. I had one for six months, didn't use it. But it works on Linux Desktop. I had a game that by all measures is very popular and should have run, but I couldn't figure it out at all. So coding agent, why isn't this game running? And it just started ripping, looking at all the crash logs. And after five minutes, it's like, oh, you got to run with this command and that should pave over this compatibility thing. Man, I Googled this for like an hour, you know, I just could not find anybody with the answer. I was shocked. I just want to make a comment that like coding agents make you doing stuff on Linux way more approachable. Totally. But at the same time, it's going and messing in. It's like, oh, let me fix this. I'm just going to go rip and write these system files and stuff. ([TimeĀ 0:32:30](https://share.snipd.com/snip/1a18d48a-ba83-4d9a-9ea9-d8764c1e9a10))
- **Use Hunk For Better Terminal Code Reviews**
- Improve terminal code review by using a responsive TUI diff viewer with agent hooks.
- Ben built Hunk combining diffs.com and OpenTui, with mouse support, responsive layouts, themes, and a CLI agents can drive for annotations.
Transcript:
Ben Vinegar
Yeah. So I mentioned like Fresh as like an editor that I think just makes it a little nicer to use on the terminal. I realized maybe like two months ago that I was suffering from AI psychosis. Oh, yeah. And I felt like a lot of people were two months ago because maybe like 4.6, Opus 4.6 has come out and we were all having a lot of fun generating lots of stuff. And I realized that, oh, no, I have not been paying as much attention to the code as I have been. And specifically, this is not for like modem, but I meant for like all my little open source thingies. You know, I was just kind of like, I was vibing more than I'd ever. And I realized part of it was, I just didn't really have a nice way to like look at the diffs, frankly, because of this like way that I had adopted. Like, you know, I was using the stock diff program. And then I started using, looking at different diff for Git that connect to the, like connect to Git. Like, I don't know if you've played with some of these, but Delta is one of them. Difftastic is one that's popular. It does like a more like syntax aware diff, which is kind of nice. Um, these are all like things that you can plug into get diff pager mode today. And you can do it on Mac. You can do it on Linux. And if you do use Git on the terminal, I use Git on the ā for some reason, I never let go of Git on the terminal. So that's where I started. But I was just never satisfied for a variety of reasons. One is I just didn't like their syntax highlighting choices. Also, a big one was they're not responsive. We're so used to responsive layouts on the web. Yeah. But terminal programs, not so much. And sometimes, depending on how you're working, I've got a split pane. I've got a really tiny surface area. I don't want split diffs. I want them to be stacked. But sometimes I've got a really wide area, and I want them to be split. And I couldn't actually find a tool that made that really nice. So it just wasn't nice, so I wasn't reading the code because it wasn't that nice. And then second of all, I was really interested in some of this new technology that had come out. OpenTui, mentioned earlier. And then Pierre Diffs, diffs.com.
Wes Bos
We had them on the podcast last week. At the time of recording, it hasn't even gone live yet.
Ben Vinegar
Was that Jacob? Who you got on there? It was another fellow. Yeah, we had Alex and Amadeus on. Okay, great timing. So that is a great library, and you're seeing it pop up everywhere. Anywhere, it's a great diff rendering library. I guess it's going to be on the show, but I understand that they were basically building a GitHub clone. I actually used that product to use modem in the early days. I could talk about that if you're curious. So I was already very familiar with their whole approach to diffs, and they put it out as a library, and it's meant for its web tech, right, primarily. But I was curious if you could plug it into OpenTui, right? OpenTui supports React. Diffs.com has a React output mode. And I was like, man, is it even possible that I could plug these two things together? We were running over like, how the hell is he doing this? So that's the, and then would it even make sense? Would it even look good? And the answer was yes. I had to do a lot of optimization. Like I've used the agents in like, you know, goal mode or auto research mode to like get the frame rate up. And I had people before I released Hunk, people were like, it's a terminal app. Why do you care about the frame rate? And the answer is yes. It does matter. So that's where Hunk came from. So you can check it out at, I don't know, show notes, but github.com/modem dash dev slash Hunk. You need a cool domain name for this.
Wes Bos
Take a page from the Pierre guys.
Ben Vinegar
We have modem, sorry. We, yeah, we have hunk.dev. I just got it. I just haven't put anything up there. Uh, you have got hunk. What? Oh, dot dev hunk.dev.
Scott Tolinski
That should redirect to my website, honestly. Oh yeah.
Ben Vinegar
It's a fun name too. I think that's a fun name. It's a fun name for sure. So anyways, it kind of works. And then after that, like this came out like two months ago, like I was using it quite a lot and i think that this is always like a nice thing is like when you're using software and you're Using it a lot right i know you guys work on stuff to maintain the pod right um you know just kept it just gets better so you know like the diffs look nice and i put in some themes like it just Looks nice i think relative to most of the solutions on the terminal and it has mouse support it has a sidebar with a file picker, and that's gone through a bunch of iterations. It's got some other interesting features. Probably the most notable one is it has a CLI totally ripped off from Tmux, which is that your agent can write and read to it, and it can navigate the session for you. So it takes rev ranges. So you can say like hunk diff main, like you can diff main, you can diff main at five, you can do a diff on a branch, or you can actually just ask the agent to drive it, just like you could Tmux. And it can leave annotations. So it's a more, not only is it I think like a kind of like a really nice diff viewer, also got this kind of agent integration via the CLI, which I think is kind of neat. So check it out. Hunk.dev. ([TimeĀ 0:34:08](https://share.snipd.com/snip/90963141-8be2-4886-84ef-e7c219c536b4))
- **Draw ASCII Diagrams With TermDraw**
- Use ASCII diagrams to communicate UI/layout intent quickly to agents instead of images.
- Ben's TermDraw draws movable boxes, connectors, and exports ASCII so agents can read diagrams and implement layouts faster.
Transcript:
Ben Vinegar
One. And this is in pursuit of a, you know, my pure portability pseudo-IDE terminal setup. The other one is TermDraw. I started experimenting with writing ASCII to agents quite a bit. Maybe because I started as a very young person on bulletin boards before I had the internet. I had a dial-up modem. I'm not that old, but just imagine a 13 year old you know connected to computers that he should not be um in the 90s uh like the internet existed but you could connect to like a local bulletin Board and so to me i really have this like headspace of ascii and antsy uh character drawing so ignoring the terminal like if i was using cursor or conductor or these other tools that I've Tried, have you ever had this experience with an agent where you're like, ugh, all right, you built this web thing, but look, can you take that button and you can put it to the left? You ever done that? And then it's like, oh, you mean over here? And it puts it in another location you're not happy with? And then you're like, no, like can you drop it a little bit and then maybe you'll share a picture like maybe maybe you'll take a screenshot and you'll like draw an arrow about like what
Wes Bos
You want have you done that i i i thought this was kind of interesting because you said in your talk you said like like why give it an image when it all it does is it converts it to text and when You can you can just give it a thing. And I thought like, I actually like, I find screenshots work almost better in some cases than like hooking it up to like a Chrome DevTools MCP. Oh, they totally do. Which is amazing. But like, I guess, Unreal, that visualness is better than the actual raw data of how something works. So is that true for diagrams as well, even if they're done in ASCII?
Ben Vinegar
My experience has been, so I guess I started experimenting with this where I would just draw, type it out. I would just like literally type out ASCII little diagrams and be like, look, I want the button here. And I found that to be pretty successful. And this is going back, you know, to December. So I was already down this path. And then at some point I'm like, why am I typing this out? I could just draw it. So term draw is like a terminal illustrator. Okay. You can draw shapes, you can draw boxes, you can put text, you can, you can write text. It's got now elbow connectors. I think I just added, you can have, when you're drawing boxes, you can use different borders. You can put like a dashed border to indicate something's temporary. And I say it's an illustrator because these are actually like objects that exist on the pane or like on the drawing surface. So once you draw a box, you can move it around. It's got baked in grouping. So if you want to, if you, if you draw like a window and you want to do like, Hey, I want a two column layout, you can resize things and they stay in, they stay in place. So it has some context about, Oh, I'm a box inside of another box. So if you want to drag things around, so it's got some kind of like nice things you can, you can grab the corners and resize stuff. Um, and even the text is like movable. So I've done all this basically so I could just like diagram out things that I want without having to explain it. Like I can open up term draw. I can draw what I want and be like, go and do this, you know, in 20 seconds versus having to type out, you know, well, I want a website with two columns and I want on the left side, I want this, Right? Instead, you can just really draw it out. And my experience has been that the agent totally reads this quite well. I've done a bunch of experiments. Opus 4.7, really good at ASCII diagrams. If you want to play at this, I feel like it really leveled up. ([TimeĀ 0:41:40](https://share.snipd.com/snip/4528781f-78fb-4b13-88c2-662a2c4b8d51))
- **Create Focused Agent CLIs For Repetitive Work**
- Build small, role-specific agent CLIs for repeatable tasks instead of brittle npm scripts.
- Ben's Podguy is a slimmed Py-based agent with focused skills for podcast editing tasks like transcript, cut suggestions, and interstitial detection.
Transcript:
Ben Vinegar
Actually, I just open sourced it in case people want to play with it. It's called Podguy. I can link to it. What's interesting about it is it's a bunch of extensions and skills. I think people have seen that. One of those, for example, is it'll download a whisper model and generate a transcript, but the skill file knows how to do it. Another one is I've, you know, find the boring parts to cut in this two-hour episode. It might have a two-hour episode that cuts down to 90 minutes, right? Just make some suggestions. One that's actually very helpful is by the end of the edit, Sam has inserted all these interstitials all over the place, and I just find it easier to be like, okay, pod guy, just find me Where all the interstitials are so that I can time code those for the YouTube description or whatever. And then it just goes and actually generates a bunch of frames and scans through them to figure out what they are and then goes back to the transcript and generates all these descriptions For me. So it does a bunch more. I think what's a little bit more interesting about it is it's the first time I've used Py. Py is loaded in the repository. And when you fire up the project, it's actually like a slimmed down Py where it actually kicks out all of the ā it doesn't bring in your skills or your extensions from your local development Or whatever. It almost only exists in this world to serve you and the podcast editing role.
Wes Bos
It's like a dev dependency of the project.
Ben Vinegar
Yes. And it's almost like an alternative CLI where instead of you trying to remember all the commands, which I'm never going to remember, it's very much like, here's the eight things I can Do. What do you want me to do? It's not there to write code. It's just there to actually like, almost like it's an agent dedicated to doing this. ([TimeĀ 0:53:23](https://share.snipd.com/snip/2c6760f4-d2e3-4d17-a5b8-737b6c4c6f62))