Skip to content

Claude Code Setup

Claude Code is Anthropic’s command-line coding agent. This page walks you through pointing it at KeyMaker so it runs on campusGenAI’s models, billed to your sponsor’s funding.

  • Terminal access (macOS, Linux, or Windows PowerShell)
  • A valid KeyMaker API key from your sponsor — see Getting Started

You don’t need a Claude subscription or an Anthropic account. KeyMaker takes their place.

macOS or Linux:

  1. Open a new terminal and install Claude Code:

    Terminal window
    curl -fsSL https://claude.ai/install.sh | bash
  2. Add Claude Code to your path:

    Terminal window
    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc

Windows (PowerShell):

  1. Open PowerShell. (Your prompt should start with PS C:\. If it starts with just C:\, you’re in Command Prompt. Type powershell and press Enter to switch.)

  2. Install Claude Code:

    Terminal window
    irm https://claude.ai/install.ps1 | iex

    The installer shows no progress while it downloads. Wait for the prompt to return.

  3. Close PowerShell and open a new window so it picks up the updated path.

Then, on any platform, confirm the installation:

Terminal window
claude --version

If you see a version number followed by (Claude Code), the installation was successful. For other install methods (Homebrew, WinGet, Linux package managers), see Anthropic’s Claude Code quickstart.

Claude Code reads its configuration from a settings.json file in a .claude folder in your home directory:

  • macOS / Linux: ~/.claude/settings.json
  • Windows: %USERPROFILE%\.claude\settings.json (for example, C:\Users\yourname\.claude\settings.json)
  1. Create the folder and open the file in a text editor.

    macOS / Linux:

    Terminal window
    mkdir -p ~/.claude && nano ~/.claude/settings.json

    Windows (PowerShell):

    Terminal window
    New-Item -ItemType Directory -Force "$env:USERPROFILE\.claude"
    notepad "$env:USERPROFILE\.claude\settings.json"

    If Notepad asks whether to create a new file, choose Yes.

  2. Add the configuration below. Replace YOUR_KEY_HERE with your actual KeyMaker API key, and YOUR_KEYMAKER_URL with the API Endpoint value from your KeyMaker portal:

    {
    "env": {
    "ANTHROPIC_AUTH_TOKEN": "YOUR_KEY_HERE",
    "ANTHROPIC_BASE_URL": "YOUR_KEYMAKER_URL"
    }
    }
  3. Save the file. In nano, press Ctrl + O then Enter, and exit with Ctrl + X. In Notepad, press Ctrl + S.

  4. Start Claude Code by typing claude in the terminal:

    Terminal window
    claude

    Claude Code shouldn’t ask you to log in. If it shows a login screen, it isn’t reading your settings.json. See Troubleshooting.

claude: command not found (macOS / Linux) The install directory isn’t on your path. Re-run the path step, then close and reopen your terminal. Confirm the binary exists with ls ~/.local/bin/claude. If you use bash rather than zsh, make sure you edited ~/.bashrc.

'claude' is not recognized (Windows) Close PowerShell and open a new window. If that doesn’t fix it, the install directory isn’t on your path. Follow Anthropic’s Fix your PATH instructions.

'irm' is not recognized or The token '&&' is not a valid statement separator (Windows) You’re in the wrong shell. irm only works in PowerShell, not Command Prompt. Open PowerShell and run the install command again.

Claude Code asks you to log in

  • Confirm the file is named exactly settings.json and is inside the .claude folder in your home directory. On Windows, make sure Notepad didn’t save it as settings.json.txt. In File Explorer, turn on View → Show → File name extensions to check.
  • Confirm the file is valid JSON (see below).

Invalid key / authentication errors

  • Confirm you copied the full key from the KeyMaker portal with no extra spaces or line breaks.
  • Make sure the key is set as ANTHROPIC_AUTH_TOKEN (not ANTHROPIC_API_KEY) in settings.json.
  • Check that your sponsor’s funding is active and your access hasn’t been removed.

Connection or base URL errors

  • Verify ANTHROPIC_BASE_URL matches the API Endpoint value in your KeyMaker portal exactly, with no trailing slash.
  • Confirm your settings.json is valid JSON. A missing comma or brace will prevent it from loading. Paste it into a JSON validator if unsure.
  • If you’re off-campus, make sure you can reach institutional services (some require a VPN).

Your interface may look slightly different depending on your institution’s deployment.