Showing results for
🌐
Shawnmayzes
shawnmayzes.com › product-engineering › running-claude-code-with-local-llm
Running Claude Code with a Local LLM: A Step-by-Step Guide
Learn how to set up Claude Code with a local large language model (LLM) using the code-llmss project. This guide walks you through installation, configuration, and real-world use cases for developers who want AI-powered coding assistance without relying on cloud-based services.
🌐
Reddit
reddit.com › r/localllama › use claudecode with local models
r/LocalLLaMA on Reddit: Use claudecode with local models
July 16, 2025 -

So I have had FOMO on claudecode, but I refuse to give them my prompts or pay $100-$200 a month. So 2 days ago, I saw that moonshot provides an anthropic API to kimi k2 so folks could use it with claude code. Well, many folks are already doing that with local. So if you don't know, now you know. This is how I did it in Linux, should be easy to replicate in OSX or Windows with WSL.

Start your local LLM API

Install claude code

install a proxy - https://github.com/1rgs/claude-code-proxy

Edit the server.py proxy and point it to your OpenAI endpoint, could be llama.cpp, ollama, vllm, whatever you are running.

Add the line above load_dotenv
+litellm.api_base = "http://yokujin:8083/v1" # use your localhost name/IP/ports

Start the proxy according to the docs which will run it in localhost:8082

export ANTHROPIC_BASE_URL=http://localhost:8082

export ANTHROPIC_AUTH_TOKEN="sk-localkey"

run claude code

I just created my first code then decided to post this. I'm running the latest mistral-small-24b on that host. I'm going to be driving it with various models, gemma3-27b, qwen3-32b/235b, deepseekv3 etc

🌐
Medium
medium.com › @luongnv89 › setting-up-claude-code-locally-with-a-powerful-open-source-model-a-step-by-step-guide-for-mac-84cf9ab7302f
Setting Up Claude Code Locally with a Powerful Open-Source Model: A Step-by-Step Guide for Mac Users | by Luong NGUYEN | Nov, 2025 | Medium
November 20, 2025 - In your terminal, run: npm install -g @anthropic-ai/claude-code. Verify the install: Type claude—it might ask for an Anthropic key, but we'll override that soon. That’s it for installation.
Discussions

