LongCut logo

OpenCode CRASH Course | OPEN SOURCE AI CODING AGENT

By Data Science Basics

Summary

## Key takeaways - **OpenCode Exponential GitHub Growth**: The red line for OpenCode shows exponential growth in GitHub stars compared to Cloud Code. [00:09], [00:19] - **Master One AI Coder to Switch Easily**: If you know one AI coding agent or tool, then it will be easier for you to switch between different ones because they are kind of similar and help solve things faster, easier, efficiently. [00:40], [01:03] - **Multiple Download Options Available**: You can download OpenCode via desktop app in beta on macOS, Windows, Linux, terminal with npm or brew, or VS Code extension. [06:45], [09:48] - **Two Core Modes: Build and Plan**: In OpenCode there are two modes: build mode and plan mode; the planning agent plans for you but does not write code already in your code base. [13:01], [13:20] - **Free Built-in Models and Providers**: OpenCode provides free models like Big Pickle, JLM47, Grok; you can connect any providers including local models from Ollama. [15:04], [15:24] - **Custom Commands with Small LLMs**: Create custom commands like build, run, test coverage and assign small LLMs with less variants for minor stuff while using big powerful LLMs for other tasks. [11:53], [12:15]

Topics Covered

  • Master One AI Coder to Conquer All
  • Open Source Frees Coders from Platform Locks
  • Fork OpenCode into Enterprise AI Gateway
  • Match Small LLMs to Minor Tasks

Full Transcript

Hello guys, I'm Sudharshan Kwedala and welcome back to Data Science Basics. If you are into the AI or LM field, then you might have heard about OpenCode. From GitHub,

the blue one is for Cloud Code and you can see the star history in GitHub. The red one is OpenCode. You can see exponential growth happening in

GitHub. The red one is OpenCode. You can see exponential growth happening in the OpenCode. The idea of this video is that I will be going through different

the OpenCode. The idea of this video is that I will be going through different elements in the OpenCode. And again, my saying is that if you want to learn some frameworks, you need to go with one framework. If

you know that, then it will be easier for you to get into other frameworks also. Similar to that, if you know one AI coding agent or tool, then

also. Similar to that, if you know one AI coding agent or tool, then it will be easier for you to switch between difference if you want to do it because they are kind of similar. At the end, they are trying to help us solve things faster, easier, efficiently. and what not. In this video as you can see this is the content let me take the laser pointer first I will show

you about this production page in open core what it is all about after that I will show you how you can download the open code because there are different ways you can do that and I have seen in many comments in Twitter LinkedIn and so on many people mention it the way of downloading different ways some prefer the desktop application some prefer the terminal someone even wants to have in the

in the VS code or Corsair or whatever it is the IDE I will show you those things after that I will be going through the commands because there are the inbuilt commands as well as you can create some commands this is the main part here the LLM providers in this case you don't need to be going with just one provider there are many providers and many of you in my previous reviews

also commented that okay how we can use the local models i will be showing you how you can hook the lms which you download from ulama into the open code i'll show you one example with that after that i will show you some of the configuration stops how you can configure different things mainly i'll be focusing on

providing you the default model because when you open open code Each time it will ask you to choose different models or they will be your default model provided by OpenCode themselves. But you can change that and create your own default

OpenCode themselves. But you can change that and create your own default model. Then you can just have that each and every time you open the OpenCode.

model. Then you can just have that each and every time you open the OpenCode.

After that, I will be showing you one example with the agent skills. The example

will be quite simple, but you will get the understanding how you can create the skills and use that in the OpenCode. And after that, I will be also going through the plugins because plugins help make the open code better. That is the way plugins work in different frameworks. So here also, with the help of plugins, you can

enhance the open code. I will show you one example, my open code. I will

show you how you can install and configure it. And then it's up to you how you use it. The second last one is about the tools because nowadays it will be calling different tools. In open code, there are some inbuilt tools. I will

show you how you can connect to one of the MCP remote MCP server. And

then also there is a way also how to create custom tools. I will show you in documentation how that is done. At last, I will show you how you can open the open code that you are using the terminal. Also in the WAV, you are not just sticking to the terminal. Maybe you want to have in the browser and so on. This is the content as you can see it might be

a little bit longer video than usual but I will provide the timestamps for all the different parts of the video. You can go to different parts if you wish to. If not I will be following this clockwise route here going from downloading until

to. If not I will be following this clockwise route here going from downloading until the open code. But before continuing the video if you are new to the channel and if you haven't subscribed please do so if you find the videos helpful. It

will help me motivate to create more educational video. in the future as you can see in the channel i create videos related to ai machine learning data science and all sorts of things so just to go through the channel if you find helpful then please consider subscribing now let's get into the main part here the first one is the open code and the introduction the open source ai coding isn't

