Manually hunting for API keys and debugging crashes caused by a single missing environment variable is a familiar frustration for developers. It’s a time-consuming process that pulls focus away from actual development.
The latest release of the Gemini CLI (v0.28.0+) directly tackles this pain point with a significant new feature: Extension Settings. This update transforms how developers install and configure extensions, making the process more intuitive, secure, and reliable.
Here’s a closer look at the update and how it can simplify your workflow.
The Core Problem: Configuration That Just Works
Previously, setting up a Gemini CLI extension often felt like a scavenger hunt. You’d need to locate the correct README, identify the required environment variables, and manually export them in your shell. One missed step, and the extension would fail without a clear explanation.
The new Extension Settings feature embeds configuration directly into the installation flow.
- Guided Setup: When you install an extension, you’re automatically prompted for the necessary information, eliminating guesswork.
- Enhanced Security: Sensitive data, such as API keys and passwords, are now stored securely in your system’s keychain instead of plain-text files or shell histories.
- Contextual Configuration: You can set global preferences or define project-specific overrides using “workspaces,” ensuring the right settings are used in the right context.
In Practice: Setting Up the AlloyDB Extension
Consider the AlloyDB extension, which requires several details like Project ID, Region, and database credentials. With the update, you no longer need to track down and export these variables manually.
The CLI now initiates an interactive setup immediately after installation, guiding you through each step:
? Project ID: my-google-cloud-project
? Region: us-central1
? Cluster ID: my-cluster
...
✔ Extension "alloydb" installed successfully.
The CLI securely stores these values and automatically passes them to the extension. You can begin querying your database right away, confident that the connection is correctly configured.
Managing Your Configurations: The gemini extensions config Command
This update introduces a powerful new command, gemini extensions config, giving you a central hub to manage all your extension settings.
1. Interactive Configuration Management
To review or update all available settings for a specific extension, run:
gemini extensions config <extension-name>
This launches an interactive prompt, walking you through each configurable option.
2. Precision Updates
Need to change a single value, like an endpoint URL or cluster ID? You can target it directly:
gemini extensions config <extension-name> <env-var-name>
3. Project-Specific Settings with Workspaces
Working on multiple projects with different requirements? You can save settings for your current directory only. This keeps configurations contained and prevents them from interfering with other projects:
gemini extensions config alloydb ALLOYDB_CLUSTER --scope workspace
4. Simplified Debugging
If an extension isn’t behaving as expected, you can quickly inspect its current configuration:
- In Terminal:
gemini extensions list - In CLI:
/extensions list
This command provides a clear summary of installed extensions, their versions, and active settings, making it easy to spot misconfigurations or missing values.
For Extension Authors: Adding Settings to Your Extension
If you develop Gemini CLI extensions, integrating this feature is straightforward. Simply add a settings array to your extension’s gemini-extension.json manifest file.
You can define:
name&description: Provide clear context for users about what information is needed.envVar: Specify the environment variable the setting should map to.sensitive: Set totruefor API keys or passwords to ensure they are obfuscated and stored securely in the system keychain.
Get Started Today
The Extension Settings feature is available in the latest version of the Gemini CLI. To upgrade, run:
npm install -g @google/gemini-cli@latest
This update marks a significant step toward a smoother developer experience. By eliminating the friction of manual configuration, the Gemini CLI lets you spend less time wrestling with setup and more time building with your AI tools.
