WEBVTT

00:00:00.000 --> 00:00:03.520
Most AI coding tools still work like this. One task,

00:00:03.840 --> 00:00:04.960
one terminal,

00:00:05.040 --> 00:00:11.360
one conversation at a time. What if I told you you can code much faster because of one bottleneck,

00:00:11.360 --> 00:00:12.640
and that bottleneck

00:00:12.555 --> 00:00:19.995
is your attention. Today, I'm gonna show you how I use OpenCode to run multiple AI tasks in parallel, track usage,

00:00:20.395 --> 00:00:21.995
and stop babysitting

00:00:21.995 --> 00:00:22.875
terminals.

00:00:22.955 --> 00:00:26.315
This is a step by step tutorial and how I actually use OpenCode,

00:00:26.670 --> 00:00:28.030
a real workflow

00:00:28.030 --> 00:00:29.470
under real constraints

00:00:29.550 --> 00:00:45.925
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,

00:00:46.085 --> 00:01:00.290
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,

00:01:00.370 --> 00:01:14.705
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

00:01:14.705 --> 00:01:42.505
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?

00:01:42.585 --> 00:01:44.425
Here you see OpenCode is open,

00:01:44.745 --> 00:01:48.150
and I think of it basically as a task orchestration

00:01:48.150 --> 00:01:49.430
for AI coding

00:01:49.590 --> 00:02:03.735
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.

00:02:03.895 --> 00:02:04.775
Let it run,

00:02:05.175 --> 00:02:18.760
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

00:02:18.920 --> 00:02:20.040
from installation

00:02:20.040 --> 00:02:23.320
all the way to very advanced features with OpenCode,

00:02:23.560 --> 00:02:31.185
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

00:02:31.185 --> 00:02:35.905
one task at a time, and now I can do parallel task and run multiple

00:02:35.985 --> 00:02:38.785
agents coding at the same time. So my job now

00:02:39.105 --> 00:02:49.330
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

00:02:49.490 --> 00:02:56.610
or downloading the desktop app and even showing you how the web version works to connecting to all your different AI providers

00:02:56.865 --> 00:03:03.185
like Gemini, OpenAI, how to choose the free models and your paid models, choosing between build

00:03:03.505 --> 00:03:04.705
and planning,

00:03:04.705 --> 00:03:06.305
adding MCP servers,

00:03:06.305 --> 00:03:11.480
adding agent skills, and how to integrate it with tools like warp, and finally,

00:03:11.720 --> 00:03:22.040
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.

00:03:22.885 --> 00:03:29.045
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,

00:03:29.205 --> 00:03:32.245
and I'm using a Mac app, so I'm gonna download

00:03:32.725 --> 00:03:34.005
Mac OS

00:03:34.005 --> 00:03:38.670
silicon. Alright. It's downloaded. I double click on it and just follow the instructions,

00:03:38.910 --> 00:03:45.150
and you should be granted with a desktop app like this. Alright. The next option is that you can choose extensions.

00:03:45.470 --> 00:03:47.550
And if you're already using Cursor,

00:03:47.550 --> 00:03:50.510
Windsurf, or any of the coding IDEs, you just press install,

00:03:50.955 --> 00:03:54.795
and it'll get installed into those IDEs as well. Very simple.

00:03:54.955 --> 00:04:04.395
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

00:04:04.395 --> 00:04:07.210
give you basically an app with an interface,

00:04:07.290 --> 00:04:15.050
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.

00:04:15.530 --> 00:04:19.290
But some people prefer terminal because it's very focused,

00:04:19.835 --> 00:04:23.115
and if you're familiar with terminal commands, it can be faster.

00:04:23.755 --> 00:04:26.875
I actually like terminal because I found using terminal,

00:04:26.875 --> 00:04:31.355
for some reason, seems to be faster than using an IDE,

00:04:31.355 --> 00:04:48.910
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.

00:04:48.990 --> 00:04:56.205
If you're using macOS, you might use brew install. But if you're unsure, just run the curl command. So open your terminal.

00:04:56.285 --> 00:04:58.045
So you can go to terminal

00:04:58.125 --> 00:05:02.765
and open your terminal, but I use this different tool called ghosty. Same thing.

00:05:03.165 --> 00:05:09.770
Just type this in, enter, and it will do its magic. So those are the three options you can use to install

00:05:09.930 --> 00:05:10.730
OpenCode,

00:05:10.730 --> 00:05:18.945
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,