right we are seeing all the way from the beginning when there are some kind of closed source models or llms there where the open lens also and now there are this closed and there is this open source ai coding agents this is the good part of having open source with open source developers or contributors will not be

tied to one platform you can contribute globally so it will be better and there are these free models included or connect any models from any providers when i will show you later when you download open code east there will be some llms already there provided but you can connect to different providers that's the idea

here and you can download different ways for palpadu brew bond npm call whatever you want to do in the terminal this is the way you can just pause the video or go to the website and read you can see any more details here links multistation lsp enabled cloud and all sorts of things you can even read the docs with over 70 000 github stars 500 contributors and

over 7000 commits open code is used and trusted by over 650 000 developers every month you can see these github stars contributors and developers using it you can just go here and see what is open code can i use the existing subscriptions what is called open source and so on this just

making it simple this bold things here make it quite easy this is one of the ai coding agent out of many there which is open source so you can use it for yourself or make it work in your organization because it's open source you can clone it or take a fork of it and make

it your company's ai coding agent and use your enterprise ai gateway or something you want to collect that is the introduction part i hope you get the idea here now the next thing is let's see how we can download you can see already here desktop app is available in beta on mac os windows and linux if you click this download now it will show you all the different possibilities to

download here is the open code terminal and there is this open code desktop which is in beta and open code extensions you can have that in vs code and there is this open code integrations in github and gitlab i'm not going to go through that but just go through that if you use github and gitlab because it helps you to do many stops directly in the workflow of the github or

gitlab that you can configure it but first thing first let's go with the terminal i have already installed in my terminal but you can choose any of the commands here but i will just choose the first one now let me open my terminal i will open the terminal and i will just paste it here i am in the desktop if i just to paste i have already installed this so it will

just go here it will say okay version 1.1.25 already installed right Once that is installed but if you haven't installed that before it will just take some couple of seconds and then it will be installed. Before opening the open code itself I can just open it. Now once that is installed you can just do open code and run enter. Now you can see this is the interface of the

open code. I will go mainly through this terminal part but before going into here

open code. I will go mainly through this terminal part but before going into here you can just do exit. That is one of the command but I will show you how you can do other aspects right. Now let's go into the open code desktop. You can just go here and click the download icons. It will download and

desktop. You can just go here and click the download icons. It will download and then that's it. I have already installed it. You can see open code here. And

once I open the open code, it says open code is an app downloaded from the internet. Yes, I want to open it. And once I open it, it is

the internet. Yes, I want to open it. And once I open it, it is opening in my another window. Let me just grab it here. I will just take it here. This is the desktop version of open code. You can take any branches

it here. This is the desktop version of open code. You can take any branches here. You can see here build. This is the models. I'm not going to go

here. You can see here build. This is the models. I'm not going to go through it now. But here you can just choose new work tree and start working into it. And you can even create here. You can see view all the sessions

into it. And you can even create here. You can see view all the sessions here. Recent session. This is the sessions. You can just go inside here and it

here. Recent session. This is the sessions. You can just go inside here and it will show you all sorts of things. This is how to use it as a desktop app. The third one is with the extensions. I'm going to show you with

desktop app. The third one is with the extensions. I'm going to show you with the VS Code. Let me open in the VS Code. I will go inside the OpenCode folder here because I cloned the OpenCode repository and I can open this now in VS Code. Once I open in VS Code, let me bring the VS Code

in this screen. This is the VS Code as you can see here.

And how to install? You need to go into the extensions here and just search for OpenCode. there you go this is the open code and i have already installed

for OpenCode. there you go this is the open code and i have already installed you can just disable and go into the uninstalling part and so on but once you install it if i open maybe one of the file let's say i will put this license one and you can see on the top right there is this open code in the new tab i can click this one now you can see

it is opening in the new tab here is the open code and then this is the tips being provided you can see it is showing all sorts of things now you can start experimenting with your code which is already here there are three different ways you can use any of the things i will terminate this for now but i'm going to show you from the terminal so it's easier or i will

be opening with the terminal but from this vs code itself let's continue from there let me go to the third one now let me show from here i can open this from the terminal here writing open code Or I will go in the VS Code so that I can see the files on the left side right here.

And I will just go on the top here and say terminal. You can see I have the terminal here and I will open the open code here.

Open code is being installed. And you can see that it's down here. One thing

you can do is click on this and make it in the editor. Now we

have the good looking open code here. I can make this smaller. Now let's go with some of the commands. i mentioned there are some inbuilt commands if you just go here and write slash you can see there are different different commands there there is the init which creates and updates the agent md there are many of those

