Transcription
If I told you that you can use Cloud Code for free and without paying a single dollar, you probably wouldn't believe it because Cloud Code is indeed one of the most powerful AI tools for programming and project creation. However, the problem is that it's very expensive; the cheapest plan is $20 per month, and it's also limited. Therefore, in this video, I will show you how to use Cloud Code for free, whether by using powerful models or even if you are subscribed and want to save some tokens, all in more than one way to help you run it for free, regardless of your device's capabilities. Let's start. I want you to consider Cloud Code like a Formula 1 race car, and there's a part in this car, like the engine, for example, which is the models in Cloud Code, such as Anthropic's models like Claude and Opus. So, here we are to save money and tokens by changing this part with other models, as if we are changing the engine. At the same time, we will get the rest of the car's features or Cloud Code, such as Agent Club, Cloud Skills, and other features available in Cloud Code. The first thing we will do is go to Google and type "Ollama," as you can see in front of you here.
Then, we select the first result in the search results. If you don't know Ollama, it's simply a tool that allows you to install and run AI models locally on your device completely for free, and even offline. There are many models and different integrations, including with Cloud Code, as we will know now. They have even provided some instructions or guidelines and also recommended models for you to use with Cloud Code, such as Llama, Gemma, which I personally use, and Mixtral, which is very special, and CodeLlama, and others. Most of them are Chinese models. Honestly, China is doing great things for us currently in the world of AI, specifically in the world of open source. So, simply, from the homepage, you can install Ollama using this command. And if you are not very technical, you can simply click here on "Download Ollama," and then you will choose your operating system. For example, I am currently on Windows, so I will click here on "Download for Windows" very simply, and the download process begins. The file size is approximately 1.5 GB. After the download is complete, you will find this file, so you install it normally, like any program on your device. And very simply, after the installation is complete, we can download any model very simply from within Ollama directly, not necessarily by opening the terminal. So, very simply, you choose the model.
So, how do you choose the model you will download from among the many models here? Of course, there are different models, such as CodeLlama, which is very special in code writing, and it's open source. There is also DeepSeek Coder, but it requires a device with extraordinary capabilities. There is also Mixtral. To select the models you will use with Cloud Code here, or the Cloud Code integration on the Ollama website, as I told you before, they have offered us some models to use. Personally, I have tried Gemma, and it was excellent, to be honest, in addition to CodeLlama. But now, I will suggest a model for you, which is GPT4All, which is a model from the GPT4All company. As you can see here, most people have actually used it within Cloud Code, OpenCode, and CodeX from OpenAI, and even Open-WebUI. GPT4All is available in different versions. The lightest one, honestly, is GPT4All-J 1.3B. Of course, it tells you here that it requires 14 GB of RAM, but you can run it on your device to a great extent; it doesn't require a device with extraordinary capabilities, and this number is not very accurate due to the model's architecture. So, very simply, we go back to Ollama and come here to "Select Model" and type GPT4All in the search normally. And you go down here to this version, not the cloud version. The cloud version is online; you will download it for free on your device. So, I will choose this version and then I will type any message, like "Hi," to start the download process. As you can see here, "Downloading model" with a size of approximately 13 GB. So, we wait for it to finish downloading.
And as you can see, after it finished downloading, it responded to the message "Hi" that I sent. Here, even if I typed "Hello," it would respond to me directly, as you can see. And if we look down here, it's the same model that we downloaded. So, you simply choose any model you want to download, whether from here or from the Ollama platform. You just send it a message, and it will start the download process. Of course, there is another download method from the terminal, but this is the easiest method. So, we have downloaded the model. The next step to use these models locally within Cloud Code is to go to Google and download any IDE. Of course, I am doing this just for the system, but you can do it directly within the terminal. The steps I will take now regarding the IDE. You have the editor, which is VS Code, Visual Studio Code, which is the most popular editor. You can turn it into an IDE with any extensions or additions you want. Very simply, you can download it from the official website here and install it, and you will have this user interface. Or, if you are not very technical, it is preferable to download Google Colab, which is in front of you on the screen. You can download it for Windows or any other system you have, like Mac or even Linux. And this will be its user interface. Of course, you can change the display method by clicking up here on the panel that is here. I have explained how to install it many times, and it is very easy, honestly. The important thing is, after you install the IDE you want to use, like Colab or Visual Studio Code, create a new folder on your device or a directory and name it, for example, "Cloud Code." Then, within Colab or Visual Studio Code, go to "Open Folder" and select the folder you just created. This will be our project. By clicking "Select Folder," and after you make sure you are inside this project, very simply, you will come up here to the terminal and click on "New Terminal" to open the terminal within our project. You can, of course, control the window size as I am doing in front of you here to make it clearer and to install Cloud Code on our device. If you haven't installed it yet, you can do so from the Ollama platform itself. Scroll down here to "Integrations," specifically to "Cloud Code," and I will leave you the link to this page in the pinned comment below the video. It tells you here that you can install Cloud Code, as you can see, using one of two commands. If you are on Mac OS or Linux, copy this command. And if you are on Windows, you will copy the command that is in front of you here. So, I am currently on Windows, so I will click on "Copy" here to copy it, and then I will come here inside the terminal, as you can see, and right-click to add the text I copied, or Ctrl+V normally, and then I will press Enter to start the installation process. And as is clear in front of you here, it says "Installing Cloud Code native library latest." It installs the latest version, so you will wait for it to finish.
And as you can see, it finished the installation, saying "Installation complete." But if you noticed here in red, it tells us that we need to install Git Bash, which is written here, specifically Git Bash. So, I just click on the download button here to open it on my browser, and I will also leave you the link in the pinned comment below the video, as usual. So, very simply, we will install Git Bash. So, I will click here on "Download" to download it for Windows, the latest version, and its size is approximately 60 MB, no more. After that, we install Git normally, like any program we download. We can just enable this option, "Add Git Bash profile to Windows terminal," and then we click "Next," "Next," and "Next" again until we reach the installation process, as you see in front of you here, and it says it finished the installation. So, we uncheck this option normally and then click "Finish." And we go back to Colab. Inside the terminal, and when I try to run Cloud Code, it won't work because there is one last step. Let me show you. I will type "ollama run cloud" here, and it will tell me that it's not installed, even though we installed it on our device. So, how do you solve this problem if it appears? And I left it intentionally in the video for people who might face problems. So, here, Cloud Code is installed on your device because it told us above, "Installation complete." So, to find its path and add it to your system path so that you can use Cloud Code in all your projects for free, as you will see, all you have to do is go to your device normally, specifically to the C partition of Windows, and open it. Then, you will find some folders, but you will definitely find a folder called "Users," like the one in front of you here. So, you click on it, and inside the "Users" folder, you choose your main user. For example, I have it named "PC," so I will click on it. Then, you look for a file named ".local," as is clear in front of you here. This file. So, very simply, we open this file, and you will find some files inside, but the first and most important is the "bin" file. If we open the "bin" file in front of you here, you will find "cloud.exe" inside. So, very simply, the path you are in here, you will come up here to the path and copy it, Ctrl+C, or even copy it normally, and you go down to the search bar in your Windows to add this path to the system path so that Cloud Code is available in all paths on your Windows. And you will search for something called "System Properties." So, you will find an option in front of you here, "Edit the system environment variables," and make sure you are doing exactly as I am doing. So, we will click on this option to open the window in front of you here. So, very simply, we will click on "Environment Variables." You will find it within the "Advanced" option, which will open automatically. So, I click on it, and then there are two sections. We will go down to the lower one, "System variables," and scroll down until we find "Path," as you can see, this option. And we click on "Edit." And inside this option, we will come up here to "New" and click on it very simply to open this box where we do Ctrl+V and add the path we copied. And then we click "OK," and "OK" again, and one last time, "OK" again. And with that, we have added Cloud Code to our system path. So, very simply, we will close the terminal in front of you by clicking "Terminal," as you can see. And after closing the terminal, I will close Colab very simply, or restart it, meaning. So, I close Colab, and after opening Colab again and waiting for it to finish loading, I will come up here to the terminal and click on "New Terminal" again to open the terminal again. And I type "ollama run cloud" and then click "Enter." And as you can see, it opened for us the free version of Cloud Code and asks us to choose the model we will use for free within Cloud Code, or the default model. And I will tell you later how to change this model. So, I will go down here to GPT4All-J 1.3B, which we downloaded. Of course, you can use any of these models, but I want to inform you that cloud models are limited, and non-cloud models like Gemma 4.7 Flash are unlimited if you download them to your device. Here it says it requires 25 GB of RAM.
Anyway, after I made sure I selected GPT4All-J 1.3B, I will press Enter. And as you can see, Cloud Code has opened for us completely for free within our device in the terminal and asks us to choose between dark mode or light mode and other details. So, I will leave it on dark mode and press Enter. And then here it says that Cloud Code might make mistakes and other details. So, I press Enter to continue. And it tells you the settings, so I will leave it as is on the recommended settings. And finally, something related to security. It tells you this folder, meaning it gives it access and so on. So, I will click "Yes." And finally, Cloud Code, as you can see, has opened for us completely for free on GPT4All-J. Of course, you can keep it as I am doing, honestly and with all sincerity, on Gemma 5 or 4.7 Flash in case I need to save tokens. This can be run on higher models if your device allows, but if your device doesn't allow it, I will tell you another method in the next part of the video. Anyway, let's try to tell it, for example, "Hi," and send this message. So, it responds to me by saying, "How can I help you today?" This is a very trivial example, of course. I am just showing you that it works or has started. You can change the model you downloaded by, for example, opening a new terminal normally in any folder or project you have, or even directly on the normal terminal on your device, which is within the Command Prompt. Anyway, I will leave it normally within Colab, and you will type "ollama run cloud" and then "--config" and press Enter. And then you can choose other models, as you can see, very simply from here, other than the model you previously chose.
So, if your device's capabilities are weak and do not allow you to download models like Mixtral and other models available on Ollama or even Hugging Face, what can you do? You have another free solution, but it has drawbacks, honestly. And this solution is the OpenRouter platform, where I have seen several tutorials on YouTube about the possibility of going here to "Models" and typing the word "free," and you will find many free models like CodeLlama 3B, Llama 3.2, and other models, as you can see. Or even use this feature that we will use, which is "Free Models Router." Let's first tell you what it will do. So, very simply, and in just two steps, to install or run Cloud Code for free on your device, and your device is weak, without downloading any free models that are large in size or require high operating requirements. You will download Cloud Code as we downloaded it in the previous steps, either from the command here or from the Ollama platform to "Install Cloud Code," whether on Windows or Mac. Then, if you are on Windows, I will leave you a link to a file called "settings.json." All you have to do is download it, and after downloading it, right-click on this file and click "Edit with Notepad" or "Open with Notepad" to make one change: add your key here. So, what is your key? First, you register normally on this platform, very simply. And after you register, you will come here and click on "Get API Key" or even come up here to "Personal," and then you will click on "Activity" or any option here, and you will enter this window. So, you will go up here to "API Keys" and click "Create" or "Generate" a new key, for example, you will give it any name. Then, you will scroll down here and click "Create," and it will generate a key for you like the one in front of you here. So, you will keep it. We will copy this key, as you can see, and add it here instead of the word "your key here" between the quotation marks, and we do Ctrl+S or "File," then "Save." And very simply, all you have to do is copy this file, as I am doing in front of you here, and then go to the C partition, and we open this partition to go to the "Users" folder, as you can see, "Users." And then to the "PC" folder, and we open the "PC" folder, or the name of the folder that is your user on it. I have it named "PC" here, so I open "PC." And finally, we come here to a folder named ".cloud," and we open this folder named ".cloud." And right-click, then "Paste," and we agree to the replacement process because there is already a file named "settings.json" here. And after doing that, you can, within Colab, from any terminal, type "cloud" and press Enter, and it will open directly for you, as you can see here, Cloud Code with OpenRouter, for free. And you can switch API keys from them. You can even use Gemma and others. Of course, we are currently on something free. So, let's try to send, for example, "Hi," and press Enter. So, it will use a free model to respond to us from this company, and it will respond to you as you see here, "Hello, how can I assist you today?" And with that, you have learned how to run Cloud Code completely for free on your device, whether by using a local model on your device unlimitedly or relatively limitedly with a free key from OpenRouter, as you saw in front of you here. Of course, this method also works on Mac, but the "settings.json" file will be created within any project you have on Colab or VS Code. And I just want to clarify the difference here. If I, for example, close the terminal and open a new terminal, I can run Cloud Code unlimitedly with the Ollama local models that I downloaded using this command, which is "ollama run cloud," and then press Enter, and choose the model, for example, GPT4All-J 1.3B. So, it will open the GPT4All-J 1.3B model for us unlimitedly on our device because it runs locally. But if you are working on OpenRouter, I will open a new terminal and type, for example, "cloud," and press Enter. And as you can see, it will open for us on OpenRouter. So, you now know both methods and the difference between them. Of course, if you ask me which method is better, the first method using local models would be better, but only if your device allows for better models like Gemma 4.7 Flash, as I told you. And that's it. If you benefited from the video and how to run Cloud Code for free on your device, write me your opinion in the comments, and don't forget to like and subscribe, and we'll see you in another video. Three.