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

qwen-code-updater

v1.0.2

Published

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

Readme

Qwen Code Updater

npm version License: MIT

An auto-updater wrapper for Qwen Code that automatically checks for updates before execution, ensuring you're always running the latest version.

Features

  • 🚀 Automatic Updates: Checks for and installs Qwen Code updates before execution
  • Smart Caching: Avoids redundant update checks with intelligent cooldown periods
  • 🔧 Zero Configuration: Works out of the box with sensible defaults
  • 📝 Detailed Logging: Comprehensive logging for debugging and monitoring
  • 🔄 Rollback Support: Version history tracking for potential rollbacks
  • 🛡️ Error Handling: Graceful fallback to current version if updates fail
  • 🎯 Drop-in Replacement: Use qwen command exactly as before

Installation

Install globally using npm:

npm install -g qwen-code-updater

This will install the updater and make the qwen command available globally.

Prerequisites

This package is a wrapper around the official Qwen Code CLI. You need to install it separately:

npm install -g @qwen-code/qwen-code@latest

Usage

The installer automatically sets up an alias so you can use qwen exactly as before, but with automatic updates:

# The updater will automatically check for updates, then run your command
qwen your-command-here

# Skip update check for this run (useful for automation)
qwen --skip-update your-command-here

Examples

# Start a new chat session (will check for updates first)
qwen

# Run with specific options
qwen --model qwen-plus "Write a hello world function"

# Skip update check for this execution
qwen --skip-update --help

Direct Usage (Alternative)

You can also call the updater directly:

qwen-code-updater your-command-here

How It Works

  1. Update Check: Before executing your command, the wrapper checks if a newer version of Qwen Code is available
  2. Smart Updates: If an update is found, it's automatically downloaded and installed
  3. Seamless Execution: Your original command is then executed with the updated version
  4. Intelligent Caching: Update checks are cached for 1 hour to avoid delays

Configuration

The updater creates a configuration directory at ~/.qwen-code-updater/ containing:

  • config.json: Settings and preferences
  • updater.log: Detailed execution logs

Environment Variables

  • QWEN_UPDATER_DEBUG=true: Enable debug logging for troubleshooting

Logging

Logs are automatically written to ~/.qwen-code-updater/updater.log. Enable debug mode for more detailed logging:

export QWEN_UPDATER_DEBUG=true
qwen your-command

Troubleshooting

Common Issues

Command not found: qwen

# Ensure the package is installed globally
npm install -g qwen-code-updater

# Check if npm global bin is in your PATH
npm config get prefix

Update check fails

  • The wrapper will proceed with your current Qwen Code version
  • Check your internet connection
  • Enable debug logging to see detailed error information

Qwen Code not found

# Install the official Qwen Code CLI
npm install -g @qwen-code/qwen-code@latest

Debug Mode

Enable detailed logging:

export QWEN_UPDATER_DEBUG=true
qwen --version

Check the log file:

tail -f ~/.qwen-code-updater/updater.log

Development

Local Testing

# Clone the repository
git clone https://github.com/0xRaghu/qwen-code-updater.git
cd qwen-code-updater

# Install dependencies
npm install

# Link for local testing
npm link

# Test the command
qwen --version

Package Structure

qwen-code-updater/
├── bin/
│   └── qwen-code-updater.js    # Main CLI entry point
├── lib/
│   ├── config.js               # Configuration management
│   ├── logger.js               # Logging utilities
│   ├── shell-detector.js       # Shell detection and PATH management
│   └── updater.js              # Update checking and installation logic
├── scripts/
│   ├── install.js              # Post-install setup
│   ├── uninstall.js           # Pre-uninstall cleanup
│   └── cleanup.js             # General cleanup utilities
├── package.json
├── README.md
└── LICENSE

Version Management

The updater maintains a version history for potential rollback scenarios. This information is stored in the configuration file and can be used for debugging or manual rollbacks if needed.

Security

  • All updates are fetched from the official npm registry
  • Package integrity is verified before installation
  • No sensitive data is logged or transmitted

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Related Projects

Acknowledgments

  • Thanks to the Qwen team for creating Qwen Code
  • Inspired by similar auto-updater patterns in the developer tools ecosystem

Note: This is an unofficial wrapper around Qwen Code. For official support, please refer to the Qwen Code documentation.