so review and all sorts of things but before going into this i will show you the documentation also if i go here in the documentation i will go to the docs section here and if you go down on the left side you can see these commands click on the command spot here create custom commands and you can just create the custom commands like this and you can see there

are also custom commands are in addition to the built-in commands like this there is the init undo redo share or help these are the inbuilt commands if you want to create new commands just go here and create examples the good part here is that you can see here this is one of the example of this command and you can have this build as in Ron test coverage and you can provide even

the LLM to do those those tasks the good part of this is Not all LLMs or bigger ones needs to do the small things You can have small LLM With less variant let's say in that way to do some minor stuffs and you can have the big powerful LLMs to do other other

stuffs these are the things you can just go here and create a custom commands if you need but you can see all the way down if i go down here there are the built-in commands in it as i said before you can just click this lawnmower and these are all the commands which is being shown here but you can go here and take help but if i now go into the

terminal if you just click in it it will show you all the things but before that let me just walk you through this ui so you get the understanding here we are having this built mode one thing to remember In open code, there is two modes. Let's say. One is the built mode. And if you click the tab, it says here, right? Tab and the agent. This is the built agent. Let's

say in that word. If I just press the tab here, it changes to the plan. Now, this is the planning agent. When you write something, it will plan for

plan. Now, this is the planning agent. When you write something, it will plan for you. But it is not going to write the code for you already in your

you. But it is not going to write the code for you already in your code base. These are two things. Plan mode. And there is this docs also here.

code base. These are two things. Plan mode. And there is this docs also here.

You can see. So these are things. Build mode, plan mode, docs and so on.

These are the things that you can press tab and it will do the text.

If you type control T, you can see there is this low variant being shown here. If you type control T, control T, there is the medium, there is this

here. If you type control T, control T, there is the medium, there is this high. Based on the LLMs, there will be different variants. This is the big

high. Based on the LLMs, there will be different variants. This is the big pickle from open code and this is the gen mode. If I click ctrl T now it is gone. Just to show you again this also. Here you can just go here and search for variants. And it will show you. Let me see I

think there is somewhere. It is written here. Now variants do I have something. I think I have already a link. Let me just show you the link

something. I think I have already a link. Let me just show you the link so it's easier. I can go here. There is this variant link. Let me just go out from this laser mode. And if I go into the variants, so this is the variants. Many models support multiple variants with different configurations. OpenCore shifts with

built-in default variants for popular providers. You can see this is the built-in for Anthropic.

This is for OpenAI. There are many for Google. This is the main idea. If

you want to know and read also, you can see here about this variants. If

I go here, budget is default high variant, maximum thinking budget, and you can see no reasoning minimal reasoning low reasoning effort medium you get the point you can just play around with this if you are using those models then you can use this okay so now this thing is done again with the commands there are

different commands as you can see if i go here and do these models if i click this you can see these are the models that is already being shown here there are this big pickle which are free This is JLM47, Grok, Minimax and so on. It shows which are free provided by the open code themselves. And you

so on. It shows which are free provided by the open code themselves. And you

can have popular providers. And you can choose the providers from here. You can go down here and see all the providers. If you want to view all providers, you can do control K. And you can see there are different providers from where you can choose the LLMs. If you want to do something else, for example, here is spell check. Spell check all markdown files. and if you want to go list the

spell check. Spell check all markdown files. and if you want to go list the agent let me say okay there are three agents which i said before this build agent plan agent and docs is always use this when writing the docs you can see these are the agents you can just type skip and it is gone again you can do this slash and you will have all the all the commands just

press this down arrow it will show you all the things and one interesting thing is if you go to this theme here if you click this there are different ways How you can choose which one you want the best. One dark open code.

These are things you can play around with. I will go with this open code.

There are many ways as you can see. I'm not going to go through all these things. But if you create this init command. Now if I just run enter.

these things. But if you create this init command. Now if I just run enter.

You can see there is this pre-built prompt already being set up here. You can

see here. When I run that. Init. Enter. Enter. Here it says. agents

md creation for code base build link test style and guidelines please analyze this code base and create an agent md file containing these things the file you create will be given this so you can see that there are some of the inbuilt prompts also as a command you can have a command and then it will have

a inbuilt prompts in it you can see now it is following the things that is in the in the agents md and you can see if you improve if there is already an agents.md improve it and you can see here it is being created inside this particular folder from where i open this open code it will be shown here we can see here there is this agents.md open code

development guide for ai agents these are the things shown here and if i close this it says that i will read the existing so that there was already the same agents.md read this let me also check some packages and you can see it

same agents.md read this let me also check some packages and you can see it is going down there and then it wrote this agent.md you can see it just writes here because this is the build agent that I am using this is one of the command but you

Loading...

Loading video analysis...