📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

Я УДАЛИЛ Claude Code – Вот, что я использую сейчаc

Продуктивный Совет20:08

Transcription

What is OpenCD? How to use it for creating routine automation agents and development? Why do you need to install it right now and forget about cloud code forever? I'm being a bit dramatic. People, robot, hello. This is a review of OpenCD, probably the most hyped AI agent. OpenCD has already surpassed cloud code in GitHub stars and continues to grow at an insane pace. And today I will tell and show you how to install OpenCode, what are the basic settings and commands, how and when to use this agent in your activities, and, of course, I will explain why it is cooler than CLD-code. If you are still asking yourself what an AI agent is, why I need to use them in my work, then watch this video until the end, it's for you. Support our channel with a like, comment, subscription. This will help promote the project. And let's get started. Let's start by going to the OpenCode website, and before us will open, well, not the main page, but the main documentation page, and we will read the following. OpenCD is an open-source AI agent that is available in a terminal interface, a desktop application, and an IDE extension. And you already understand what this means and how cool it is. If not, I'll tell you now. Let's start with installing OpenCode. Let's click on these three mysterious letters, TUI. And here we will see the commands that will allow us to install it. Actually, I lied to you, probably somewhere in the intro these commands are there, right? Here I recommend you use this CLI command. There is an option to install using npm, banana, pnpm, yarn, homebrew, and so on. But in fact, take, copy this command, go to your terminal and let's enter it, let's see what happens. Success. OpenCode has been installed. And now let's talk about these three mysterious letters, TUI, which I have already managed to mention. I enter OpenCD, open it and observe the following. A beautiful, convenient interface that can be customized as you wish. Most likely, upon first login, it will tell you: "Let's authorize by connecting some provider or model." It immediately pulled up the settings that were already written there. But here's what's amazing. With the Ctrl P button, let's first select Connect Provider, this section, and see how many providers are available in OpenCode to connect some LLMs to it. When, I remind you, you work in cloud code, you can only use cloud code, well, or practically only cloud and Anthropic models. Here you can use, firstly, absolutely free models that are given to us by OpenCode itself. This plan is called Open Code Zen. You can also connect Anthropic models here. There were some difficulties with authorization, maybe they've already fixed it. GitHub Copilot. You can connect ChatGPT here. If you have a subscription to ChatGPT+, you can use GPT52 Pro Hi models, all these gadgets right here. And any other provider you wish, you can connect here. I also have the Zi Coding plan connected here. After you have connected the desired provider, you can select Switch Model and choose the specific model you want to work with. Here I have GPT 5.2 selected now, but for our tests, I think I'll move over here to the GLM 4.7 model. An important setting is, of course, the theme. There's a crazy number of them, much more than the options you have in any other CLI agent. Again, why? Well, because it's not exactly a CLI agent, it's a TUI, it's a terminal user interface. It's much more convenient than what, say, cloud code or codex offers us. For our tests and comparison with cloud code, I will create two directories. OpenCD YT, and here we will have cloud code YT. In this window, I will also open OpenCD, and here we will open cloud, that is, cloud code. And all further advantages and cool features of cloud code, and there are many of them, I will try to show on a real example. There is an option to use planning mode, there is an option to immediately create anything, that is, build and plan agents. If we are talking about programming, development, then it's always cool to start, of course, with planning. Let's test these modes in cloud code and in OpenCD. I'm uploading the same prompt. Both there and there. To change, switch between plan and build modes, use the hotkey Shift T. And let's switch all this. Cloud code works a bit faster, and here it starts asking me clarifying questions about my application. AI in use only submit answers. And there is absolutely the same feature in OpenCode. It can also ask you clarifying questions and offer answer options. Let's answer them too. React Full article text AI category. Let it be manual refresh. I have a pretty simple app, I didn't read it to you. Mmm. We are creating an application that will simply pull news from different RSS feeds into a single interface. By the way, I'll note that both there and there I'm using the GLM 4.7 model, which I pulled through coding plan. It can be used in cloud code, it can be used in OpenCode. But again, in OpenCode, you can use not only it, but a huge variety of different providers and models. Super, OpenCD has already finished planning, and it did it faster than cloud code. Now let's switch to build mode and ask it to generate, in fact, the code and the site that it proposed here in its plan. OpenCD finished working faster, although it took a lot of time, almost 10 minutes. Let's check what happened. A very pleasant feature that OpenCode has is the ability to simply select the piece of text you need, and it's immediately copied to the clipboard. And we can go, paste it into our localhost and see what we have here. OpenCode has coded. Well, this is how this miracle looks. A preview opens on the right. Unfortunately, it doesn't load the article text, but the source opens, which is also, in general, great. Well, not ideal, but not too bad either. Right, this is the result from OpenCode. CLD-code has also finished working, and it has placed all this on localhost 3001. And something is not working for him. What's cool about cloud code is that it can do these background tasks, meaning it can run some commands in the terminal, start activating a server or do some other process, and you continue to interact and communicate with it at this moment, which is, of course, good. OpenCD seems to be able to do the same, but it's somehow less obvious there, and it doesn't really show it in its interface, how, for example, cloud code does it. Maybe I don't understand something, but for some reason the front end doesn't open for me at all. And while cloud code is debugging the problem, let's talk about commands. And first of all, I want to change the theme, because it looks too much like cloud code right now. This is better. Commands can be built-in and custom. They are selected using the slash key and arrows from the dropdown list. Think of commands as prompt templates. When you enter any command into an AI agent, a message with instructions is sent, and it immediately starts executing it. Let's start with built-in commands. There is a wonderful command Init, with which I generally recommend you start interacting with AI agents when you start a particular project. It allows you to create an agents.md file, which will be attached to the system prompt when your agent starts. If you already have a set of content files, code folders in your directory, then this file will help you create a system prompt that will describe the entire structure of your directory. This command is available in both terminal agents, and it creates this. Well, it hasn't created this Agent MD yet, but as soon as it finishes analyzing the entire directory, it will create an Agent MD here, in which all important information will be written. Agents MD has appeared in our directory. This is what this file looks like. All detailed information about our project, which we started, is now collected here. What's important, if you have a single directory with many different projects, then you can create this agents MD, which applies to all your projects. And in each nested folder, in each nested directory, if there is its own agent MD, it will only apply to the content of that specific directory. That is, in this way, using folders and directories, you can configure the behavior of agents depending on which specific folder you are working with them in. Well, frankly, it's a bit shameful on the part of cloud code, it's still struggling here, suffering with my, well, not that it's a very complex prompt, it's not an indicator that cloud code is worse from a development perspective. In my tests before recording the video, it actually worked perfectly, but here something went wrong. I've already shown you the Init command, but I want to show a few more interesting slash commands that both AI agents have. Well, first of all, there is the New Clear command, you can enter it however you want, and it will simply clear the current session, and you will have a completely new dialogue with the AI agent. Here, this can also be done this way. But then, what's important, look at this number, well, first of all, there are many custom slash commands that I have already created, they are also shown here in this preview. But in principle, cloud code has a crazy number of commands, even internal built-in ones, honestly. But I'm tired of scrolling through all this. There are some plugins, pptx, rename, release, rint, review, sandbox, skill creator, a crazy number of them, status, sticker. That is, you understand, cloud code has a sticker command, which leads us to buy cloud code stickers. This is, of course, a catastrophically important function, without which cloud code, well, simply cannot live. At the same time, OpenCode is actually very clean, there aren't a crazy number of these commands, and, well, it looks much neater, honestly. Moreover, we have a sessions command that allows us to change sessions. That is, if we have already communicated with OpenCode before, we can switch from one session to another. I will also show you how to do this in cloud code. It can be done, but there is no sessions command to switch from one dialogue to another directly within the dialogue. But on the other hand, you can exit cloud code completely. Let's clear the terminal so it's easier to see and understand. And simply enter the command CLD R. And in this case, you can choose the same sessions that you had before. But it's done, honestly, a little less conveniently in cloud code. Let's continue talking about commands and settings. To customize your OpenCD, you need to open the following directory. By the way, I remind you that you can enter commands directly into your terminal, even while inside a dialogue with cloud code or OpenCode. To do this, press Shift and the exclamation mark. And you see, OpenCD informs us that we are in shell mode, meaning we are communicating with the terminal. Let's open this Open Code directory. And here I recommend you immediately create several new folders. First of all, it will be agent. Then the Command folder and the Skill folder. Let's put this file called Commit.md in the Command folder. And this file is nothing more than our custom slash command, which will allow us to quickly load all the content of this file into the context of the code so that it starts executing it. At least this format of these files is what I recommend you use. Three dashes, then a description of the slash command, and then, in fact, the entire content of this slash command. Let's reload OpenCD so that it understands that we have new commands. And now we can, as it was called, commit, I think, select our custom command. It will be displayed in the same way after we enter a slash. And, accordingly, now, based on my prompt, which I quickly loaded into the context, OpenCD will do what I ask of it, namely, initialize a Git repository and make the first commit. Absolutely the same thing exists in cloud code. You can also do slash commands in the same way and quickly load the necessary context into the dialogue with your agent. While the guys are working, let's create our first agent. Let's put the following file researchanalyst.md in the agent folder. and look at its content. What you need to know when creating agents. In OpenCode, there are two types of agents. There are primary agents and sub-agents. We have seen two primary agents that are already built into OpenCode: build and plan modes. You can create new primary agents yourself, and it will be available in this dropdown list alongside Build and Plan agents. There is also the sub-agent format. This is when your main agent can contact a sub-agent and assign it a task. And for this to work, you need to make this annotation in mode and write subagent here. For this, we write the name of the sub-agent, its description. Here are various examples and uses. I have a rather extensive section here, but in general, it's not critical. And then the prompt itself, which this sub-agent has, which programs, configures it to perform a specific task. In fact, OpenCode itself understands when to use sub-agents. But in principle, since we have created a new sub-agent, I think it makes sense to update the session, because we have just done all this. And in principle, OpenCode understands itself, but you can also mark this sub-agent. You see, I have research analyst, I mark it with this at sign. You can mark it or not, as you wish, but my prompt is as follows. And now I want to show you a big, main, very important difference between cloud code and OpenCode when we work with sub-agents. Here, in theory, I should also have a research analyst. Here it is. And I will enter the exact same prompt into it. And now look at the grace that OpenCode gives us. We can't just stay here and wait for the main agent to do something for us. We can switch to the sub-agent's session. And to do this, you can press either Ctrl X and then the right arrow key, and similarly Ctrl X and the left arrow key to return, or just click on this highlighted part. And here we see how our main agent is prompting our sub-agent. And what happens next? The entire thinking process, the process of our sub-agent, all the tools it uses, all the results it gets, and so on, and so on. And let's press Ctrl X and up again to return to the main agent's session. Well, and just wait until it finishes its work. Cloud code, in turn, is also doing something. Well, look, it called a sub-agent, it finished everything, and we can't see anything. Okay, it used five tools, it spent 30,000 tokens, worked for 30 seconds for my personal analysis and understanding of how my systems work, agents, sub-agents, how they connect, how they communicate with each other, but this tells me nothing, I need to open logs, go to code, try to struggle to find everything, if it's even possible to find it. Yes, we got the result, but we got it, I don't like it at all. Which cannot be said about OpenCode, although it's still thinking for a long time. In terms of transparency and your personal understanding of how your systems work, OpenCode is much better. Agents can have a very large number of settings. You can not just create a sub-agent, as we did, which does something according to a given prompt. You can customize them very heavily, you can give them specific tools, give them built-in tools, give them different MCPs that are only available to them, deprive them of certain capabilities so that they don't change files. You can see everything in the OpenCode documentation. There are a crazy number of different settings that will allow you to customize your workflow and get maximum efficiency from it. But if you don't want to dig through the documentation yourself or something here seems complicated enough, then I remind you that we have a recorded broadcast on working with AI agents. And another broadcast will be added there soon. There we cover everything from the most basic settings, how to install cloud code and OpenCode, how to work in the terminal, what commands are there, what services like VS Code or Obsidian to use to monitor the work of your AI agents, because some visual rendering of what they are doing, the structure of the directory, it's good to understand all this. And moreover, I will add a second broadcast there soon, which is a bit more advanced. There we will talk about slightly more complex automations with various scripts in skills. We will talk about sub-agents and their custom settings. We will talk about slash commands in more depth. And about creating such an agent layer around your activities. It costs only 900 rubles for now, but we will raise the price soon. Therefore, if you are watching this video, you have the opportunity to buy all this within the next few days before we raise the prices. They cost pennies, but the benefit is very large. So, follow the link in the description to our bot and get useful broadcasts on creating AI agents in your terminal. And finally, let's look at some other interesting features of OpenCode. In principle, I tried to show you the main differences. I think you could have compared just by the example of my work how it looks in OpenCode, how much more convenient it is to do everything here, because, again, I remind you, you just highlighted it and it was immediately saved to the clipboard. But OpenCode also has a GUI. Honestly, I've never opened it in my life. I have no idea what it is. By the way, look, open project. Mmm, I understand that you can also load Git and all these work trees here right away. And in a slightly more visual interface, look, move from folder to folder and work with your local files and directories, but in a web interface. In principle, if this terminal scares you a little, then you can quickly open the web version and work in it too. While all access to your local files is still preserved. Well, that's cool. And I'll say one more thing, which I think I didn't convey quite clearly earlier. In each directory, you can have absolutely your own settings. For example, now we see, I opened it in one folder, in which we were working, cloud code, well, cloud code, let's say cloud code YouTube. And here, in general, we have nothing, for example, MCP servers, I have MCP servers connected here. Mmm, no, but if I open another folder, My AI, where I already have all the OpenCode settings in a special JSON file, then we see that, firstly, the theme is different, and here I already have the same MCP servers connected, because I have all this written down. where in such a file opencode.json. You can place it globally in .config/open-code. Then it will apply to all settings. Or you can make your own settings for each directory, for each project, and thus customize your agent for different tasks in different projects, which I think is quite convenient. Well, that's all I have. If the video was useful, leave a comment about it. Support our channel with a like, subscription, and a bell too. This was Uncle D. See you in future episodes. Bye.