TMux is the one tool that every single agentic engineer needs. Now what even is TMux? TMux stands for terminal multiplexer,
aka a tool that lets you run multiple terminals at once. But that's not all. The thing that makes it essential for AI agents is that it keeps your terminal alive even when you disconnect. So if your laptop dies, runs off of battery, if you wanna run slash goal in Hermes or Codex, or if you're doing a large refactor, all of these require your agent to run for multiple hours. Without Tmax, you really cannot do that. So if you're using Clothecode, Codex, Hermes, Py, or any other agent and you don't have TMux, you really are missing out. Now here's where it gets really op. While most vibe coders develop all their apps and projects locally on their MacBook, on their laptop, AgenTeq engineers use TMax running on a VPS to run multiple different agents at once for hours, sometimes days at a time. And by the way, all of the famous AI developers like Peter Steinberger, the creator of OpenClaw, or Mario Zechner, the creator of Pyre. All of them do this. So I would highly recommend you block out the next twenty minutes, sit down, and actually learn TMax. First, let me show you how to set it up locally so you get a taste of the power of TMax, but then I'm gonna show you the real deal, which is t max on a VPS and then SSH into VPS. Let me not get ahead of myself because I don't wanna overwhelm you. So first, open up a terminal. Any terminal is fine. If you're on Mac OS, you can use brew. But, basically, the way to install t max is very simple. Just type in brew, install t max. Boom. Just like that. And by the way, if you get stuck at any point in this video, just ask Chargibt or Clot. For example, let's say you're not on macOS and you're getting confused. Well, I'll show you how to solve that. Right? Boom. You take a screenshot of what I'm showing and you paste it into Cloth or into CherryGPT and say, help me set it up on Windows. I'm not on Mac OS. How do I actually install this? Be very concise. So don't make excuses. As long as you can speak English and have a Internet connection, you can absolutely do this. Let me jump back into the terminal, and then I'm gonna do clear and the t max dash v. Okay. We have the t max version. Beautiful. Let's do clear. And now I'm gonna give you the main command you have to know to start a new session inside of t max, which is t max new dash s and then the name of the session. So that could be testing or, you know, YouTube or subscribe. If you're watching this and you want more of these technical videos, make sure to subscribe. And boom. Here we are. You can see this green bar at the bottom. When you see it, that's how you know you're inside of TMux. What that means is that we can run a command, for example, like ping google.com,
which obviously will keep running and pinging Google. And then we can do the main keyboard shortcut, which is command b and d. This will allow us to detach. You can see detach, and we're back in the terminal, and we can do something else. For example, like p w d and any other command. We can launch Clothcode,
do whatever we want, but the magic is that session is still running inside of TMux. So when I kill Cloud Code here and I do clear, I can do TMux attach dash t and the name of the session which was subscribed, and boom. Here we are back. It's still pinging Google, still the same terminal session. It wasn't killed. So this is really the magic of TMux, and, obviously, it can do a lot more. For example, I am gonna show you here. Little sneak peek, you know, splitting it into two. We can, you know, do a lot of fancy stuff inside of TMux, all of which I'm gonna show you in this video. But the main idea is that these sessions are persistent. You can detach from them. You can reattach from them, and you can use this to manage multiple agents at once, which makes it ideal for the era of agentic engineering. Now when you want to close a TMax session, just type in exit
and then close the pane. So I'm gonna do control c to stop this Google ping and do exit to exit out of TMax. And to see all of your active sessions, just do TMax LS, and you can see that no server is running right now because we exited everything. Now to understand TMax, you have to understand these three essential building blocks, sessions, windows, and panes. And I think this graphic really explains it the We have the TMac session, which kinda wraps everything. Inside of a session, you can have different windows, and in each window, you can have different panes. A session is the whole workspace. Windows are like tabs in a browser, and panes are split screens inside of a single window. Now the reason this works is because TMacs can persist, spawn, read, and write terminal sessions programmatically.
This gives the agents the powers to read other panes. Otherwise, if you have two separate terminals, the agent cannot access the other terminal. But if you're using TMax, agents can see what the Azure agents are doing if they need to see it. So, basically, you can think of it as the substrate that the whole multi agent setup stands on. Okay. So I gave you a little teaser of how simple it is to install TMux locally and run it on a MacBook, but the real power is using it with a VPS where these agents are all running on a VPS so you can have the most shit computer possible with, like, two gigs of RAM. All you need to do is SSH into the VPS. You can run Cloth, Code, Codex, PIE, Cursor, CLI, OpenCode, anything you want on the VPS itself, and you can SSH through it through your MacBook, from your phone, and all the development is happening on the VPS inside of TMux. This is what all the top people are doing in AI development. I'm gonna show you how to do the same. So the first thing we need is a VPS. Now, personally, I run all of my VPS servers on Hostinger. It's one of the most affordable options, and it's super easy to set up. So I'm gonna leave a link to Hostinger below the video. Just click on this landing page, then click on choose plan and select KVM two. This is more than enough to run multiple AI agents in parallel. So here inside of the cart, make sure to select the period. I recommend going for twenty four months because every month that goes by, I have more and more VPSs, so that gives you the biggest discount. But, also, if you want an even bigger discount, go to the right and click on have a coupon code and type in code david. Hostinger was kind enough to sponsor this video. So if you use the code david, you get additional 10% off from your VPS. Then on the left, we can select a server location that's close to you and click on continue. This will redirect you to the checkout page, so the last thing that remains is filling out your credit card details and completing the payment. Now once you complete the purchase, you'll be redirected to your Hostinger panel where you can see everything about the VPS. If you don't see the screen on the left, you can click on VPS,
select the one you just purchased
right here, and click on overview. Here you can see all the stats, CPU, usage, memory, all that stuff. But what we are interested in is the SSH access. And, again, SSH is one of these terms that can be complicated. It definitely sounds intimidating if it's your first time using it, but all that means is accessing your VPS through your MacBook. Okay? So your computer, you just access your virtual private server. That's it. SSH is the protocol that allows us to do that. So what you need to do is copy this command, literally click on this button right here, open up your terminal, paste this in. It's gonna ask for the root password. If you didn't save that, which you should definitely save that during setup, but if you didn't, don't worry. Just click on here. You can easily change it, generate a secure one. Boom. Of course, do not share this with anybody. Otherwise, they can just access your VPS. So make sure to store this securely and click on confirm. And within couple of seconds, Hostinger will change your root password. So when you go into the terminal and you click in, paste it in, boom. Here we go. We are logged in into our VPS, SSH'd from my MacBook. Right? So I can control the virtual private server, but everything will be happening on this server on Lithuania. So even if my MacBook explodes, doesn't matter. All the agentic development is happening on the server, and I can connect from a new device from my phone. There's apps like Terminus, which if you want me to make a video on that, make sure to comment below. But this is the beauty of having a VPS. You eliminate the risk. You put everything on the server. You don't drain battery of your computer, and you can run heavy operations that would require an expensive computer. So if you don't have one, this is the way. But this is the way no matter what because more and more agents are running for hours. Last year, you know, the longest agent ran for, like, five, ten minutes. Now with features like slash goal inside of Codex and Hermes, agents can run for days, and you would have to keep your laptop or or computer powered on and awake for all that time. Otherwise, it interrupts. That's obviously very inefficient. So instead, we're gonna use t max on a VPS, SSH interrupt VPS, and run all of our development on there. So the first thing you wanna do is type in t max dash v to test if you already have t max. As you can see, we do, which is beautiful. It saves us some time. I think it comes preconfigured on Hostinger. But if you don't, I'm gonna show you how to install it. Type in a p t update to make sure you have the latest version. We can do clear and type in a p t install
t mux, and this will install t mux on your Ubuntu Linux VPS.
Clear. Do t mux dash v,
and as you can see, we have version 3.4. Now the next command you absolutely must run, nonnegotiable,
and that is to enable mouse support. So run this command echo set g mouse on. I know it's a pretty complex command. That's why everything from this video, I packaged it into a single bundle that you can just click. It's gonna be the second link below the video, and you can get all the terminal commands, all the presets, everything I'm gonna show you in this video completely for free. So, again, it's the second link below the video. Go grab it now. Okay. So we can type clear again, and we can start our first TMax session, TMax new dash s agents. You can name it agents. There we go. We can see the name right here at the bottom, and we can actually start doing some of the multiplexing, you know, using it to run multiple terminals at once. So for example, here we can do top to just get bunch of data about our VPS, Then we can do control b and then percentage. This will split it horizontally. Right? So, again, control b is the main command inside of TMux. The tricky part is that you have to let go after you run it. Okay? So it's not control b percentage. It's control b, let go, and then press percentage. Another thing you need to know is control b quotation.
This will split it vertically. Right? So same thing. Control b
to activate the shortcut and then quotation to split it. So here I can do, like, ping one one one one. This is the public Cloudflare server. And then if I want split it vertically, I can do control b quotation and have another terminal here, and I can do something else. You know? Pinggoogle.com.
Boom. And and with the mouse support, we can click around actually and, you know, split these terminals, and you you can do this on multiple levels. You can do control b percentage again. And look look at this. Look how many terminals we have running. Right? Isn't this beautiful? This is the magic of TMax. Also, can do exit to exit any of them. Right? So we can keep splitting
indefinitely,
basically.
Boom. Control b percentage.
And, yeah, each of these could be separate AI agent. Now we haven't installed any agent so far, so that is gonna be the next step. Installing Clothecode and Codec CLI on our VPS so that we're not just running some pings, but these are actual agents doing actual development work. So let me show you how to do that right now. So to install Codec CLI, just type in Codec CLI
and click on the open AI developers link. It's literally a single command. So just copy that. Boom. Back to terminal. We can actually exit some of these so we don't have so much mess.
This is why you enable the mouse support because without that, you actually cannot click. You have to do control b and arrows. It's very annoying. With mouse support, it's much easier. Also, another thing, we can do control b detach.
Right? So control b and d. And then if you wanna kill everything, that's t max kill server. So, actually, before I run that, I'm gonna do t max l s. It's gonna see, okay, agents one window, and, obviously, we can reattach, attach dot t agents,
and we're back in.
Beautiful. Just like that. But if you wanna kill everything, just it's kill server. Tmax kill server.
Boom. And now we do Tmax LS to list out everything. Nothing is running. Beautiful. So now just paste in the command from OpenAI docs to install Codec CLI. Let's run that. And it's especially powerful. I'm gonna show you ClosedCool as well, but, like, Codec CLI with the slash goal feature has been made for this. You really need a VPS to run this effectively because, otherwise, you need to keep your laptop or PC up at all times. Not just turned on, but awake. It cannot, you know, power off. It cannot be closed, all that stuff. So let's launch codex. So this is what it's gonna look like for you when you do it for the first time. Right? You type in codex, then you have three options, ChaiGPT device code and API key. Easiest is device code. I'm gonna click that, and then we need to copy this. Right? Copy this link
that the
terminal gives you. Go into your browser and then paste that in, and then you need to just log in to your ChaiGPT account. Alright. This is requiring two f a. Okay. Let's put that in. Boom. Now I'm gonna select my personal account because I have a ChadGBT pro plan,
the 200 a month, which is more than a team plan. But, honestly, it doesn't matter. Just make sure you have any paid plan.
And then back to the terminal, we have this nine digit code. Copy that. Paste it in. And we should be good. If we check here, we should be logged in. There we are. Okay. So hit enter. The first thing is to select the model, obviously. Right? The model, g p d 5.5 medium, that's a good baseline, and make sure to do slash fast
so that it is 1.5 speed
and send a test message, and it's working. Okay? So what we can do is to control c to kill this. We can do t max, new session,
maybe we can name it test.
As you can see, the green bar at the bottom means that we are inside of t max,
and I'm gonna do codex
dash dash yellow
to launch a codex. Then I'm gonna do control b percentage
to split the t max. There we go. And we can launch another one, codex dash dash yellow. And now you can feel the power. Right? You can have these codexes work on the same project, different features, or different projects. Now let's say I click in here, hey, and I'll do control b quotation marks, and we split it vertically. So here I can do another codex. Boom. Boom.
And this is how you run multiple agents on a VPS persistently. So I can do slash goal and say, build a full stack web app that is a clone of
reddit.com,
but built for AI agents, blah blah blah. Whatever you wanna do. Right? And this goal, it will run for hours. Maybe you can set a better end end state. The end state
should have all features
with unit tests,
and it should be, you know, including integrated database deployed on Cloudflare,
whatever you wanna do as the end state. But this slash goal feature can easily run for twenty four hours. If you wanted to do this locally, you would have to have your computer up for twenty four hours, which is very unrealistic,
and it would be eating your battery. It would be distracting you. You have to keep it open. You cannot accidentally close the tab. With t max, you can have multiple agents running at all times, and the best part is you can detach. So you can still use the same terminal. Command p d, and I'm detached. And I can still, you know, do, like, l s, you know, figure out what's there. PWE or come on the root level. I can see, you know, what's on the VPs. I can c d. I can make a directory. You know? Mm-mm. YouTube.
I can c d into YouTube. You know? And you can do whatever you want on the same BPS, and then always to t max l s. You can see, okay. It's named test. If you forget their name, that's helpful. You know? You can do t max l s to see the name of that session, and that's t max attach dash t test, and we're back in. And these agents will be running. That's the beautiful part. Now let's install Clothecode so you feel the power of having different agents running into t mux at all times. So just go to Google. Type in Clothecode
install. Clothecode CLI install. There it is. Click the first link. They also have a one liner installer, so just copy that. Back into terminal. Again, the detach, control b d. You need to learn this. Okay? You need to learn that command, control b d. It's essential. Paste that in. It's gonna install a Cloth Code CLI. And, And, actually, while this is installing, I should have run it inside of a t mux. That's a rookie mistake. Anyways, what we can do actually is I'm gonna do the same command that we just ran to attach into test, and I'm I'm gonna start this. Create a new deer
named
web app, and in there, build a full stack
web app with Svelte plus Vite that is for monitoring
flights using some free public API.
Build the full
thing
end to end. So this is gonna be running for five, ten, fifteen minutes. I don't know. But in the meantime, we can just do control b d, and we can continue using the same terminal because it's running itself t max. So we do t max l x.
We're gonna see that it's running, and then in the meantime, we can continue with the Cloth co install. So I'm gonna do Cloth, and we need to authenticate the same way we just did with Codec CLI. So with the subscription, console account, third and party platform. I'm just gonna go subscription. It's probably the easiest. Obviously, you don't have cloud subscription, use the API or something. Boom. Paste that into our browser here. Authorize. Need to copy this code.
Paste that here, and we should be good. Enter.
Enter.
Enter. And we're here. Let's do slash model to select model we want. Okay. Opus is by default.
Let's send a message. Hey. There we go. So that's how easy it was to install both Codec CLI and ClosedCode CLI, but we're not interested in this. What we're interested in is running TMax. So let's do again Tmax attach dash t test. As you can see, this agent is running. It did a bunch of stuff in the meantime. Also, by the way, the reason you need to do the mouse command, which, again, is gonna be in the bundle with everything else shown in the video, go get that. It's the second link below the video. It's completely free, so get it. I'm gonna email you all that stuff, including the mouse link because you need to enable a mouse. Without that, you cannot scroll. You can't even scroll on Tmax. You have to do everything by hand as these, like, try hard DevOps experts who have mastered every single Linux shortcut do. I mean, shout out to them because without them, tools like this wouldn't exist, but, you know, we're not as cracked as them. I still wanna use my mouse to just click around and scroll around, so definitely enable that command. But as you can see, this agent has been running, and we can, you know, maybe kill this one, control c, and instead do cloth dash dash dangerously
skip permissions.
It cannot be just whatever. Just normal cloth. And we can say,
run l s and tell me all the dears
we have. And we can have this development running on the VPS permanently even when I close my laptop. And, we can use apps like Terminus. If you don't have Terminus on your iPhone, definitely get it. It allows you to SSH into your VPSs and manage them through your phone. So, you know, if you have, like, a Hermes agent running or OpenClaw running and they crash, sometimes you're not on your computer. Right? So you can easily fix them from your phone if you have Terminus.
But the main thing is you need a VPS. If you don't have a VPS, you cannot SSH into it. So really moving more and more of your stuff, your your information, your agents, your development work onto a VPS is the future. So you either wait until it's obvious and then you're gonna be the last mover, or you do it now and you're one of the first movers because most people still don't know how to use it, especially vibe coders. And stuff like this is really the difference between vibe coders and enchanting engineers. People who actually embrace software, they embrace all the tools that exist, and they have the best possible setup to get the most work done in any given minute. You don't wanna be using ineffective tools. Right? And, again, this is running on our VPS and it's building the app. You can see that we have the web app. So I'm gonna say, go into the web app and explain what the state is.
Be concise. Yeah. So you can run a cloth code here. That's like more of a explainer adviser consultant.
You can run multiple coexes that are building different features. You can click here. Maybe this guy is, you know, lazy, so you can do a definite another section here. Cloth.
Okay. Maybe maybe this one is kinda weird. You don't like this LAI, so you can exit that and do control b percentage to split it horizontally and do a clot here. And this one, maybe it's taking up too much space, so I'm gonna do control b quotation mark, and maybe we can run another codex YOLO here. And this is the beauty of Tmax. You can run many agents at once in a clean user interface with easy switching. And if you need to detach, command b d, boom, detach. And I can start another TMax session. I can do TMax new dash s and maybe do a different web app. Maybe this can be a three d game. Okay. And now here we're gonna do another codex yolo. Let's actually do
It's the cloth, and I'm gonna do create a new deer named
game and build a nice three d web game in a single HTML file. And then I'm gonna do command p d, detach from this, I'm gonna do t max l s. We can see all of our sessions. We have three d game. We have test. So I'm gonna do
attach to the test one, see how this development is going. Okay. This guy is still running. Four minutes thirty. Uh, this guy already explained it. Let's see what's happening. It's real working.
Okay. We need to run it, improve the docs,
command b d, detach from it. We can do clear, t mux attach dash t,
three d game.
Let's see how this is going. It's still brainstorming,
thinking some more. That's a new feature in Cloud Code. Alright. So, obviously, we haven't launched with dangerous escape permission, so that's why it's asking for everything. But, yeah, you get the point. We have development running on a VPS.
My MacBook is running smoothly. You know? I can open up activity monitor. My memory is probably very low. I mean, I'm recording with OBS, that is gonna be taking up some time.
But,
you know, my battery is fine. If I was in a cafe and and wasn't connected to charging,
this would be a complete game changer. My battery wouldn't run out. Everything's running on a VPS. If my Internet gets disconnected,
my agents keep running. If my laptop runs out of memory, my agents keep running. If I need to close my laptop, the agents keep running.
There is a massive difference between people who don't use t max and who do use t max. T max on a VPS is nonnegotiable. I'm certain of it. And, uh, everybody in 2026 will have to adopt this or just not be as effective.
Now let me show you the biggest thing, and that is completely killing the SSH. Right? So I'm gonna kill this to prove the point. I disconnected. So I'm on my MacBook, okay, on my desktop. I'm gonna launch a new terminal. I'm not even SSHed. So back to Hostinger panel. I'm gonna copy this again. Boom. Run it. I forgot the password to be fair, so I'm gonna reset it.
Boom.
Reset.
Put that in.
Let's do clear. This is completely fresh SSH. I killed everything, killed the connection,
but we can do t max l s. Oh, and we have sessions running. This is the beauty of t max, persistence
and the multi agent, right, in the in the user interface. Really, this is a it's essential. So now we can do, again, the TMax attach dash t test, and we're back. Even though I completely killed the SSH, we can see that the app is running here. PMReal. Okay. Flights. Okay. So I can ask, how can I see this app? I'm SSHed
into this VPS via my MacBook. I'm gonna give it the command. Here is the IP. Boom.
Give me step by step. Be very concise.
On the VPS, run this. Okay. So, actually, we can we can easily do it here. Let me let me click here. We can reuse some of these terminals. What is it? Yes. Allow. This cloud core is useless. I'm gonna control c to kill it, but I'm gonna run it here. CD root web app. Let's copy that.
CD slash root
web app.
What do we need do? NPM run dev dash dash dash dash host
zero zero zero zero.
There we go.
And then, uh, on the we need to run a on a MacBook command. So I'm gonna do control n to open a new terminal like this. And
just copy this command.
Okay. It's not copying. Now one caveat is when you copy something, you need to hold option while you select it to bypass the TMUX selecting.
Okay. So then we have to go to this IP address and the port five one seven three because it's a wide app. Five one seven three and just h t t p before this. Okay? HTTP
colon dash dash, and this should work. SSH tunnel.
So it needs the IP. So let's go back to hosting the panel, give it IP. Here is the IP.
Give me the
updated command.
There we go. Let's run it here. Needs the password. Let's give it that. So and then we can go new browser tab.
And here is our flight monitor built fully on a VPS. Look at it. And we can keep developing it. Right? So let's go back into TMax. And all of this was built on the VPS by agents running inside of TMax sessions, and now I can access it from anywhere. Right? We can push it to GitHub. We can deploy it to Vercel, to Cloudflare, add a super base back end, whatever we wanna do. But the main thing is, if I run a massive refactor like slash goal, refactor
the front end to be like
Balantir UI,
UX,
keep going until we have 20 plus working features
all using
OSS APIs
for different
global,
we could say, like, geopolitical
data. Boom. It's gonna be pursuing this goal for many hours,
developing our app and I can do whatever I want. I can go for a walk, I can go to the gym, I can go grab a coffee, and this development is happening. Even if my MacBook literally
gets shredded to pieces, even if it explodes,
it will still keep running because it's on the hostinger VPS
somewhere in Lithuania and the Codex will keep cooking on that app and the app is gonna be developed.
This is the future. Running t max on a VPS, you SSH into it. I know there is a lot of different terminology, but as you can see, it wasn't that complex. We were able to install
TMax and Cloth Cloth
Code very
quickly. We were able to set up a new VPS very quickly. I mean, hosting rates are easy. Codex CLI installation Cloth Code CLI installation was also very easy when you have the subscriptions. If you don't have the subscriptions,
why? It's $20.26. You just get a subscription on any AI tool. All of this can be set up within forty minutes, maybe sixty minutes if it is your first time. So now that you've watched this video, go ahead and actually do it. Because watching is useless before action. So this will already put you ahead of 99.9%
of people. Most vibe coders have nothing even close to this. They're completely scared of Tmax. They don't know what it does. They don't know how to set it up. They don't have a VPS. They're developing everything locally,
just confused.
If they close their laptop, all the all their development stops. Their agents aren't running for multipliers persistently on a goal. They don't even know what the slash goal feature is. Right? Whether it's inside of Hermes. When and even Clothcore has its slash goal. Right? You and we can say, like, build a new three d game shooter end to end. And all of this can be running on a single VPS. The whole the KVM two plan from all stinker is more than strong enough. And, again, if you don't have your own VPS, use the first link below the video. Get your VPS today because it's essential. No matter if you're running your automations,
your agents,
your deploy you can deploy your full stack web app on hosting VPS. You can do anything with a virtual private server. Store your files there. It's basically a computer that you don't have to worry about. It's managed somewhere that lives in a data center, and, you know, it's a virtual private server. That's what it is. So even if you're not a DevOps expert,
even if you're not a developer, grab yourself a VPS and start using TMax with multiple agents, building your software for hours at a time even while you sleep. Oh, and again, all of the resources, terminal commands, everything I showed from the video is bundled below. It's the second link in the description. So if you want this, go get it. It's completely free.