Claude Code Installation Guide
Last Updated: 2026-03-20 Audience: the company Employees Platform: Linux, macOS, Windows (WSL/PowerShell)
Table of Contents
- Overview
- Prerequisites
- Installation Steps
- Optional: Install Additional Components
- Configuration
- Verification
- Troubleshooting
- Advanced Topics
- Getting Help
- Quick Reference
Installation at a Glance
Quick Summary - 9 Steps
- Read & Submit compliance form (the company policies)
- Install Google Cloud CLI (platform-specific)
- Initialize gcloud with the company email
- Find your GCP Project ID (team-specific)
- Authenticate with GCP (application default)
- Set environment variables (VERTEX, REGION, PROJECT_ID)
- Persist config to ~/.bashrc or ~/.zshrc
- Install Claude Code CLI
- Launch from your project directory
Total Time: ~15-20 minutes
Overview
Claude Code is a CLI tool powered by the Claude AI model that enables you to code directly within your terminal. It provides intelligent assistance for:
- Building features from natural language descriptions
- Debugging code and resolving issues
- Navigating complex codebases
- Automating repetitive development tasks
Prerequisites
Required Reading & Compliance
Mandatory Form Submission
Before installing Claude Code, you MUST submit this compliance form confirming you have reviewed the following materials:
the company Policies: - Guidelines for Responsible Use of AI Code Assistants - Legal Guidelines for Using Code Assistant Tools - the company Policy on the Use of AI Technology - Guidelines on Use of AI Generated Content
Anthropic Documentation: - Claude Code Best Practices for Agentic Coding - Anthropic's Usage Policy - Claude Code User Guide
System Requirements
- Operating System: Linux (RHEL 7-10, Fedora 41-42), macOS, or Windows (WSL/PowerShell)
- Python: Version 3.10 to 3.14 (included in Google Cloud SDK installer for macOS)
- Internet Connection: Required for installation and authentication
- the company Email: Active the company email account
- GCP Access: Permission to the company's GCP projects
Check Python Version:
Installation Steps
Step 1: Install Google Cloud CLI
Install the Google Cloud SDK based on your operating system:
Prerequisites: - the company Enterprise Linux 7, 8, or 9 - Python 3.10 to 3.14
Add Repository:
# Add the Cloud SDK distribution URI as a package source
sudo tee -a /etc/yum.repos.d/google-cloud-sdk.repo << EOM
[google-cloud-cli]
name=Google Cloud CLI
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOM
Install Cloud SDK:
# Install required dependencies
sudo dnf install libxcrypt-compat.x86_64
# Install Google Cloud CLI
sudo dnf install google-cloud-cli
Prerequisites: - the company Enterprise Linux 10 - Python 3.10 to 3.14
Add Repository:
# Add RHEL 10 specific repository
sudo tee -a /etc/yum.repos.d/google-cloud-sdk.repo << EOM
[google-cloud-cli]
name=Google Cloud CLI
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el10-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key-v10.gpg
EOM
Install Cloud SDK:
# Install required dependencies
sudo dnf install libxcrypt-compat.x86_64
# Install Google Cloud CLI
sudo dnf install google-cloud-cli
Prerequisites: - Fedora 41 or 42 - Python 3.10 to 3.14
Add Repository:
# Use RHEL 9 repository (compatible with Fedora)
sudo tee -a /etc/yum.repos.d/google-cloud-sdk.repo << EOM
[google-cloud-cli]
name=Google Cloud CLI
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOM
Install Cloud SDK:
# Install required dependencies
sudo dnf install libxcrypt-compat.x86_64
# Install Google Cloud CLI
sudo dnf install google-cloud-cli
Prerequisites:
- Python 3.10 to 3.14 (check with python3 -V)
- macOS with Intel processor
Download and Install:
# Download Cloud SDK for x86_64
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-darwin-x86_64.tar.gz
# Extract archive
tar -xf google-cloud-cli-darwin-x86_64.tar.gz
# Run installation script
./google-cloud-sdk/install.sh
# Restart your shell
exec -l $SHELL
Prerequisites:
- Python 3.10 to 3.14 (check with python3 -V)
- macOS with Apple Silicon (M1/M2/M3)
Download and Install:
# Download Cloud SDK for ARM64
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-darwin-arm.tar.gz
# Extract archive
tar -xf google-cloud-cli-darwin-arm.tar.gz
# Run installation script
./google-cloud-sdk/install.sh
# Restart your shell
exec -l $SHELL
Use the Linux (RHEL/Fedora) instructions above within Windows Subsystem for Linux.
WSL Users
If you're using WSL with Ubuntu/Debian, you may need to use apt instead of dnf. Check Google Cloud documentation for Debian-based instructions.
Step 2: Initialize Google Cloud SDK
During initialization:
- Sign in:
- The command opens a web browser for authorization
- Sign in with your the company email account (@company.com)
-
Grant the requested permissions
-
Select Configuration:
-
Choose to create a new configuration or reinitialize existing
-
Select Project:
- When prompted, enter
[1]to configure a default project - You'll set the actual project in Step 3
Command-Line Only Authentication
If you prefer not to use a web browser, run:
Verify Basic Installation:
# List authenticated accounts
gcloud auth list
# View current configuration
gcloud config list
# Check gcloud version
gcloud version
Step 3: Find Your GCP Project ID
Finding Your Project ID
Your project ID is based on your organizational reporting line.
Steps:
- Open the GCP Project ID Spreadsheet
- Find the GCP name in Column C that aligns with your team
- Look for the project associated with your closest upline manager
- Note this project ID - you'll use it throughout the installation
Important
Replace GCP_PROJECT_ID in all following commands with your actual project ID from the opsadsheet.
Step 4: Set Up Default Authentication
# Set up application default login (may show an error - continue anyway)
gcloud auth application-default login
# Set quota project (use exactly as shown - same for everyone)
gcloud auth application-default set-quota-project cloudability-it-gemini
Note
Leave cloudability-it-gemini as-is in the second command - this is static for all the company users.
Step 5: Set Environment Variables
Replace GCP_PROJECT_ID with your actual project ID from Step 3:
export CLAUDE_CODE_USE_VERTEX=1
export CLOUD_ML_REGION=us-east5
export ANTHROPIC_VERTEX_PROJECT_ID=GCP_PROJECT_ID # Replace with your actual project ID
Step 6: Make Configuration Persistent
Make these environment variables permanent by adding them to your shell configuration:
# Add to ~/.bashrc
echo 'export CLAUDE_CODE_USE_VERTEX=1' >> ~/.bashrc
echo 'export CLOUD_ML_REGION=us-east5' >> ~/.bashrc
echo 'export ANTHROPIC_VERTEX_PROJECT_ID=GCP_PROJECT_ID' >> ~/.bashrc # Replace GCP_PROJECT_ID
# Reload configuration
source ~/.bashrc
# Add to ~/.zshrc (default on macOS)
echo 'export CLAUDE_CODE_USE_VERTEX=1' >> ~/.zshrc
echo 'export CLOUD_ML_REGION=us-east5' >> ~/.zshrc
echo 'export ANTHROPIC_VERTEX_PROJECT_ID=GCP_PROJECT_ID' >> ~/.zshrc # Replace GCP_PROJECT_ID
# Reload configuration
source ~/.zshrc
Step 7: Install Claude Code
Install Claude Code using the appropriate script for your platform:
# Download installation script
curl -fsSL https://claude.ai/install.sh -o claude-install.sh
# Make executable
chmod +x claude-install.sh
# Run installer
./claude-install.sh
# Download and run installation script
irm https://claude.ai/install.ps1 | Out-File claude-install.ps1
.\claude-install.ps1
Step 8: Set Working Directory
Important
Claude Code can only access files within the directory where you launch it. Navigate to your preferred working directory before launching.
# Navigate to your project directory
cd /path/to/your/project
# Or create a new directory
mkdir ~/my-claude-workspace
cd ~/my-claude-workspace
Step 9: Launch Claude Code
You should see the Claude Code CLI interface with a welcome message.
Optional: Install Additional Google Cloud Components
Google Cloud SDK supports additional components that may be useful:
kubectl (Kubernetes CLI)
# Install kubectl component
gcloud components install kubectl
# Verify installation
kubectl version --client
Other Useful Components
# List all available components
gcloud components list
# Install specific components
gcloud components install app-engine-python # App Engine for Python
gcloud components install app-engine-go # App Engine for Go
gcloud components install cloud-sql-proxy # Cloud SQL Proxy
gcloud components install beta # Beta commands
gcloud components install alpha # Alpha commands
# Update all installed components
gcloud components update
Component Installation
Installing components requires write access to the Cloud SDK installation directory. On Linux with package manager installation, you may need sudo.
Configuration
Example Shell Configuration
Your ~/.bashrc or ~/.zshrc should include these entries at the end:
# Claude Code Setup
# Google Cloud SDK paths (if not using RHEL/Fedora packages)
if [ -f "$HOME/google-cloud-sdk/path.bash.inc" ]; then
. "$HOME/google-cloud-sdk/path.bash.inc"
fi
if [ -f "$HOME/google-cloud-sdk/completion.bash.inc" ]; then
. "$HOME/google-cloud-sdk/completion.bash.inc"
fi
# Claude Code environment variables
export CLAUDE_CODE_USE_VERTEX=1
export CLOUD_ML_REGION=us-east5
export ANTHROPIC_VERTEX_PROJECT_ID=your-actual-gcp-project-id # Replace with your project ID
Verification
Check Installation Status
Run the status command to verify your setup:
Inside Claude Code, run:
Expected output should show:
| Setting | Expected Value | Status |
|---|---|---|
| Provider | Google Vertex AI | |
| GCP Project | your-project-id | |
| Region | us-east5 | |
| Model | claude-sonnet-4-5 or claude-opus-4-6 |
If you see "Anthropic API" instead of "Google Vertex AI", check your environment variables in Step 5.
Initialize Project Documentation
Generate a CLAUDE.md file for your codebase:
This creates project-specific documentation that helps Claude understand your codebase better.
Basic Commands
| Command | Description |
|---|---|
/status |
Show configuration and connection status |
/init |
Generate CLAUDE.md project documentation |
/help |
Display all available commands |
/commit |
Create a git commit with AI-generated message |
/clear |
Clear conversation history |
/exit |
Exit Claude Code |
Troubleshooting
Quick Diagnostic Flowchart
Claude not working?
│
├─ "command not found: claude"
│ └─> Run ./claude-install.sh again
│ └─> Check PATH in ~/.bashrc or ~/.zshrc
│
├─ "command not found: gcloud"
│ └─> Reinstall Google Cloud SDK (Step 1)
│ └─> Check PATH settings
│
├─ "Authentication failed"
│ └─> Run: gcloud auth application-default login
│ └─> Check the company email is used
│
├─ "Permission denied" or "Invalid project"
│ └─> Verify ANTHROPIC_VERTEX_PROJECT_ID is correct
│ └─> Check project ID in opsadsheet
│
├─ Provider shows "Anthropic API" not "Google Vertex AI"
│ └─> Check environment variables are set
│ └─> Run: echo $CLAUDE_CODE_USE_VERTEX (should be 1)
│ └─> Reload shell: source ~/.bashrc
│
└─ Other issues
└─> Run /status inside Claude
└─> Check #help-rh-code-assist on Slack
Issue: Authentication Errors
Error: Application default credentials not found
Solution:
# Re-run authentication
gcloud auth application-default login
gcloud auth application-default set-quota-project cloudability-it-gemini
Issue: Wrong GCP Project
Error: Permission denied or Project not found
Solution:
- Verify your project ID in the opsadsheet
- Update environment variable:
Issue: Claude Not in PATH
Error: claude: command not found
Solution:
Restart your terminal or reload shell configuration:
Issue: Provider Shows "Anthropic API" Instead of "Google Vertex AI"
Error: Using wrong provider
Solution:
Check environment variables are set:
echo $CLAUDE_CODE_USE_VERTEX # Should output: 1
echo $CLOUD_ML_REGION # Should output: us-east5
echo $ANTHROPIC_VERTEX_PROJECT_ID # Should output: your-project-id
If not set, re-run Step 6 and reload your shell.
Issue: Unable to Access Files
Error: Permission denied or File not found
Solution:
Claude Code can only access files in the directory where you launched it. Launch from your project root:
Issue: Python Version Incompatible
Error: Python 3.x.x is not supported
Solution:
Google Cloud SDK requires Python 3.10 to 3.14:
# Check version
python3 -V
# If too old, install newer Python (RHEL/Fedora)
sudo dnf install python3.11
# macOS (using Homeservice-c)
service-c install python@3.11
Issue: Repository GPG Key Error
Error: GPG check FAILED
Solution:
# Re-import GPG key
sudo rpm --import https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
# RHEL 10 uses different key
sudo rpm --import https://packages.cloud.google.com/yum/doc/rpm-package-key-v10.gpg
Issue: gcloud Command Not Found After Installation
Error: bash: gcloud: command not found
Solution:
For macOS/manual installation:
# Add to PATH (if using manual installation)
export PATH=$PATH:$HOME/google-cloud-sdk/bin
# Add to shell config permanently
echo 'export PATH=$PATH:$HOME/google-cloud-sdk/bin' >> ~/.bashrc
source ~/.bashrc
For Linux package installation:
# Package should install to /usr/bin/gcloud automatically
# If not found, reinstall
sudo dnf reinstall google-cloud-cli
Getting Help
the company Internal Support
If you encounter issues:
- Slack Channel: #help-rh-code-assist
- Documentation: Check the Claude Code User Guide
- GCP Issues: Contact your team's GCP administrator
Useful Resources
- the company AI Hub: source.company.internal/projects_and_programs/ai
- Anthropic Best Practices: Claude Code Best Practices
- Google Cloud SDK: cloud.google.com/sdk/docs
Quick Reference
Essential Commands (Inside Claude)
| Command | Description | Example Usage |
|---|---|---|
/status |
Check configuration and connection | Verify GCP project and provider |
/init |
Initialize project documentation | Generate CLAUDE.md for codebase |
/commit |
Create git commit with AI message | Auto-generate commit from changes |
/help |
Show all available commands | List all / commands |
/clear |
Clear conversation history | Start fresh conversation |
/exit |
Exit Claude Code | Close CLI session |
/model |
Change AI model | Switch between Sonnet/Opus |
/config |
View/edit configuration | Change settings |
Environment Variables
# Required for the company Claude Code via Vertex AI
export CLAUDE_CODE_USE_VERTEX=1
export CLOUD_ML_REGION=us-east5
export ANTHROPIC_VERTEX_PROJECT_ID=your-gcp-project-id
# Optional: Set default model
export CLAUDE_MODEL=claude-sonnet-4-5
Launch Claude
# Navigate to project directory
cd /path/to/your/project
# Launch Claude Code
claude
# Or specify a different directory
claude --directory=/path/to/project
Verify Installation Checklist
# 1. Check gcloud is installed
gcloud version
# 2. Check authentication
gcloud auth list
# 3. Check project is set
gcloud config get-value project
# 4. Check environment variables
echo $CLAUDE_CODE_USE_VERTEX # Should be: 1
echo $CLOUD_ML_REGION # Should be: us-east5
echo $ANTHROPIC_VERTEX_PROJECT_ID # Should be: your-project-id
# 5. Launch Claude
claude
# Then inside Claude: /status
Common File Locations
| File | Purpose | Location |
|---|---|---|
| gcloud config | Google Cloud SDK settings | ~/.config/gcloud/ |
| Shell config | Environment variables | ~/.bashrc or ~/.zshrc |
| Claude cache | Conversation history | ~/.claude/ |
| Project docs | Generated by /init | CLAUDE.md in project root |
Advanced Topics
Multiple GCP Projects
If you work with multiple GCP projects:
# List all configurations
gcloud config configurations list
# Create new configuration for different project
gcloud config configurations create project-two
gcloud config set project OTHER-PROJECT-ID
# Switch between configurations
gcloud config configurations activate default
gcloud config configurations activate project-two
# Set project for current configuration
gcloud config set project YOUR-PROJECT-ID
Using Claude Code in Different Directories
Claude Code creates a separate conversation context per directory:
# Project 1
cd ~/projects/frontend
claude # Separate context
# Project 2 (different terminal)
cd ~/projects/backend
claude # Different context
IDE Integration
Run Claude Code in your IDE's integrated terminal for seamless workflow:
VS Code:
1. Open integrated terminal: Ctrl+`
2. Navigate to project root
3. Run claude
JetBrains IDEs (IntelliJ, PyCharm):
1. Open terminal: Alt+F12 (Linux) or ⌥F12 (Mac)
2. Navigate to project root
3. Run claude
Accessibility Features
Enable screen reader support:
Offline Documentation
Access gcloud help without internet:
# Get command help
gcloud help
# Get help for specific command
gcloud help auth
# List all commands
gcloud help --help
Happy Coding with Claude!
For questions or issues, reach out on #help-rh-code-assist.