Gemini CLI
Setup
Open a terminal
Install globally
npm install -g @google/gemini-cli
Run the gcp authentication
gcloud auth login
(Select allow on the web page it opens)
In your home directory you should see a
.gemini
directory. Create a .env file and add the following
GOOGLE_CLOUD_PROJECT=“dev-digital-banno”
GOOGLE_CLOUD_LOCATION=“us-central1”
GOOGLE_GENAI_USE_VERTEXAI=true
Recommended*. Change to a project directory like ./Banno
Launch gemini by typing
gemini
Using Swiftlint
Swfitlint can be run within Gemini CLI using the .swiftlint.yml. It requires that you type
/directory add {Path to .swiftlint.yml}
after you launch the command line. Then it’s just a matter of prompting something like “run swiftlint on CreateWire.swift”
Claude Code CLI
Install Claude Code CLI.
Add these items to the .zshrc file your home directory.
export GOOGLE_CLOUD_PROJECT="dev-digital-banno"
export ANTHROPIC_VERTEX_PROJECT_ID="dev-digital-banno"
export GOOGLE_CLOUD_REGION="us-east5"
export CLOUD_ML_REGION="us-east5"
export ANTHROPIC_VERTEX_REGION="us-east5"
export CLAUDE_CODE_USE_VERTEX=1
Run claude from a new Terminal shell and choose Vertex AI as the auth method.