Once connected to Cloud Shell, you check that you're already authenticated and that the project is set to your project ID using the following command:
gcloud auth list
Run the following command in Cloud Shell to confirm that the gcloud command knows about your project.
gcloud config list project
If your project is not set, use the following command to set it:
gcloud config set project <YOUR_PROJECT_ID>
You can install Gemini CLI globally on your system first. You may need Administrator access to perform this step.
# option 1: install Gemini CLI
npm install -g @google/gemini-cli
# .. and then run
gemini
option 2: run without installing Gemini CLI
npx https://github.com/google-gemini/gemini-cli
gemini --version
If you installed Gemini CLI on your machine and launched it for the first time, you selected a theme and then an authentication method.
Now, on subsequent runs of Gemini CLI, you will not be asked to select a theme and authentication method again. This means that it is getting persisted somewhere and the file that it uses is called settings.json and it is the way to customize Gemini CLI.
Settings are applied with the following precedence (Cloud Shell only makes User settings available):
System: /etc/gemini-cli/settings.json (applies to all users, overrides user and workspace settings).
Workspace: .gemini/settings.json (overrides user settings).
User: ~/.gemini/settings.json.
Typical settings.json is like below
{
"theme": "Default",
"selectedAuthType": "oauth-personal" or "cloud-shell"
}
No comments:
Post a Comment