How to Use Claude in PyCharm: JetBrains Claude Agent, Claude Code, and Novita AI

How to Use Claude in PyCharm: JetBrains Claude Agent, Claude Code, and Novita AI

If you want claude pycharm to mean more than autocomplete, there are two practical paths: use JetBrains’ Claude Agent inside PyCharm, or run Claude Code from PyCharm’s built-in terminal. Both give you an agent workflow for reading files, editing code, and running commands; the difference is whether you want the agent embedded in the IDE or living in the shell.

Claude in PyCharm: Two Real Ways to Work

PathBest forWhat you get
Claude Agent in PyCharmIDE-native tasksCurrent-file context, project instructions, MCP tools, and permission prompts inside AI Assistant
Claude Code in PyCharm terminalTerminal-first workflowsCLI sessions, slash commands, and direct control over model routing

If you only need one answer: use Claude Agent when you want a chat panel inside PyCharm, and use Claude Code when you want the same agent loop from the terminal tab.

Option 1: Claude Agent in PyCharm

JetBrains’ Claude Agent is built for codebase-aware work. It can plan and execute multi-step tasks, run commands, analyze results, and use tools. PyCharm can pass the active editor file and selected text automatically, so you do not have to reattach the obvious context every time.

Set it up by installing AI Assistant, activating Claude Agent, and choosing an auth method such as a JetBrains AI subscription, an API key, or Anthropic Console access. Then turn on the project instructions you want the agent to follow.

Useful setup points:

  • Put durable repo guidance in CLAUDE.md.
  • Use MCP if you need database, browser, or internal-tool access.
  • Pick Plan mode when you want analysis before edits.
  • Keep Auto or Accept Edits for faster iteration once the prompt is tight.

Option 2: Claude Code in the PyCharm Terminal

If you prefer a terminal workflow, PyCharm already gives you the shell you need. Claude Code is installed separately, then started from the project root.

npm install -g @anthropic-ai/claude-code
cd your-project
claude

To route Claude Code through Novita AI, set the Anthropic-compatible backend first:

export ANTHROPIC_BASE_URL="https://api.novita.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="<your-novita-api-key>"
export ANTHROPIC_MODEL="moonshotai/kimi-k2-instruct"
export ANTHROPIC_SMALL_FAST_MODEL="moonshotai/kimi-k2-instruct"

That keeps the same Claude Code workflow while letting you swap the backend model without changing the IDE.

Where Novita AI Fits

Novita AI gives you two useful layers here: an Anthropic-compatible model API and an isolated Agent Sandbox for heavier execution. Use the API for code reasoning and patch generation, then move expensive builds, test runs, or browser tasks into a sandbox when local execution is the wrong tradeoff.

That also gives you a clean escape hatch when Claude is not the cheapest option for routine refactors. The same PyCharm workflow can keep moving, but the backend can switch to an open-source Novita model like Qwen for day-to-day edits.

Suggested Workflow

  1. Start in PyCharm with Claude Agent for quick planning or file-aware chat.
  2. Move to Claude Code in the terminal when you want tighter control over prompts, commands, or session reuse.
  3. Use Novita AI as the backend when you want API routing, model choice, and predictable infra for agent runs.
  4. Offload long-running or risky tasks to Agent Sandbox.

FAQ

Does PyCharm support Claude?
Yes. The JetBrains AI Assistant surface includes Claude Agent, and PyCharm can also run Claude Code from its terminal.

Do I need a separate plugin for Claude Code?
No. Claude Code works from the terminal, so PyCharm’s built-in shell is enough.

Can I keep the same repo instructions across tools?
Yes. CLAUDE.md is the shared place for persistent instructions.

Novita AI is an AI cloud platform for model APIs, GPUs, and agent runtimes.