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

claude-code-updater

v1.0.3

Published

Auto-updater wrapper for Claude Code that checks for updates before execution

Readme

Claude Code Updater

A command-line tool that automatically manages and updates Claude Code installations with wrapper functionality.

Overview

Claude Code Updater solves the problem of manual Claude Code 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 Claude Code 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 claude-code-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/claude-code-updater.git
cd claude-code-updater
npm install
npm link

Usage

After installation, simply use claude as you normally would:

# Auto-updates and runs Claude Code
claude

# Pass any arguments to Claude
claude --resume
claude -p "Hello, world!"

# Skip update check for faster startup
claude --skip-update

How It Works

  1. Update Check: When you run claude, it first checks for Claude Code 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 Claude Code

Configuration

Config File Location

  • macOS/Linux: ~/.claude-code-updater/config.json
  • Windows: %USERPROFILE%\.claude-code-updater\config.json

Settings

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

Environment Variables

  • CLAUDE_UPDATER_DEBUG=true - Enable debug logging
  • CLAUDE_UPDATER_SKIP_UPDATE=true - Skip all update checks

Shell Integration

The installer automatically adds aliases to your shell configuration:

Bash/Zsh

alias claude='claude-code-updater'

Fish

alias claude 'claude-code-updater'

PowerShell

function claude { & claude-code-updater $args }

Commands

Main Command

claude [arguments]  # Auto-update and run Claude Code

Utility Commands

# Installation validation
npx claude-code-updater-install --validate

# Repair installation
npx claude-code-updater-install --repair

# Uninstall (preserve user data)
npm uninstall -g claude-code-updater

# Complete removal including user data
npx claude-code-updater-uninstall --clean

Version Management

Rollback to Previous Version

const Updater = require('claude-code-updater/lib/updater');
const updater = new Updater('@anthropic-ai/claude-code', 'claude');
await updater.rollbackToPreviousVersion();

Force Update

# Force update regardless of cooldown
CLAUDE_UPDATER_DEBUG=true claude --force-update

Troubleshooting

Common Issues

1. Claude not found after installation

# Check if Claude Code is installed
claude --version

# Install Claude Code if missing
npm install -g @anthropic-ai/claude-code

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 CLAUDE_UPDATER_DEBUG=true
claude --help

Log Files

Check log files for detailed information:

# View recent logs
tail -f ~/.claude-code-updater/updater.log

# Clear logs
rm ~/.claude-code-updater/updater.log

Manual Shell Setup

If automatic shell integration fails, add this alias manually:

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

Uninstallation

Method 1: Standard Uninstall (Recommended)

npm uninstall -g claude-code-updater

This automatically removes:

  • ✅ The npm package
  • ✅ Shell aliases
  • ✅ Binary files
  • ⚠️ Preserves user data (~/.claude-code-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/claude-code-updater/main/scripts/cleanup.js -o cleanup.js
node cleanup.js --clean

# Or if you have the package locally
npx claude-code-updater --cleanup --clean

Method 3: Manual Cleanup

If both methods fail, manual cleanup:

# 1. Force remove npm package
npm uninstall -g claude-code-updater --force

# 2. Remove binary files
rm -f ~/.nvm/versions/node/*/bin/claude
rm -f ~/.nvm/versions/node/*/bin/claude-code-updater
sudo rm -f /usr/local/bin/claude
sudo rm -f /usr/local/bin/claude-code-updater

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

# 4. Remove user data (optional)
rm -rf ~/.claude-code-updater

# 5. Restart terminal

Verification

After uninstallation, verify removal:

# Should show "command not found"
claude --version

# Should not list the package
npm list -g claude-code-updater

Development

Setup Development Environment

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

Run Tests

npm test

Debug Local Installation

CLAUDE_UPDATER_DEBUG=true node bin/claude-code-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 Claude Code and is not affiliated with Anthropic.