00:05:19.265 --> 00:05:20.465
open code web,

00:05:20.705 --> 00:05:35.050
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

00:05:35.130 --> 00:05:46.250
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

00:05:46.410 --> 00:05:51.795
the source code of your project is on the computer. A bit of pro tip on installing

00:05:52.035 --> 00:05:53.235
the CLI,

00:05:53.315 --> 00:05:59.155
command line interface, in the terminal is that sometimes you run into trouble. No worries. You can download a tool called

00:05:59.635 --> 00:06:05.400
warp dot dev, and what warp dot dev is is an AI agent for the terminal. So

00:06:05.720 --> 00:06:08.280
you can just copy and paste your command

00:06:08.520 --> 00:06:34.220
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,

00:06:34.860 --> 00:06:40.700
and go ahead and set it to dark. You can choose the font. You can also choose a theme, Dracula,

00:06:40.860 --> 00:06:41.660
Tokyo night.

00:06:42.425 --> 00:06:44.025
So pick whatever you want,

00:06:44.425 --> 00:06:51.305
and you have the option to turn on agents, permissions, errors, and you can also have a sound effect when your task completes,

00:06:51.785 --> 00:06:53.705
and you can also add in shortcuts.

00:06:54.185 --> 00:07:14.345
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

00:07:14.505 --> 00:07:34.230
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,

00:07:34.230 --> 00:07:37.350
and Anthropic. And usually when I'm planning, I would choose

00:07:38.275 --> 00:07:39.155
Claude,

00:07:39.315 --> 00:07:44.515
but recently Claude announced they don't support third parties, so I do not recommend

00:07:44.835 --> 00:07:48.035
using Claude with open code because you might get banned.

00:07:48.275 --> 00:07:58.670
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,

00:07:58.830 --> 00:08:13.315
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

00:08:13.315 --> 00:08:14.035
feature,

00:08:14.275 --> 00:08:15.875
then I would use codex.

00:08:15.875 --> 00:09:00.125
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

00:09:00.205 --> 00:09:09.325
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

00:09:09.645 --> 00:09:15.050
on a $20 plan. And I like OpenCode because it forces you to think about using

00:09:15.130 --> 00:09:21.530
which AI and which model is most appropriate for your task. Right? And I basically use

00:09:22.330 --> 00:09:23.690
Gemini for

00:09:23.930 --> 00:09:26.090
high level planning, and I use

00:09:26.410 --> 00:09:29.450
OpenAI once the planning is done to execute the code.

00:09:30.245 --> 00:09:32.885
And depending on the task, if it's complex,

00:09:32.885 --> 00:09:51.230
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

00:09:51.390 --> 00:10:05.155
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,

00:10:05.235 --> 00:10:06.835
I split them up into

00:10:06.995 --> 00:10:15.330
new sessions each one so that it saves me money and contacts as well. So a little trick that I use to save tokens.

00:10:15.330 --> 00:10:16.850
OpenCode comes

00:10:16.850 --> 00:10:21.730
with all these free options, but if you wanna be like me and connect to Anthropic,

00:10:22.095 --> 00:10:28.335
OpenAI, and Google, you need to connect to your provider. I'm gonna show you how to connect to different AI models

00:10:28.495 --> 00:10:30.415
in the OpenCode desktop app.

00:10:30.655 --> 00:10:31.935
You click slash,

00:10:32.655 --> 00:10:34.495
and then you go to model.

00:10:35.350 --> 00:10:40.550
And then on the top right, you can click on connect provider, and then you just choose

00:10:40.550 --> 00:11:04.720
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.

00:11:04.720 --> 00:11:07.840
And then you can see that I've connected to Anthropic,

00:11:07.840 --> 00:11:18.960
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

00:11:19.065 --> 00:11:20.185
the Chinese

00:11:20.265 --> 00:11:21.625
AIs because

00:11:22.105 --> 00:11:27.545
right now, in sixth place and seventh place, you have GLM 4.7,

00:11:27.545 --> 00:11:33.225
which is open source, and MiniMax, which is also open source. That's beating ChateaPT 5.2

00:11:33.385 --> 00:11:46.080
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,

00:11:46.080 --> 00:11:56.895
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,

00:11:57.855 --> 00:12:08.470
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.

00:12:08.470 --> 00:12:13.510
Just quick note that you never wanna pass your API keys or passwords into AI.

00:12:13.830 --> 00:12:20.595
And so this hack to do this is I need to create an API key for OpenCode from Perplexity.

