Skip to content

PyCharm + Claude Code + Z.AI

For this hackathon, the recommended AI development setup is:

  • JetBrains IDE (e.g. PyCharm) as your code editor
  • Claude Code running in the integrated terminal, powered by the Z.AI API

This gives you a powerful agentic AI assistant that can read, write, and reason about your entire project — directly from the terminal inside your IDE, without needing an Anthropic account or API key.

Why this setup? Claude Code via Z.AI is free for students at this hackathon, deeply capable, and works entirely within your existing JetBrains workflow.


The license server (jetbrains.ritsdev.top) is only accessible from within the NYU network. Before activating PyCharm, make sure you are connected to one of the following:

You only need to be on the NYU network for the activation step. Once activated, PyCharm works normally on any internet connection.


  1. Download PyCharm from jetbrains.com/pycharm and install it.
  2. Open PyCharm. On the welcome screen, click Unlock Pro Features (or go to Help > Register if already inside the IDE).
  3. Select Activate License.
  4. Choose License Server.
  5. Enter the following URL:
    https://jetbrains.ritsdev.top
  6. Click Activate — your license will be activated immediately.

Claude Code is a terminal-based AI agent. Install it globally with npm.

  • Node.js 18 or newer
    • macOS: Use nvm to install Node.js. Installing directly from the package may cause permission issues.
    • Windows: Install Git for Windows in addition to Node.js.
Terminal window
npm install -g @anthropic-ai/claude-code

Claude Code needs to be pointed at the Z.AI API instead of Anthropic’s servers. This is done by editing a settings file.

  • Mac/Linux: ~/.claude/settings.json
  • Windows: %USERPROFILE%\.claude\settings.json

If the file doesn’t exist, create it.

Open the file and paste in the following structure exactly. Replace the . in ANTHROPIC_AUTH_TOKEN with your Z.AI API key.

{
"model": "glm-5.1",
"availableModels": ["glm-5.1", "glm-5v-turbo"],
"env": {
"ANTHROPIC_AUTH_TOKEN": "your-zai-api-key-here",
"ANTHROPIC_BASE_URL": "https://open.bigmodel.cn/api/anthropic",
"API_TIMEOUT_MS": "3000000",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": 1
}
}

Where do I get my Z.AI API key? You’ll receive it from the hackathon organizers, or you can sign up at bigmodel.cn.

Close any running Claude Code session and reopen your terminal. Run claude again to pick up the new configuration.


Section titled “Step 4: Set Up the Vision Agent (Optional but Recommended)”

Z.AI provides a multimodal model (glm-5v-turbo) that can analyze screenshots and UI images. You can set this up as a dedicated Claude Code sub-agent.

In your PyCharm terminal, run:

Terminal window
mkdir -p .claude/agents

Open the nano editor:

Terminal window
nano .claude/agents/vision.agent.md

Copy and paste the following:

---
name: vision
description: Expert in analyzing screenshots and UI mockups.
model: glm-5v-turbo
---
You are the project's visual specialist. When the user provides an image, analyze it for UI/UX issues, layout bugs, or design-to-code translations. Provide clear, technical instructions back to the main agent so it can implement the code changes.
  1. Press Ctrl + O to write the file.
  2. Press Enter to confirm the filename.
  3. Press Ctrl + X to exit.
Terminal window
ls .claude/agents

You should see vision.agent.md listed.

Start Claude Code (claude) and type:

@vision are you there?

If it responds, you’re set. You can now drag images into the terminal and mention @vision to trigger the glm-5v-turbo model for that request.


  1. Open your project in PyCharm.
  2. Open the integrated terminal: View > Tool Windows > Terminal (or Alt+F12 / Option+F12 on macOS).
  3. Navigate to your project directory if needed:
    Terminal window
    cd your-project-directory
  4. Start Claude Code:
    Terminal window
    claude
  5. If prompted with “Do you want to use this API key?”, select Yes.

You now have a fully agentic AI assistant running inside your IDE terminal.


Claude Code not picking up the Z.AI config

Section titled “Claude Code not picking up the Z.AI config”

Make sure you closed the previous session before editing settings.json. Run claude in a fresh terminal after saving.

The npm global bin directory may not be in your PATH. Try:

Terminal window
npx @anthropic-ai/claude-code

Or check your npm global prefix:

Terminal window
npm config get prefix

Then add <prefix>/bin to your PATH.

Permission errors on macOS when installing

Section titled “Permission errors on macOS when installing”

Use nvm to manage your Node.js installation instead of the official macOS installer:

Terminal window
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
nvm install 20
nvm use 20
npm install -g @anthropic-ai/claude-code


Need help at the hackathon? Find a mentor or organizer — we’re here to help you get set up!