Transcription
I love claude code. I really do. I think Anthropics Opus 4.5 model is one of the best coding models we've ever seen. But there's a problem. It is really expensive. If you are a heavy dev like me, you're not just going to pay the $20 monthly plan, but you are looking at a $200 monthly bill just for AI to help you write React components. Now, that is insane.
But what if I told you you could get 90% of that experience, the terminal agent, the file editing, the tool calling for exactly $0. There are no API keys, no token anxiety, and zero data leaving your machine. And I really think 2026 is the year for open-source models. And this is just the start. The sooner you learn, the better you get. So today, we are going local. I'm going to show you how to swap Antropics backend for a local powerhouse using Llama and some clever proxy. We are going to build a free claw core till thiller that runs directly in your machine. Now, is it as smart as Opus 4.5? Probably not. However, you can get most of your work done using the powerful open-source models that we'll talk about today. So, let's dive in.
First off, let me show you how it's going to work. Let's say you have a prom build a motion app or build a hello world next.js application. What essentially happens is if you sign up for a cloud core plan, one of the plans, there's a pro plan or whatever plans they have, then you're accessing cloud code models, anthropics models, such as Opus 4.5, 4.1, and a variety of other models that they have. And you're most likely going to pay $200 a month. So, what you're paying for is their infrastructure. It lives on the cloud. They have access to all the really cool models, and that's what you're paying for. So, they are going to be responsible for running your queries, and you just have to ask for it. It doesn't necessarily use your hardware at all. It uses anthropics to do so.
However, what we are doing today is we are fully going open source. We're going to use open source models to do the exact same task, but instead of running it on anthropics hardware, we are going to in fact run this on your own computer. And that is one of the cons, if you will, for with this specific approach. You need to have powerful hardware just to make sure that these models can run on it and you'll be able to get your results that you're looking for. So there are really cool open source models out there such as llama 3, glm ocr, glm 4.7 flash. All these are great models, weight coding models that you could get a lot of work done in and you don't have to pay anything to anthropic or cursor or any of these premium paid models. You could just have run these open source models locally using but it will instead use your own computer. So that's exactly what we are going to set up right now.
So first off, we are going to go to ola.com and you're going you're going to need to download so you could run these models. Now Olama is the easiest way to automate your work using open models while also keeping your data safe. Now the other advantage of this approach is that you own your data. There's no data that's leaving your machine at all because you are going to run it on your specific machine. Then if you take a look at models, these are all the different open source models out there. We're going to sort that out by popular and you can see all the different models, what they're good at, how many downloads they have received and so on.
So step one is you're going to need Olama to run all these models. Second, you're going to pick one of these models to run on a local machine. Since I already have Oram Lama, this is how looks like as you can see over here. It's a simple window and then you can choose all the different models or find models over here and you just simply have to download it locally on your machine. This way when you pick let's say GBD OSS 20B which is the model that I have downloaded I can pick that and ask anything I want. So for example I just say hello and then this model is going to think as you can see earlier I said hi and it said hello how can I help you today? Same thing hi there how can I help you today? We need to get this model that we have downloaded and get cl code to pick this specific model. So let's do that now.
Now step two is for you to install cloud code locally. Now you may want to install the terminal so that we could get claude code to switch to the model that we have just downloaded for example. So make sure to install claude code locally as well. And here are some instructions depending on the operating system you're using. What you would ideally want is let's say you look for claw on your terminal then you're automatically going to see something like this. So I'm just going to say yes and claude code is going to run on your terminal. But as you can see, Claude Code is running Opus 4.5. We want to switch this to the local model that we installed. And once you have downloaded Olama, you could simply do just like this.
Now, in order for you to see all the different models that you have running locally, whatever models you have downloaded, you could just do list. And you can see that this model GPD OSS 20D is 13 GB in size. It's downloaded locally. Similarly this model as well the latest one has also been installed locally as well. Now next we need to tell claude where Olama is running so that Claude can point to it. So for that we are going to need two environment variables. One variable is anthropic base URL that needs to point to this specific localhost 11434 port. That's where Olama is running. Now Claude still expects a API key. So you need to give it some sort of dummy value otherwise it's going to throw an error. So what you need to do is set again entropic token equals and give this to any gibberish value. It doesn't matter. I'm just going to say token here.
Now that these two values are set, we just need to get claude code to pick the model that we have installed. So for that we are going to say claude hyphen model and then pick the model. So I'm just going to pick this model and set in. There we go. The claude is already running and it has now picked the model GPD OSS 20B and make sure you are already in the folder where you want this model to run. So here I'm just going to say create a hello world next.js app and let's see what it does. Again it's now using GPD OSS 20B and it's going to basically pass this query. it's churning and then run it.
Now, keep this in mind. Response time totally depends on the hardware, how much RAM I have, how powerful my machine is, and so on. So, if you want your models to be faster, then pick a model that will run faster. It doesn't need as much hardware as you would. It's already asking me, do I want to proceed? And I'm just going to say yes, please proceed. It is already a good sign. So, as you can see, this specific local model is already running. So, there's no data that's going to leave your computer and so on.
Now let's see what what happens next. It's thinking and I'm just going to say yes current directory. Let's go for typescript ready to submit answers. So it's also asking all the questions that usually claude code word using the model that I have installed locally which is really freaking cool. And there we go. As you can see here it already has created the package JSON file. And I'm just going to say two to allow everything with package JSON TS config JSON and so on. And it's also getting ready to write all of them. Now keep this in mind. I did not tell it to install any router like using the next app router. So it just went with the next pages router which is completely okay. Not a big deal. And I'm just going to say install the dependencies. You can now start the development server. So I'm just going to open up a new terminal and run npm rundev and go to localhost 3000. And voila, we have a Nex.js app ready to go. It's a hello world next.js app, which is exactly what we're looking for. That's exactly how you can run a local model in cloud code and still get all the features that we really love about cloud.