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 or Linux)
  • A valid KeyMaker API key from your sponsor — see Getting Started
  1. Open a new terminal.

  2. Install Claude Code:

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

    Terminal window
    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
  4. Go to your home directory and locate (or create) the ~/.claude folder:

    Terminal window
    mkdir -p ~/.claude
  5. Create a new file called settings.json inside ~/.claude.

  6. Open settings.json in your preferred text editor and add the configuration below. Replace YOUR_KEY_HERE with your actual KeyMaker API key:

    {
    "env": {
    "ANTHROPIC_AUTH_TOKEN": "YOUR_KEY_HERE",
    "ANTHROPIC_BASE_URL": "https://thekeymaker.umass.edu"
    }
    }
  7. Save the file.

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

    Terminal window
    claude

claude: command not found The install directory isn’t on your path. Re-run step 3, 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.

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 is exactly https://thekeymaker.umass.edu 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.