✨ Feature Request: Support for Self-Hosted LLMs in Claude Code Harness
Enable Claude Code to integrate with self-hosted LLMs, allowing users to swap out Claude’s proprietary models for locally run or open-source models (e.g., via OpenAI-compatible APIs, vLLM, LM Studio, Ollama, etc.). More on github.com
🌐 github.com
6
September 4, 2025
Anyone been using local LLMs with Claude Code?
I use glm 4.6 locally int4-8 mix locally. But with opencode More on reddit.com
🌐 r/LocalLLaMA
27
16
November 11, 2025
Is there some local LLM at the level of Claude.ai?
With current consumer-grade hardware you're going to struggle to run anything over a 70B. Claude, Gemini, GPT4o and the like are frontier models, cutting edge tech and massive, vastly beyond running at home. Things change fast but right now and for the near future there is no way of running such models privately. Play around on OpenRouter with the 70B models, see if anything works for you? More on reddit.com
🌐 r/LocalLLM
24
21
July 15, 2024
Show HN: Fork of Claude-code working with local and other LLM providers
As someone who is ignorant and not following all of the recent releases. Isn't Claude-code a proprietary version of https://aider.chat/ in the first place · It might be; but aider is Apache 2 licensed and I don't think Anthropic would be able to change the license. More on news.ycombinator.com
🌐 news.ycombinator.com
38
177
March 14, 2025
🌐
GitHub
github.com › anthropics › claude-code › issues › 7178
✨ Feature Request: Support for Self-Hosted LLMs in Claude Code Harness · Issue #7178 · anthropics/claude-code
September 4, 2025 - Enable Claude Code to integrate with self-hosted LLMs, allowing users to swap out Claude’s proprietary models for locally run or open-source models (e.g., via OpenAI-compatible APIs, vLLM, LM Studio, Ollama, etc.).
Published   Sep 04, 2025
🌐
Justin Searls
justin.searls.co › posts › how-to-run-claude-code-against-a-free-local-model
How to run Claude Code against a free local model
Fortunately, it took five minutes to find an LLM-agnostic fork of Claude Code called Anon Kode and another five minutes to contribute a patch to make it work with a locally-hosted LLM server.
🌐
Arsturn
arsturn.com › blog › local-llm-claude-code-the-real-deal
Using Local LLMs with Claude Code? The Surprising Answer
August 10, 2025 - You see benchmarks where GLM 4.5 is tested with something called the "Claude Code agent framework," & you think, "Great, I'll download that framework & plug in my local model!" Here's the thing, and I'm just going to be upfront about it: you can't. But don't click away! The reason why you can't is important, & the solution is actually way more exciting. It involves building your own, private, super-powered coding assistant that's arguably even better because it's all yours. Let's dig in. So, this is the source of the confusion. "Claude Code" isn't a universal tool or an open-source framework you can just download.
Find elsewhere
🌐
Cheney Zhang
zc277584121.github.io › ai-coding › 2025 › 08 › 15 › build-code-retrieval-for-cc.html
Building Code Retrieval for Claude Code from Scratch | Cheney Zhang
August 15, 2025 - So I named this product: Claude Context. It’s an open-source code retrieval MCP tool that can seamlessly integrate with Claude Code while also being compatible with other AI Coding IDEs. It enables LLMs to obtain higher quality and more accurate contextual information.
🌐
Freek.dev
freek.dev › 2883-running-claude-code-with-a-local-llm-a-step-by-step-guide
Running Claude Code with a Local LLM: A Step-by-Step Guide | freek.dev
July 14, 2025 - Even though I use Claude Code, I haven't used local models. It seems very convenient to be able to use Claude Code without an internet connection.
🌐
Reddit
reddit.com › r/localllm › is there some local llm at the level of claude.ai?
r/LocalLLM on Reddit: Is there some local LLM at the level of Claude.ai?
July 15, 2024 -

Hello, while researching the topic of content creation automation with LLMs, I stumbled upon this video https://www.youtube.com/watch?v=Qpgz1-Gjl_I

What caught my interest are the incredible capabilities of Claude.ai. I mean it is capable of creating HTML documents. I did the same with a local LLaMa 7b instruct, so no biggie. Where things start to go awry with LLaMa is when I ask for the infographic using SVG icons and even more for the interactive timeline. There is no way LLaMa creates a JS script, you must ask very persistently and even then the script simply doesn't work.

Also it was fun to see LLaMa write all the document in HTML but adding a reference section written in markdown. I pointed it out to the model and it said it was sorry, then corrected the mistake and transformed the markdown in HTML. I wonder why it made such a mistake.

However it looks like Claude.ai is capable of much more complex reasoning.

At this point I wonder if it is because Claude is a tens of billions parameters model, while the LLaMa I am using is just a 7b one. Or if there are fundamental differences at the level of architecture and training. Or maybe the 200k token context window plays a role? I am running LLaMa through Ollama, so I am using moderate settings.

I have even tried a couple of LLaMa derived models with similar results. I played with CodeQwen and it shows it isn't made to write articles.

So, anyone knowledgeable and with a bit of experience in using the various LLMs could help me find the needle in this haystack?

p.s. I wonder if all the various opensource LLMs out there are based on LLaMa, or if there are non LLaMa ones too!