00:12:20.595 --> 00:12:27.795
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?

00:12:28.660 --> 00:12:35.140
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.

00:12:35.620 --> 00:12:44.615
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.

00:12:45.175 --> 00:12:49.015
I'm gonna copy and paste. Okay. And now it's connected,

00:12:49.495 --> 00:12:59.580
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

00:12:59.740 --> 00:13:01.100
AI providers

00:13:01.420 --> 00:13:03.820
to OpenCode. Now I'm gonna actually

00:13:04.380 --> 00:13:07.260
show you how I actually use OpenCode.

00:13:07.660 --> 00:13:25.215
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,

00:13:26.020 --> 00:13:36.180
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,

00:13:36.260 --> 00:13:42.775
and we'll use that in a bit. And now that I've connected, I wanna first fix that bug. I'm going to

00:13:43.575 --> 00:13:44.375
attach

00:13:44.535 --> 00:13:47.495
the screenshot and say for the graphs,

00:13:48.295 --> 00:13:49.815
the time frame

00:13:49.895 --> 00:13:51.655
word is out of place.

00:13:52.215 --> 00:13:53.815
Can you fix it? And then

00:13:54.280 --> 00:13:58.280
I can click send. So it's using the attach image function,

00:13:59.080 --> 00:14:01.640
and I've chosen my model.

00:14:03.960 --> 00:14:07.320
While that is running, this will display and it's doing its magic.

00:14:07.785 --> 00:14:10.345
I'm gonna start a new session. I'm gonna plan,

00:14:10.985 --> 00:14:14.025
and I'm gonna choose Gemini, which is different model,

00:14:14.585 --> 00:14:19.065
and say, for my health analyzer app, I wanna add some gamification

00:14:19.065 --> 00:14:19.785
ideas

00:14:20.260 --> 00:14:30.500
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

00:14:30.900 --> 00:14:34.260
and kinda reward them for the when they actually do

00:14:34.575 --> 00:14:36.175
sync their data. So

00:14:36.495 --> 00:14:41.055
I'm gonna let it plan, hit enter, and you can see here that this is running.

00:14:41.455 --> 00:14:57.120
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,

00:14:57.120 --> 00:14:59.040
it it's showing you the progress

00:14:59.600 --> 00:15:01.760
and the time it's elapsed

00:15:01.920 --> 00:15:08.215
and also how much code is being changed with the plus sign and or how much is being deleted. You can see

00:15:08.535 --> 00:15:13.815
all the changes it's making in the code base. And when you see this blue icon,

00:15:14.535 --> 00:15:15.495
it means that

00:15:16.200 --> 00:15:19.560
the task has been completed. You can also turn on notification

00:15:19.720 --> 00:15:29.960
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.

00:15:30.695 --> 00:15:36.455
And now all three tasks are done, and let's see if it actually fixed the problem. So you see this

00:15:36.615 --> 00:15:40.135
is out of place. Let's turn it off and run it again. Alright.

00:15:40.455 --> 00:15:44.375
And the time frame wording is gone completely, and

00:15:44.880 --> 00:15:49.520
that's been fixed. So happy with that. And for the gamification,

00:15:49.600 --> 00:15:50.960
it's giving me

00:15:51.600 --> 00:15:53.440
some suggestions on

00:15:53.920 --> 00:16:04.655
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.

00:16:05.055 --> 00:16:09.935
Yes. Yes. Proceed with this plan, and then let's see what happens. So you can run

00:16:10.255 --> 00:16:14.320
multiple sessions at the same time, but let me show you something else.

00:16:14.960 --> 00:16:18.240
I don't have just one product, but I have multiple products.

00:16:18.880 --> 00:16:21.040
I can open another project,

00:16:21.360 --> 00:16:44.340
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,

00:16:44.660 --> 00:16:45.620
thirty day.

00:16:45.940 --> 00:16:49.460
Looking really good. I think I could do a little bit more

00:16:49.940 --> 00:16:53.300
by showing more than just three, seven, fourteen, and thirty,

00:16:54.095 --> 00:17:01.535
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

00:17:02.175 --> 00:17:02.975
and

00:17:03.055 --> 00:17:05.855
one of the secrets is that you can type the slash command

00:17:06.450 --> 00:17:11.890
and a lot of cool things show up. Okay. Let's start with the first command, is the init instruction.

00:17:11.970 --> 00:17:26.275
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,

