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.
Prerequisites
Section titled “Prerequisites”- Terminal access (macOS or Linux)
- A valid KeyMaker API key from your sponsor — see Getting Started
Installation
Section titled “Installation”-
Open a new terminal.
-
Install Claude Code:
Terminal window curl -fsSL https://claude.ai/install.sh | bash -
Add Claude Code to your path:
Terminal window echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc -
Go to your home directory and locate (or create) the
~/.claudefolder:Terminal window mkdir -p ~/.claude -
Create a new file called
settings.jsoninside~/.claude. -
Open
settings.jsonin your preferred text editor and add the configuration below. ReplaceYOUR_KEY_HEREwith your actual KeyMaker API key:{"env": {"ANTHROPIC_AUTH_TOKEN": "YOUR_KEY_HERE","ANTHROPIC_BASE_URL": "https://thekeymaker.umass.edu"}} -
Save the file.
-
Start Claude Code by typing
claudein the terminal:Terminal window claude
Troubleshooting
Section titled “Troubleshooting”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(notANTHROPIC_API_KEY) insettings.json. - Check that your sponsor’s funding is active and your access hasn’t been removed.
Connection or base URL errors
- Verify
ANTHROPIC_BASE_URLis exactlyhttps://thekeymaker.umass.eduwith no trailing slash. - Confirm your
settings.jsonis 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).
Next steps
Section titled “Next steps”- Usage and Best Practices — monitoring usage, cost awareness, and security
Need help?
Section titled “Need help?”- Get help: Contact us
- About campusGenAI: Main site
Your interface may look slightly different depending on your institution’s deployment.