🌐
Hacker News
news.ycombinator.com › item
Show HN: Fork of Claude-code working with local and other LLM providers | Hacker News
March 14, 2025 - As someone who is ignorant and not following all of the recent releases. Isn't Claude-code a proprietary version of https://aider.chat/ in the first place · It might be; but aider is Apache 2 licensed and I don't think Anthropic would be able to change the license.
🌐
Claude
code.claude.com › docs › en › llm-gateway
LLM gateway configuration - Claude Code Docs
Learn how to configure Claude Code to work with LLM gateway solutions. Covers gateway requirements, authentication configuration, model selection, and provider-specific endpoint setup.
🌐
Anthropic
anthropic.com › engineering › claude-code-best-practices
Claude Code: Best practices for agentic coding
Claude Code is intentionally low-level and unopinionated, providing close to raw model access without forcing specific workflows. This design philosophy creates a flexible, customizable, scriptable, and safe power tool.
🌐
Puzzmo
blog.puzzmo.com › posts › 2025 › 07 › 30 › six-weeks-of-claude-code
6 Weeks of Claude Code - Puzzmo Blog
July 29, 2025 - There are compilation steps in all of these systems which means everything has to be available locally and correct to run, this makes it a bit of a curve to learn but often when you have got it right - you know you have got it right. For our admin tools, its even more boring/mature, I’m still using Bootstrap! For an LLM, these technologies are very well baked into its training set and Claude Code knows to do things like “run the Relay compiler” (when I saw Claude Code first do that, I knew I was in for a wild ride) which gives it incremental ways to be validating the changes it has done are working.
🌐
GitHub
github.com › csabakecskemeti › cc_token_saver_mcp
GitHub - csabakecskemeti/cc_token_saver_mcp: Allow Claude code to use local llm for smaller tasks to save token or for specialized task
Basic Q&A Claude Code automatically tries the local LLM first for simple tasks, only using premium tokens when necessary for complex reasoning and multi-step workflows.
Author   csabakecskemeti
🌐
GitHub
github.com › futureHQ › LLMCode
GitHub - futureHQ/LLMCode: LLM Code (Open Claude Code) is an agentic coding tool that lives in your terminal, understands your codebase and helps you code faster through natural language commands
LLM Code (Open Claude Code) is an agentic coding tool that lives in your terminal, understands your codebase and helps you code faster through natural language commands - futureHQ/LLMCode
Starred by 57 users
Forked by 2 users
Languages   Python
🌐
Medium
medium.com › @michael.hannecke › connecting-claude-code-to-local-llms-two-practical-approaches-faa07f474b0f
Connecting Claude Code to Local LLMs: Two Practical Approaches
1 week ago - Claude Code speaks Anthropic’s Messages API. Ollama and LM Studio speak OpenAI’s chat completions format. They’re different protocols. You can’t just point ANTHROPIC_BASE_URL at your local Ollama instance and expect it to work. You need a translation layer. This isn’t over-engineering. It’s the minimum viable architecture for local LLM inference with Claude Code.
🌐
Daily.dev
app.daily.dev › posts › how-to-run-claude-code-against-a-free-local-model-fcy8m2aoa
How to run Claude Code against a free local model | daily.dev
March 5, 2025 - Explore how to use LM Studio and Anon Kode to run Claude Code on a local model without incurring high costs. The guide provides step-by-step instructions for setting up a locally-hosted LLM server and configuring Anon Kode to work with it, making the process accessible and budget-friendly.
🌐
Daily.dev
app.daily.dev › posts › running-claude-code-with-a-local-llm-a-step-by-step-guide-5zefxcntc
Running Claude Code with a Local LLM: A Step-by-Step Guide | daily.dev
July 28, 2025 - A guide explaining how to run Claude Code using local language models instead of cloud-based services, enabling offline development without internet connectivity. The approach allows developers to maintain coding assistance capabilities while ...
🌐
Medium
medium.com › @niklas-palm › claude-code-with-litellm-24b3fb115911
Claude Code with LiteLLM. I use Claude Code daily, and like many… | by Niklas Palm | Medium
July 17, 2025 - The simplest and fastest way of using Claude Code with LiteLLM proxying Bedrock with Anthropic as fallback, is to run it locally and configure Claude Code to use that local endpoint as gateway.