00:17:26.675 --> 00:17:34.580
definitely worth running this command. And now it's running, and you can see that it's running some code style guidelines,

00:17:34.980 --> 00:17:37.460
formatting, naming conventions, error handling,

00:17:37.540 --> 00:17:43.380
and creating this agents dot MD file. And just to showcase this parallel

00:17:43.380 --> 00:17:48.205
feature, I'm gonna start a new session, and let's do the second thing, which is review.

00:17:48.205 --> 00:17:53.805
What does a review command do? It basically looks at your code, checks for security vulnerabilities,

00:17:53.805 --> 00:17:55.805
any potential bugs or issues

00:17:55.965 --> 00:17:57.245
or styling issues,

00:17:57.800 --> 00:18:10.200
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

00:18:10.635 --> 00:18:17.275
and you wanna remove that to keep your file size smaller. And here it's come back with some issues

00:18:17.355 --> 00:18:18.075
and

00:18:18.155 --> 00:18:26.650
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?

00:18:27.690 --> 00:18:33.290
And then here's the agents dot m d, and let's take a look. It's realized as an Xcode

00:18:33.530 --> 00:18:34.170
project,

00:18:34.410 --> 00:18:34.810
and

00:18:35.290 --> 00:18:36.810
it's just all these things,

00:18:37.545 --> 00:18:47.225
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.

00:18:47.545 --> 00:18:54.750
So useful to run and always initialize a new project. Okay. Next thing we're gonna do is look into MCPs.

00:18:54.990 --> 00:18:58.190
So you can toggle on and off your MCPs,

00:18:58.190 --> 00:18:59.870
and here I've added Playwright.

00:19:00.110 --> 00:19:16.695
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

00:19:16.935 --> 00:19:23.810
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,

00:19:24.210 --> 00:19:26.050
and then I need to add this

00:19:26.690 --> 00:19:29.010
to the configuration file.

00:19:29.330 --> 00:19:34.995
So if I come to open code, it says you have to add something like this to my configuration

00:19:34.995 --> 00:19:42.835
file. And now I have a hack here where I can use warp dot dev that I mentioned earlier, and I wanna say find

00:19:43.315 --> 00:19:52.840
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,

00:19:53.240 --> 00:19:57.960
and this allows me to kind of quickly find the global file. Once it's

00:19:58.040 --> 00:20:03.175
found a global file, I'm going to ask it to add this bit of code inside,

00:20:03.495 --> 00:20:14.935
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

00:20:15.610 --> 00:20:19.290
using Sublime note editor so I can add in the API key?

00:20:22.170 --> 00:20:24.650
So here you see that it's

00:20:24.650 --> 00:20:35.145
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.

00:20:35.305 --> 00:20:36.825
So I'm gonna generate

00:20:36.825 --> 00:20:39.785
that and put it in. I'm gonna label it open code.

00:20:41.465 --> 00:20:50.070
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,

00:20:50.070 --> 00:20:51.430
toggle MCPs.

00:20:51.590 --> 00:20:55.110
There you have it. 7 is added. Even though I added 7,

00:20:55.110 --> 00:21:00.550
I keep forgetting to call 7. You have to say use 7

00:20:59.925 --> 00:21:00.885
specifically.

00:21:01.285 --> 00:21:05.685
So inside the documentation, actually, suggests adding a rule.

00:21:05.925 --> 00:21:08.805
Always use 7 when I need library documentation.

00:21:08.805 --> 00:21:16.140
So how do you add this rule to OpenCode? So remember the agents dot m d file when we initialize the project?

00:21:16.540 --> 00:21:20.380
Well, we're gonna go do that. I'm gonna go to OpenCode and say,

00:21:20.700 --> 00:21:22.060
this rule

00:21:22.380 --> 00:21:23.420
to the

00:21:23.820 --> 00:21:25.235
agents dot

00:21:25.315 --> 00:21:25.875
d.

00:21:28.115 --> 00:21:40.650
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

00:21:41.050 --> 00:21:41.770
to

00:21:42.250 --> 00:21:47.290
improve your coding experience combined with rules. Now that we've gone through the desktop app, let's go through the

00:21:47.770 --> 00:21:57.705
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

00:21:57.705 --> 00:22:04.585
app you use. And the first thing I need to do is to open my directory. So I go to CD, go to projects,

00:22:04.900 --> 00:22:08.180
and then I drag and drop the location.

00:22:08.500 --> 00:22:11.700
This means change directory, and then it'll ask you to optimize

