Most AI coding tools still work like this. One task,
one terminal,
one conversation at a time. What if I told you you can code much faster because of one bottleneck,
and that bottleneck
is your attention. Today, I'm gonna show you how I use OpenCode to run multiple AI tasks in parallel, track usage,
and stop babysitting
terminals.
This is a step by step tutorial and how I actually use OpenCode,
a real workflow
under real constraints
to ship faster without a team. I'm Keith. I built and exited companies, taken one public, and now I help solopreneurs and builders ship faster by turning AI into real systems. I've used pretty much all of the coding tools, Cursor, OpenAI Codecs,
Cloud Code. You name it. I've tried it. They're all good at generating code. None of them solved the thing that was slowing me down, running multiple tasks and knowing what's happening. So let me show you my old workflow. I'm subscribed to Gemini, Claude, and OpenAI,
and I used to open a terminal for each one. But the problem was when I try to run multiple tasks in three different windows, I don't know which one has failed, which one is done, and most importantly, I don't know how much credit I have left for each one. So multitasking
was a complete nightmare. What really ended up happening was I just had one window and I kept using it until the credits ran out, and then I switched to a different one. So I can only do one task at a time. After I switched to OpenCode, it really changed my world because now I can run multiple tasks in parallel and will tell me how much usage I've used. It'll alert me when a task is done, and I can run multiple models on the same project at the same time. Absolute game changer. Quick context, what is OpenCode?
Here you see OpenCode is open,
and I think of it basically as a task orchestration
for AI coding
instead of just one terminal and one task at a time. Here you see that I have multiple sessions going on, and for each one, I can choose a different model. So I can choose to run GPT 5.2 codecs for one task.
Let it run,
and I can run another session using Gemini three Pro. Let that task run as well. And when it's done, it'll alert me so I can run four or five different tasks at the same time, and that's what OpenCode does. I'm gonna go through the step by step instructions
from installation
all the way to very advanced features with OpenCode,
but it's important to understand some high level concepts. So why am I excited about OpenCode? It's because previously I was doing sequential
one task at a time, and now I can do parallel task and run multiple
agents coding at the same time. So my job now
isn't to watch AI work. My job now is to intervene when it's only needed. So what are we covering in this video today? We're gonna be covering from installing OpenCode as a terminal
or downloading the desktop app and even showing you how the web version works to connecting to all your different AI providers
like Gemini, OpenAI, how to choose the free models and your paid models, choosing between build
and planning,
adding MCP servers,
adding agent skills, and how to integrate it with tools like warp, and finally,
giving you a live demo of how I use it in my workflows, working on a project that's generating revenue and running multiple tasks. So the first thing you need to do is go to opencode.ai.
And the first option I'm gonna show you and the easiest one is to download the desktop app. So you can click on download now,
and I'm using a Mac app, so I'm gonna download
Mac OS
silicon. Alright. It's downloaded. I double click on it and just follow the instructions,
and you should be granted with a desktop app like this. Alright. The next option is that you can choose extensions.
And if you're already using Cursor,
Windsurf, or any of the coding IDEs, you just press install,
and it'll get installed into those IDEs as well. Very simple.
And then you have the option of installing it through the terminal. Now what's the difference between installing through an extension or downloading the desktop app? Extensions like Cursor
give you basically an app with an interface,
so it makes it easier to have visibility, run multiple tasks, gives you alert, gives you gives you a lot more information to work with.
But some people prefer terminal because it's very focused,
and if you're familiar with terminal commands, it can be faster.
I actually like terminal because I found using terminal,
for some reason, seems to be faster than using an IDE,
and you have all these options. Right? Curl, n p m, bun, brew, power. The most straightforward one is actually using this command, the curl command, because it will identify your operating system, and then it will choose the best option to install on your machine. Because if you're using Linux, you might use paru.
If you're using macOS, you might use brew install. But if you're unsure, just run the curl command. So open your terminal.
So you can go to terminal
and open your terminal, but I use this different tool called ghosty. Same thing.
Just type this in, enter, and it will do its magic. So those are the three options you can use to install
OpenCode,
and there's a hidden option which is you can run it on the web. So after you've installed it in the terminal, you just run this command,
open code web,
copy, and now it runs in my browser. So you can see that I can run open code there. Okay. So why would you wanna run a web version of open code? I think the most useful use case is where you want to run
OpenCode on one machine, on one particular machine, and you wanna access it using a different machine, maybe your mobile phone. And so you can connect to it, open a browser, and start coding away while
the source code of your project is on the computer. A bit of pro tip on installing
the CLI,
command line interface, in the terminal is that sometimes you run into trouble. No worries. You can download a tool called
warp dot dev, and what warp dot dev is is an AI agent for the terminal. So
you can just copy and paste your command
into warp dot dev. And if there's any issues, you can just ask AI agent to fix it for you, and it will fix all the issues for you and make sure you get it installed. And once you have installed, all you need to do is type in open code and voila, you're inside the terminal and open code is running. The first thing I wanna show you inside the open code app is the settings because everyone loves dark mode. So you can come here, go to appearance,
and go ahead and set it to dark. You can choose the font. You can also choose a theme, Dracula,
Tokyo night.
So pick whatever you want,
and you have the option to turn on agents, permissions, errors, and you can also have a sound effect when your task completes,
and you can also add in shortcuts.
So that's basic settings. Now I'm gonna go through some of the features that OpenCode has. Right here, there's three different options you can choose from. There's build and there's plan. And how I use it is that when I'm thinking of adding a new feature, I usually go into plan mode first before I build it. So then it thinks through the logic
and then it builds. Then you can choose your model. Now it comes with a lot of free models. GLM 4.7 is actually pretty good, and you can do a lot with free models already. But in the end, I think paid models are better, and I'd trade money for time any day of the week. Here, I've already connected Google, OpenAI,
and Anthropic. And usually when I'm planning, I would choose
Claude,
but recently Claude announced they don't support third parties, so I do not recommend
using Claude with open code because you might get banned.
So when I'm planning, Gemini is better at planning, and so I'm gonna use the most powerful one, which is Gemini three pro preview. And then thinking effort, I can click,
and I wanna set it on high because I wanna think carefully. And then when I'm ready with the plan, I click on build where it will actually start coding, and I would use either 5.2 or 5.2 codex. If it's more advanced
feature,
then I would use codex.
But if it's something simple like adding a button or just fixing a bug, I would choose 5.2. And if that fails, then I would use a higher context one. So being mindful of my token use. And thinking effort is basically how many tokens you wanna cap your request at. This is an interesting button and actually is a very important tool because it shows how much usage you have left. If you're like me and you're on a $20 plan, things run out pretty quickly, but if you're a $100 plan, it might take you a while to run out, but it's good to see how much context you have left. And another thing I do is sometimes I attach screenshots saying that some certain UI elements are out of place, and I would just screenshot it and attach that and say fix this or show the AI
what's being made. So those are the options here. I'm gonna take a second here to explain my model strategy because I'm subscribed to Claude, OpenAI, and Gemini
on a $20 plan. And I like OpenCode because it forces you to think about using
which AI and which model is most appropriate for your task. Right? And I basically use
Gemini for
high level planning, and I use
OpenAI once the planning is done to execute the code.
And depending on the task, if it's complex,
I'll use GPT 5.2 codec. If it's just, uh, like, a simple bug fix or moving a button, I'll use a lower model, and I'll set the token limit to a lower rate. So this is, like, representing the token usage. So this is a good thing to just get in the habit of choosing the right model and thinking about how many tokens you need for
what task. So another technique I use to save on my precious tokens is that, let's say I have three features. Instead of making it one long continuous chat one after another, which consumes a lot of tokens,
I split them up into
new sessions each one so that it saves me money and contacts as well. So a little trick that I use to save tokens.
OpenCode comes
with all these free options, but if you wanna be like me and connect to Anthropic,
OpenAI, and Google, you need to connect to your provider. I'm gonna show you how to connect to different AI models
in the OpenCode desktop app.
You click slash,
and then you go to model.
And then on the top right, you can click on connect provider, and then you just choose
the provider that you want. Let's say Google, and then you need to enter your API key. I'm also gonna show you how you can add models if you're using the TUI terminal app, and then I'll go into how you can actually get the API key easily with the help of AI agent without spending, like, ten minutes clicking around. Here, I've opened my terminal, and here I can type in slash, go down, and choose select.
And then you can see that I've connected to Anthropic,
OpenAI, and Google, but there's so many options here. This is the only tool where I've seen you can basically connect to everything that is out there. And I wouldn't underestimate
the Chinese
AIs because
right now, in sixth place and seventh place, you have GLM 4.7,
which is open source, and MiniMax, which is also open source. That's beating ChateaPT 5.2
and Gemini three Flash. So you can get pretty good results with these other options as well, and it's much cheaper to subscribe to them. So let's click on one of them. I have Perplexity, so let's click on Perplexity,
and then you enter your API key. And how do you do that? Well, I use a browser called Perplexity Comment, and what I can do is I can come here on the top right assistant,
and the AI agent will actually click around the interface and find the API key for me. So saving you time from clicking and trying to find all these API keys for Google or ChatGPT.
Just quick note that you never wanna pass your API keys or passwords into AI.
And so this hack to do this is I need to create an API key for OpenCode from Perplexity.
Can you set up the API key so that it goes up to the stage where the key is ready for me to manually copy and paste?
Please do not copy and paste it for me. So right now, I've given instructions to basically set up the API key, but don't copy it.
Stop there, and then I'll manually copy it and paste it into OpenCode. And now it should save you a ton of time in clicking around on interface. Okay. Now it's done.
I'm gonna copy and paste. Okay. And now it's connected,
and I can choose which one. And then now I should be able to go in Perplexity. I can choose Sonar, Sonar Pro, reasoning. So it's connected. So that's how you connect your different
AI providers
to OpenCode. Now I'm gonna actually
show you how I actually use OpenCode.
When you first come in, you're gonna open a project. If you're starting a new project, then you gotta create a new folder. And so I'm gonna open a project, and here I've opened my project. To give you some context, I have an app here, which is a health data analyzer app where you sync your health data and it gives you analysis,
and you can do AI analysis of your health data as well. So here you can see that I've got an issue here with this not displaying correctly. So let's take a screenshot,
and we'll use that in a bit. And now that I've connected, I wanna first fix that bug. I'm going to
attach
the screenshot and say for the graphs,
the time frame
word is out of place.
Can you fix it? And then
I can click send. So it's using the attach image function,
and I've chosen my model.
While that is running, this will display and it's doing its magic.
I'm gonna start a new session. I'm gonna plan,
and I'm gonna choose Gemini, which is different model,
and say, for my health analyzer app, I wanna add some gamification
ideas
to the products so it makes it more sticky, maybe adding streaks or something. But the end idea is to make sure people sync their data on a regular basis
and kinda reward them for the when they actually do
sync their data. So
I'm gonna let it plan, hit enter, and you can see here that this is running.
And, also, my other session is also running. So this is where multiple thing can run at the same time, I and can start another session and say, can you some ideas on how to improve the UI, UX of the product? I can run that too. And you'll see that if we check-in,
it it's showing you the progress
and the time it's elapsed
and also how much code is being changed with the plus sign and or how much is being deleted. You can see
all the changes it's making in the code base. And when you see this blue icon,
it means that
the task has been completed. You can also turn on notification
where it will show up on the top right of your Mac that a task has been completed. I turned it off because it was just popping up all the time, but if that's something you like, you can have it run as well.
And now all three tasks are done, and let's see if it actually fixed the problem. So you see this
is out of place. Let's turn it off and run it again. Alright.
And the time frame wording is gone completely, and
that's been fixed. So happy with that. And for the gamification,
it's giving me
some suggestions on
adding basically a badge and milestones, and I kinda like the idea. So let's try to build it. So I turn on the build mode right now. I'll switch back to GPT 5.2.
Yes. Yes. Proceed with this plan, and then let's see what happens. So you can run
multiple sessions at the same time, but let me show you something else.
I don't have just one product, but I have multiple products.
I can open another project,
and in there, I can also run multiple sessions. So I can be working on two projects at the same time, and each project can be running multiple sessions at the same time as well. So you can be running many, many things at the same time. Alright. And it's added the streaks, and so let's go back into the app, and let's check it out. And there it is. I've added a street count, three days, seven day, fourteen day,
thirty day.
Looking really good. I think I could do a little bit more
by showing more than just three, seven, fourteen, and thirty,
but no, it's done a good job. So looking very good. Okay. Now let's look into some of the more advanced features it offers
and
one of the secrets is that you can type the slash command
and a lot of cool things show up. Okay. Let's start with the first command, is the init instruction.
It creates an agents dot m d file. I would highly recommend doing this because OpenCode will read all your files and your folder structures and create a file that makes it more efficient to run-in the future. So if you wanna save your tokens and do more faster,
definitely worth running this command. And now it's running, and you can see that it's running some code style guidelines,
formatting, naming conventions, error handling,
and creating this agents dot MD file. And just to showcase this parallel
feature, I'm gonna start a new session, and let's do the second thing, which is review.
What does a review command do? It basically looks at your code, checks for security vulnerabilities,
any potential bugs or issues
or styling issues,
And it just goes through your code and make sure it's in a good state. And I run this from time to time and I also refactor my code from time to time if I'm adding a whole bunch of features. Because sometimes you might add in some code that's not used anymore
and you wanna remove that to keep your file size smaller. And here it's come back with some issues
and
that's great. You know, it's realized there's a issue in my current streak and, uh, it should fix that. I think it's a good idea to fix it. Can you please fix it?
And then here's the agents dot m d, and let's take a look. It's realized as an Xcode
project,
and
it's just all these things,
naming conventions, concurrency error handling. And so this this is actually really useful because in the future, it will reduce the tokens required to run my project.
So useful to run and always initialize a new project. Okay. Next thing we're gonna do is look into MCPs.
So you can toggle on and off your MCPs,
and here I've added Playwright.
It has ability to open a browser and pretend to be user and click around and do stuff for me using an AI agent. The MCP I want to add is Context seven and basically is an MCP that will help me save tokens again by allowing it to read API documentation and libraries
at a much lower cost than reading everything at once. So to use context seven, I need to sign up and generate an API key,
and then I need to add this
to the configuration file.
So if I come to open code, it says you have to add something like this to my configuration
file. And now I have a hack here where I can use warp dot dev that I mentioned earlier, and I wanna say find
the global open code dot JSON. That's where the configuration file is because I hate clicking around and finding the right directory and the right file,
and this allows me to kind of quickly find the global file. Once it's
found a global file, I'm going to ask it to add this bit of code inside,
and I will share the code in the description. You can get it there as well. I'm adding the contact seven MCP to the open code file, and then I accept the change. Can you open the file
using Sublime note editor so I can add in the API key?
So here you see that it's
added this to my config file, and all I need to do is copy and paste my API key. I signed up for contact seven, and I get, like, a free API key with a thousand requests.
So I'm gonna generate
that and put it in. I'm gonna label it open code.
Paste it in. Save. And then let's close and restart open code and see if it's added successfully. So I'll come here, MCP,
toggle MCPs.
There you have it. 7 is added. Even though I added 7,
I keep forgetting to call 7. You have to say use 7
specifically.
So inside the documentation, actually, suggests adding a rule.
Always use 7 when I need library documentation.
So how do you add this rule to OpenCode? So remember the agents dot m d file when we initialize the project?
Well, we're gonna go do that. I'm gonna go to OpenCode and say,
this rule
to the
agents dot
d.
And there you go. It's added the rule to the agents dot m d file, and from now on, it's gonna save me tokens and call contact 7 on its own without me calling it. And so that's how you add MCP servers
to
improve your coding experience combined with rules. Now that we've gone through the desktop app, let's go through the
terminal app and check out the command line interface. I'm gonna use warp here, but you don't have to use warp. You can just open terminal or you can use ghosty or whatever terminal
app you use. And the first thing I need to do is to open my directory. So I go to CD, go to projects,
and then I drag and drop the location.
This means change directory, and then it'll ask you to optimize
and,
of course, I do wanna optimize.
Okay. Now how do you bring up OpenCode? All you need to do is type in OpenCode and voila. You're in. So you can do the same things you can do on your desktop app, but now you need to use these keys. So control t allows me to control
the variant. So how many tokens kept? I can press tab to change agent, so planning or building, and then control p allows me to switch models. So I can choose and you can see that the desktop version allows me to have more selection.
The desktop only gives me three options, but the terminal is way more powerful,
Allows me to choose way more options than the desktop app. Super powerful stuff here. So that's why you would use the terminal because it's just got way more functionality.
Also, I
type the slash button,
I have more options to choose from.
So I can choose a theme,
so let's say
Tokyo Night Solarized,
I can go orange.
I'm gonna stick with the original because I like it, but you can change the color scheme. I can see the status and I can go to sessions and I can see all the sessions are happening right now. Right now, I can only run one task at a time. What if I wanna be like the desktop
and run multiple
sessions at the same time? Well, what I can do is I can go to split pane right and I can keep clicking it and open three or four panels
and then I do open code, open code, open code, and all of a sudden I have four tabs open and I can run four sessions
at the same time in the same project. What if I wanna run another project? Well, I can just click here and open a new tab
and I can open another
project
and I could have multiple sessions within that project as well.
So you can do the same thing you did in desktop app and run multiple sessions and agents at the same time as well. So much like Claude,
you can also add skills to your open code. So what are skills? Skills are reusable sets of instructions.
So if you're
running certain commands
over and over again,
it might be useful to turn it into a skill. So let's try to add that skill inside OpenCode.
Can you help me create a skill for Xcode refactor patterns and help me add it to the skills.md?
And now it's created a refactoring skill which is gonna help clean up my code and make it run better. To run the skill, would need to restart. I'm gonna close this, come back to open code. Yeah. Let's try it. Can you run the Xcode refactor
pattern skill? Alright. Turns out I'll I added an extra s to the MD file. It needs to be skill and not skills. Don't make the same mistake I made. So now it's recognized
my
Xcode refactor
pattern skill and is now running the refactoring.
Pick one for me and run it. And there you have it. It's running the skill. I wanna show you our commands.
So what are commands? When you tap on the slash button, all of these options are commands,
and you can add to them. So I think a useful command for me is git commit and push.
So I'm going to try and add that. So I'm gonna copy
open code dot a I doc slash commands. Using this as a reference, can you add a command called that git commits and pushes for me?
Let's see if we can add the command. So we successfully added the command so let's give it a shot. I open up OpenCode.
This looks for git
git push and there you have it. I have a new command.
Now I'm gonna show you an advanced feature. Imagine you can run OpenCode on your mobile phone just like this. I'm gonna show you how to do it using Termius.
Let's get started. So to run open code on your iPhone, you need to set up your Mac as a server where it's running the open code. Then you need to download Termius, the app, and connect VISSH
to basic run open code on your computer but displayed on your iPhone screen. Now in this demo, I'm just gonna show you
how to make it run when you're on the same network within this
in the same house or in the same office. If you wanna run it remotely while you're out and taking a bus ride or driving a car, you'll need to set up more stuff to create a
split tunnel so then you can connect remotely to your computer. But that's going to be another video because it's not easy at all. And if you're interested, stay tuned for my next video where I'll go through how to use Cloudflare to do that. But to get started, you need to set up SSH connection on your MacBook. So first thing you need to do is go to system settings, and then go to sharing,
and you need to enable
remote login. And then you need to add a user account. And when you log in, you just type in a name and the password you use to log in to your Mac. And now you've enabled remote connection to your Mac using SSH.
You need to download the Termius app. So on your iPhone, search for Termius
and download the free app. After you've downloaded Termius app, open it and go to hosts.
Click on discover local devices.
You should see your Mac here as long as you're connected on the same Wi Fi network.
Click on it. Click tick. Enter the username and then the same password you used to log in to your Mac. You should see a terminal, and then all I need to do is type open code and boom.
We've got open code running. Like I said, this only works if you're on the same WiFi network. I will produce another video to show you how you can connect remotely
when you're outside traveling on the bus or whatever
using Cloudflare and split tunnels.
Stay tuned for my next video. I hope you enjoyed this video and gained a better understanding of OpenCode. If you enjoyed the video, please like and subscribe
to my channel. If you wanna learn more about AI, feel free to join my free AI community. You can join my community for free inside the description. I also have a vibe coding course. If you wanna learn how to code, you can also find that inside my community. See you inside.