本页还没有译文
本页 44 段还没译成日本語,下面显示的是英文原文。Claude Code
还没翻译译自英文(docs.ollama.com)本页 44 段都还没译
Claude Code reads your codebase, edits files, and runs commands.
Ollama connects Claude Code to local and cloud models through its Anthropic-compatible API.
Get started
Launch Claude Code with Ollama:
ollama launch claudeCapabilities
Chat
Command line
Tool calling
File edits
Subagents
Web search
Web fetch
Vision
Thinking
Models
Choose a model with enough context for your repository.
Use larger models without downloading them.
Choose a model and set a 64k+ context window.
Note
For larger repositories, set the context length to 64k or higher.
More features
Run without interaction
Use --yes for scripts, Docker, or CI:
ollama launch claude --model gemma4:cloud --yes -- -p "how does this repository work?"The --yes flag skips selectors, pulls the model when needed, and requires --model. Arguments after -- are passed directly to Claude Code.
Web search
Use Ollama's web search API from Claude Code.
See Web search for setup and usage.
Scheduled tasks with /loop
Use /loop inside Claude Code to run a prompt or slash command on a schedule:
/loop <interval> <prompt or /command>Examples:
/loop 30m Check my open PRs and summarize their status
/loop 1h Research the latest AI news and summarize key developments
/loop 15m Check for new GitHub issues and triage by priorityTelegram
Connect a Telegram bot to your Claude Code session. Install the Telegram plugin, create a bot with @BotFather, then launch Claude Code:
ollama launch claude -- --channels plugin:telegram@claude-plugins-officialClaude Code prompts for permission on most actions. To allow the bot to work autonomously, configure permission rules or pass --dangerously-skip-permissions in an isolated environment.
See the plugin README for setup instructions.
Connect directly to Ollama's cloud
Install Claude Code, then set your API key in OLLAMA_API_KEY. No Ollama installation required.
In Bash or Zsh, run:
ANTHROPIC_BASE_URL=https://ollama.com \
ANTHROPIC_AUTH_TOKEN="$OLLAMA_API_KEY" \
ANTHROPIC_API_KEY="" \
claude --model glm-5.3-flashUse ANTHROPIC_AUTH_TOKEN for bearer authentication. Claude settings can override shell variables. Update any base URL or credentials in those settings, then run /status to check the connection.
Choose a cloud model that supports tools. Basic chat and file edits work with compatible models. Hosted WebSearch and advanced tool controls are not fully supported. See Anthropic compatibility.
Manual setup
1. Install Claude Code
macOS / LinuxWindows
curl -fsSL https://claude.ai/install.sh | bashirm https://claude.ai/install.ps1 | iex2. Set the environment variables
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_API_KEY=""
export ANTHROPIC_BASE_URL=http://localhost:114343. Run Claude Code
claude --model qwen3.5Or run with environment variables inline:
ANTHROPIC_AUTH_TOKEN=ollama ANTHROPIC_BASE_URL=http://localhost:11434 ANTHROPIC_API_KEY="" claude --model kimi-k2.7-code:cloud