{"id":240,"date":"2026-03-04T10:12:25","date_gmt":"2026-03-04T15:12:25","guid":{"rendered":"https:\/\/webestech.com\/farthinkai\/?p=240"},"modified":"2026-03-04T10:53:39","modified_gmt":"2026-03-04T15:53:39","slug":"how-to-run-claude-code-with-ollama-models","status":"publish","type":"post","link":"https:\/\/webestech.com\/farthinkai\/how-to-run-claude-code-with-ollama-models\/","title":{"rendered":"How to Run Claude Code with Ollama Models"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Claude Code is now FREE! \ud83d\ude80 Run it Locally with Ollama (Step-by-Step)\" width=\"1290\" height=\"726\" src=\"https:\/\/www.youtube.com\/embed\/qaL2KVB7lWA?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code># install Ollama\ncurl -fsSL https:\/\/ollama.com\/install.sh | sh # for  Linux\n\n# Pull the desired model\nOllama pull glm-4.7-flash:latest # replace with your model\n\n# Check the model list\nOllama ls\n\n# Install Claude Code\ncurl -fsSL https:\/\/claude.ai\/install.sh | bash\n\n# Connect Ollama\nexport ANTHROPIC_AUTH_TOKEN=ollama\nexport ANTHROPIC_BASE_URL=http:\/\/localhost:11434\n\n# Reload the shell\necho 'export PATH=\"$HOME\/.local\/bin:$PATH\"' &gt;&gt; ~\/.bashrc\nsource ~\/.bashrc\n\n# Check version\nclaude --version\n\n# Run Claude Code with an Ollama model\nclaude --model glm-4.7-flash:latest<\/code><\/pre>\n\n\n\n<p>Enjoy your powerful agentic coding with Claude Code and Ollama models for free!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Enjoy your powerful agentic coding with Claude Code and Ollama models for free!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[],"class_list":["post-240","post","type-post","status-publish","format-standard","hentry","category-ai-assistant"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/webestech.com\/farthinkai\/wp-json\/wp\/v2\/posts\/240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webestech.com\/farthinkai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webestech.com\/farthinkai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webestech.com\/farthinkai\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webestech.com\/farthinkai\/wp-json\/wp\/v2\/comments?post=240"}],"version-history":[{"count":2,"href":"https:\/\/webestech.com\/farthinkai\/wp-json\/wp\/v2\/posts\/240\/revisions"}],"predecessor-version":[{"id":243,"href":"https:\/\/webestech.com\/farthinkai\/wp-json\/wp\/v2\/posts\/240\/revisions\/243"}],"wp:attachment":[{"href":"https:\/\/webestech.com\/farthinkai\/wp-json\/wp\/v2\/media?parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webestech.com\/farthinkai\/wp-json\/wp\/v2\/categories?post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webestech.com\/farthinkai\/wp-json\/wp\/v2\/tags?post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}