00:22:12.180 --> 00:22:12.820
and,

00:22:13.060 --> 00:22:14.660
of course, I do wanna optimize.

00:22:15.060 --> 00:22:30.685
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

00:22:31.005 --> 00:22:45.610
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.

00:22:46.010 --> 00:22:49.770
The desktop only gives me three options, but the terminal is way more powerful,

00:22:50.485 --> 00:22:59.445
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.

00:22:59.445 --> 00:23:00.565
Also, I

00:23:01.045 --> 00:23:02.165
type the slash button,

00:23:02.900 --> 00:23:05.460
I have more options to choose from.

00:23:05.780 --> 00:23:07.380
So I can choose a theme,

00:23:07.620 --> 00:23:08.660
so let's say

00:23:09.060 --> 00:23:11.140
Tokyo Night Solarized,

00:23:11.860 --> 00:23:13.220
I can go orange.

00:23:13.700 --> 00:23:28.255
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

00:23:28.415 --> 00:23:29.375
and run multiple

00:23:30.070 --> 00:23:39.750
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

00:23:39.910 --> 00:23:48.595
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

00:23:49.075 --> 00:23:56.115
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

00:23:56.595 --> 00:23:58.515
and I can open another

00:23:58.515 --> 00:23:59.315
project

00:23:59.520 --> 00:24:03.520
and I could have multiple sessions within that project as well.

00:24:04.000 --> 00:24:12.560
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,

00:24:12.560 --> 00:24:19.075
you can also add skills to your open code. So what are skills? Skills are reusable sets of instructions.

00:24:19.075 --> 00:24:20.035
So if you're

00:24:20.355 --> 00:24:21.795
running certain commands

00:24:22.275 --> 00:24:23.795
over and over again,

00:24:24.115 --> 00:24:29.160
it might be useful to turn it into a skill. So let's try to add that skill inside OpenCode.

00:24:29.160 --> 00:24:34.840
Can you help me create a skill for Xcode refactor patterns and help me add it to the skills.md?

00:24:37.640 --> 00:24:52.865
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

00:24:52.865 --> 00:25:02.740
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

00:25:02.740 --> 00:25:03.380
my

00:25:03.540 --> 00:25:04.900
Xcode refactor

00:25:04.900 --> 00:25:08.500
pattern skill and is now running the refactoring.

00:25:10.885 --> 00:25:16.005
Pick one for me and run it. And there you have it. It's running the skill. I wanna show you our commands.

00:25:16.645 --> 00:25:22.565
So what are commands? When you tap on the slash button, all of these options are commands,

00:25:23.520 --> 00:25:28.720
and you can add to them. So I think a useful command for me is git commit and push.

00:25:29.200 --> 00:25:33.120
So I'm going to try and add that. So I'm gonna copy

00:25:33.200 --> 00:25:42.505
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?

00:25:44.665 --> 00:25:50.905
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.

00:25:50.905 --> 00:25:52.745
This looks for git

00:25:52.825 --> 00:25:56.660
git push and there you have it. I have a new command.

00:25:57.140 --> 00:26:05.860
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.

00:26:06.260 --> 00:26:19.185
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

00:26:19.345 --> 00:26:26.080
to basic run open code on your computer but displayed on your iPhone screen. Now in this demo, I'm just gonna show you

00:26:26.560 --> 00:26:29.360
how to make it run when you're on the same network within this

00:26:29.920 --> 00:26:40.415
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

00:26:40.975 --> 00:27:04.995
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,

00:27:04.995 --> 00:27:06.275
and you need to enable

00:27:06.675 --> 00:27:18.380
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.

00:27:18.380 --> 00:27:23.820
You need to download the Termius app. So on your iPhone, search for Termius

00:27:24.185 --> 00:27:29.705
and download the free app. After you've downloaded Termius app, open it and go to hosts.

00:27:29.785 --> 00:27:31.865
Click on discover local devices.

00:27:32.665 --> 00:27:36.105
You should see your Mac here as long as you're connected on the same Wi Fi network.

00:27:37.100 --> 00:27:47.820
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.

00:27:48.300 --> 00:27:56.015
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

00:27:56.015 --> 00:27:59.135
when you're outside traveling on the bus or whatever

00:27:59.375 --> 00:28:01.615
using Cloudflare and split tunnels.

00:28:01.855 --> 00:28:08.620
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

00:28:09.100 --> 00:28:23.905
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.
