npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gemini-cli-updater

v1.0.3

Published

Auto-updater wrapper for Gemini CLI that checks for updates before execution

Readme

Gemini CLI Updater

A command-line tool that automatically manages and updates Gemini CLI installations with wrapper functionality.

Overview

Gemini CLI Updater solves the problem of manual Gemini CLI updates by automatically checking for and installing updates before each execution. It provides seamless auto-update functionality with cross-platform support and shell integration.

Features

  • Auto-update Gemini CLI on each execution
  • Cross-platform support (macOS, Linux, Windows)
  • Automatic shell alias configuration (bash, zsh, fish, PowerShell)
  • Smart update caching to avoid delays (1-hour cooldown)
  • Version tracking and rollback capabilities
  • Clean installation and uninstallation
  • Error handling and logging
  • Zero-configuration after installation

Installation

Via npm (Recommended)

npm install -g gemini-cli-updater

The installation will automatically:

  • Set up shell aliases for seamless integration
  • Create configuration directories
  • Initialize logging

Manual Installation

git clone https://github.com/0xRaghu/gemini-cli-updater.git
cd gemini-cli-updater
npm install
npm link

Usage

After installation, simply use gemini as you normally would:

# Auto-updates and runs Gemini CLI
gemini

# Pass any arguments to Gemini
gemini --help
gemini "Hello, world!"

# Skip update check for faster startup
gemini --skip-update "Quick command"

How It Works

  1. Update Check: When you run gemini, it first checks for Gemini CLI updates
  2. Smart Caching: Updates are checked at most once per hour to avoid delays
  3. Auto-Update: If an update is available, it's installed automatically
  4. Execution: Your original command is passed through to the actual Gemini CLI

Configuration

Config File Location

  • macOS/Linux: ~/.gemini-cli-updater/config.json
  • Windows: %USERPROFILE%\.gemini-cli-updater\config.json

Settings

{
  "settings": {
    "updateCooldown": 3600000,
    "maxVersionHistory": 10,
    "enableLogging": true,
    "autoUpdate": true
  }
}

Environment Variables

  • GEMINI_UPDATER_DEBUG=true - Enable debug logging
  • GEMINI_UPDATER_SKIP_UPDATE=true - Skip all update checks

Shell Integration

The installer automatically adds aliases to your shell configuration:

Bash/Zsh

alias gemini='gemini-cli-updater'

Fish

alias gemini 'gemini-cli-updater'

PowerShell

function gemini { & gemini-cli-updater $args }

Commands

Main Command

gemini [arguments]  # Auto-update and run Gemini CLI

Utility Commands

# Installation validation
npx gemini-cli-updater-install --validate

# Repair installation
npx gemini-cli-updater-install --repair

# Uninstall (preserve user data)
npm uninstall -g gemini-cli-updater

# Complete removal including user data
npx gemini-cli-updater-uninstall --clean

Version Management

Rollback to Previous Version

const Updater = require('gemini-cli-updater/lib/updater');
const updater = new Updater('@google/gemini-cli', 'gemini');
await updater.rollbackToPreviousVersion();

Force Update

# Force update regardless of cooldown
GEMINI_UPDATER_DEBUG=true gemini --force-update

Troubleshooting

Common Issues

1. Gemini not found after installation

# Check if Gemini CLI is installed
gemini --version

# Install Gemini CLI if missing
npm install -g @google/gemini-cli

2. Shell alias not working

# Restart terminal or reload shell config
source ~/.zshrc  # or ~/.bashrc

3. Permission errors

# Fix npm permissions (Unix-like systems)
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

Debug Mode

Enable debug logging to troubleshoot issues:

export GEMINI_UPDATER_DEBUG=true
gemini --help

Log Files

Check log files for detailed information:

# View recent logs
tail -f ~/.gemini-cli-updater/updater.log

# Clear logs
rm ~/.gemini-cli-updater/updater.log

Manual Shell Setup

If automatic shell integration fails, add this alias manually:

# Add to ~/.zshrc, ~/.bashrc, or equivalent
alias gemini='gemini-cli-updater'

Uninstallation

Method 1: Standard Uninstall (Recommended)

npm uninstall -g gemini-cli-updater

This automatically removes:

  • ✅ The npm package
  • ✅ Shell aliases
  • ✅ Binary files (wrapper only, preserves real @google/gemini-cli)
  • ⚠️ Preserves user data (~/.gemini-cli-updater/)

Method 2: Complete Cleanup (If Standard Fails)

If the standard uninstall doesn't work completely, use our cleanup script:

# Download and run the cleanup script
curl -L https://raw.githubusercontent.com/0xRaghu/gemini-cli-updater/main/scripts/cleanup.js -o cleanup.js
node cleanup.js --clean

# Or if you have the package locally
npx gemini-cli-updater --cleanup --clean

Method 3: Manual Cleanup

If both methods fail, manual cleanup:

# 1. Force remove npm package
npm uninstall -g gemini-cli-updater --force

# 2. Remove wrapper binary files (preserve real @google/gemini-cli)
# Check if ~/.nvm/versions/node/*/bin/gemini contains "gemini-cli-updater" and remove
rm -f ~/.nvm/versions/node/*/bin/gemini-cli-updater

# 3. Remove shell aliases
# Edit ~/.bashrc, ~/.bash_profile, ~/.zshrc
# Remove lines containing "gemini-cli-updater" or "alias gemini="

# 4. Remove user data (optional)
rm -rf ~/.gemini-cli-updater

# 5. Restart terminal

Important: The real @google/gemini-cli package will be preserved during cleanup.

Verification

After uninstallation, verify removal:

# Should show @google/gemini-cli version (not wrapper output)
gemini --version

# Should not list the wrapper package
npm list -g gemini-cli-updater

# Should still show the real Gemini CLI
npm list -g @google/gemini-cli

Development

Setup Development Environment

git clone https://github.com/0xRaghu/gemini-cli-updater.git
cd gemini-cli-updater
npm install
npm link

Run Tests

npm test

Debug Local Installation

GEMINI_UPDATER_DEBUG=true node bin/gemini-cli-updater.js --help

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

Requirements

  • Node.js >= 14.0.0
  • npm >= 6.0.0
  • Internet connection for updates

License

MIT License - see LICENSE file for details.

Support

Related Projects


Note: This tool is an unofficial wrapper for the Gemini CLI and is not affiliated with Google.