To update Gemini CLI, run npm install -g @google/gemini-cli@latest for the stable channel, or install an exact version number, then check what you got with gemini --version. After that, record the change and evaluate it against your validated state.
If a Gemini CLI output feeds a discovery-funnel screen or an imaging-augmentation step, the regulated user stays accountable for showing that the version in use is covered.
How to update Gemini CLI: the commands and the channel choice
Gemini CLI ships through npm on three channels. Nightly is built from main every night. Code moves to preview after no more than a week on main, and the latest preview is promoted to stable a week after that. New stable and preview releases are cut each Tuesday at about 20:00 UTC. The project follows semantic versioning: the weekly releases are minor version increments, and hotfixes between releases go out as patch versions on the most recent release. Google recommends the stable channel for most users. Stable is a full promotion of the previous week’s release plus bug fixes and validations, and it is installed through the latest tag.
These are the commands that matter in practice:
npm install -g @google/gemini-cli@latest: the current stable release.npm install -g @google/gemini-cli@<version>: an exact version, which is what a validated environment should install.npx -y @google/gemini-cli@<release tag> --version: confirms that a specific tag resolves to the version you expect without changing the global install.gemini --version: confirms what is installed globally.
npm is the source of truth for the release channels. Google’s release workflow reads the latest, preview and nightly dist-tags from npm, and it stops if a version listed there has no matching git tag or GitHub Release.
For regulated work, our advice is to stay off nightly and preview entirely. Treat @latest as a way to find the next candidate version, not as the thing you install. A tag that moves every week cannot be an identifier in a validation record.
Gemini CLI or Antigravity CLI: confirm which tool you are updating
Before you plan the version bump, check which tier you are on. Google announced that from 18 June 2026, Gemini CLI and the Gemini Code Assist IDE extensions would stop serving requests for Google AI Pro and Ultra users, and for people using Gemini Code Assist for individuals free of charge. Organisations on Gemini Code Assist Standard or Enterprise licences, or using Gemini Code Assist for GitHub through Google Cloud, keep their access. Google says it will continue to support Gemini CLI for them with the latest Gemini models, and Gemini CLI also stays available through paid Gemini and Gemini Enterprise Agent Platform API keys.
There are therefore two kinds of update:
- Enterprise or paid-API users keep their Gemini CLI access unchanged, with continued updates from Google.
- Consumer-tier users lose Gemini CLI service; Google offers Antigravity CLI, which lacks 1:1 feature parity at first but keeps Agent Skills, Hooks, Subagents and Extensions (as plugins).
In a validated environment, switching to Antigravity CLI is a system replacement. It needs its own requirements check, its own testing and its own approval. It is not a patch. The draft revision of EU GMP Annex 11 says that validation on updated platforms, and any data migration, should be planned and completed before the vendor’s support expires. We read that as making the 18 June date a planning deadline for any team still on a consumer tier.
What should you check in the release notes before upgrading?
The Gemini CLI changelog shows that every one of the categories below has changed at least once:
| What to look for | Example from the Gemini CLI changelog | Why it matters in a validated pipeline |
|---|---|---|
| Removed or deprecated flags | v0.11.0 removed --all-files / -a and the --telemetry-* flags |
Scripts that call the CLI with old flags fail, or behave differently |
| Replaced control mechanisms | v0.30.0 added --policy and deprecated --allowed-tools in favour of the policy engine |
Your tool-permission controls may need to be re-expressed and retested |
| Default model changes | v0.29.0 removed the preview flag and turned on Gemini 3 by default for all users | An unpinned run uses a different model after the upgrade |
| Security defaults | v0.24.0 made untrusted the default folder trust setting | Workflows that relied on trusted folders change how they behave |
| Security hardening | v0.61.0 addressed indirect prompt injection through build-file changes and untrusted flags, and hardened filesystem boundaries | A strong reason to take the upgrade, but it still has to go through change control |
| State and settings handling | v0.64.0 introduced atomic CLI state persistence with recovery from backup on corruption | Check that existing state and settings carry over cleanly |
The security rows need care. GMP guidance expects security patches for operating systems and network components to be applied promptly per vendor recommendations, under change management. The draft Annex 11 adds that a critical vulnerability might need to be patched immediately. The way to handle this is a graduated procedure inside your change process, with short completion times set for hot-fixes. Skipping the process is not the answer.
How do you pin and roll back a Gemini CLI version?
Pin the CLI to an exact version recorded in the project: a lockfile, a container image tag or a package.json in the project that wraps the CLI. In model versioning, every change to code, configuration, data or hyperparameters creates a new version that can be verified and recreated on its own. Reproducibility means anyone can rebuild a given version from the same inputs, code and environment.
A release with a critical regression can be rolled back by changing the npm dist-tag through the Release: Change Tags workflow, which avoids a full release cycle. That changes the version the dist-tag points to. It leaves versions already installed on your machines untouched. Your own rollback is npm install -g @google/gemini-cli@<approved version>, or redeploying the image you built before the change. As with retiring a model, the rollback only holds up if earlier artefacts and configuration stay redeployable without rebuilding the pipeline.
Pin the model as well as the CLI
The Gemini CLI /model command, or the --model flag at startup, sets the model, and the Auto setting, which Google recommends for most users, lets the system choose a model for each task. That convenience is a problem for reproducibility, because the same prompt can go to a different model depending on how the router judges it.
Google’s model documentation separates the alias types. A stable model name points to a specific model that usually does not change, and Google says most production apps should use one. A latest alias is swapped with each new release of that model variation, with two weeks’ email notice before breaking changes. Preview models are deprecated with at least two weeks’ notice. In regulated work, set --model to a stable model ID and record it next to the CLI version. Treat a deprecation notice as the trigger for a change request.
For fleets of machines, Gemini CLI supports system-level settings files that administrators manage. A system overrides file takes precedence over user and workspace settings. Because users could point GEMINI_CLI_SYSTEM_SETTINGS_PATH somewhere else, Google suggests a wrapper script or alias that always sets it to the controlled path. We would put the pinned model and the allowed tools in that file so they cannot drift from one machine to another.
Testing a Gemini CLI update in isolation before promotion
Install the candidate version in a separate environment, such as a container or a clean virtual machine. Run a fixed set of known-answer tasks against it, compare the results with the approved version, and promote only if the comparison passes acceptance criteria agreed beforehand. The draft EU GMP Annex 22 expects a test plan to be prepared and approved before testing starts. The plan states the intended use, the predefined metrics and acceptance criteria, the test data and a step-by-step test script. The draft Annex 11 asks for test scripts detailed enough that the test steps can be repeated correctly.
Promotion should be a gate that is hard to bypass, not a judgement call made on the day. Shadow mode is a low-risk way to validate against real traffic. The new version processes the same inputs in parallel and its outputs are compared, but they do not reach anyone downstream. Make the test set uncomfortable on purpose: a validation process that always confirms the system works is not rigorous enough.
Expect some variation even with settings pinned. One study ran five LLMs configured to be deterministic over eight tasks, ten runs each. It found accuracy varying by up to 15% between runs, and none of the models gave repeatable accuracy on every task, let alone identical output strings. The authors fixed the temperature at 0, top-p at 1 and the seed, on the same infrastructure. Write acceptance criteria as tolerances on parsed answers or task metrics, not as exact string matches. Run the baseline several times so you know how much variation is normal before you blame the upgrade. “Reproducible” in a validation report should mean reproducible within those stated bounds.
Once the new version is live, monitoring against established baselines continues the same comparison. Our piece on how a monitoring harness gets updated when the model updates covers keeping that baseline honest across version changes.
Why does an in-place upgrade break the audit trail?
An in-place npm install -g replaces the software that produced your records without creating a change record. The draft Annex 11 defines an audit trail as a secure, time-stamped, computer-generated record that allows the creation, modification or deletion of an electronic record to be reconstructed. If you cannot tell which CLI and model version produced a record, you cannot reconstruct how it was made.
For GenAI, an audit-trail design published by Virideed says each inference event should capture the model state, meaning the model version and the sampling parameters in use, along with the full input and output. The same source says logs must be complete rather than sampled. We would log the CLI version next to the model version, because CLI releases have changed default models and tool permissions. The draft Annex 11 also expects periodic reviews to find undocumented changes, for example through configuration auditing. An unrecorded npm install -g is exactly the kind of change that check is meant to find. For GxP AI systems, records must meet electronic records and signature requirements such as FDA 21 CFR Part 11.
The draft Annex 11 says any change to a computerised system, including its configuration and software components, should be made under defined procedures. Significant changes that could affect product quality, patient safety or data integrity should be subject to re-qualification and validation. The draft Annex 22 extends this to AI: the model, the system it runs in and the process it supports all go under change control, and any decision not to retest after a change must be fully justified. ECA Academy’s summary of current GMP expectations already includes a documented impact assessment, approval by responsible persons and an evaluation after implementation.
The upgrade checklist for a validated Gemini CLI environment
- Confirm your tier and the support horizon. Google announced that consumer tiers would lose Gemini CLI service from 18 June 2026. Standard and Enterprise licences continue.
- Open a change record with the current and target versions and a justification for the change.
- Review the release notes for every version in between, looking for removed flags, default model changes, security defaults and changes to state handling (see the table above).
- Assess the impact on the validated state and decide the retest scope. Write down the justification if you decide not to retest.
- Get approval from the responsible person before implementing the change.
- Install the exact version in isolation and confirm it with
--version. - Pin the model with
--modelset to a stable model ID, enforced through system settings. - Run the approved known-answer tests and compare the results with the baseline within the stated tolerances.
- Promote through the gate, keeping the previous version and configuration ready to redeploy.
- Log the model version and sampling parameters on every run from then on, and evaluate the change after implementation.
How does CLI and model version control fit into a GenAI feasibility audit?
Tooling version discipline is part of the reproducibility and change-control checks we would make when a GenAI pipeline is being prepared for a regulated validation path. It costs little to put in place early and a lot to retrofit. The questions are straightforward. Is every tool and model version pinned and recorded? Can the team rebuild last quarter’s environment? Do the logs show which versions produced which outputs? Is there a written procedure for vendor updates that includes the security hot-fix route? Discovering that during feasibility is much cheaper than discovering it during an inspection.
The draft Annex 11 is clear that supplier documentation does not shift accountability. The regulated user must review the documentation and decide whether it covers the version actually in use. Google’s release notes describe what changed in each release. They cannot tell you whether your discovery-screening or imaging pipeline still gives the answers it gave when you validated it. Only your own known-answer tests, run on your own data, can answer that.