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 🙏

© 2025 – Pkg Stats / Ryan Hefner

tooler-utility-cli

v1.0.3

Published

A Node.js CLI utility tool for file compression, string manipulation, and API fetching.

Readme

Tooler Utility CLI

A Node.js command-line utility tool for file compression, string manipulation, and fetching weather data via API.

Features

  • String Manipulation

    • Convert file content to uppercase or lowercase
    • Count words in a file
    • Count palindromes in a file
  • File Compression

    • Compress files using gzip
    • Decompress .gz files
  • Weather Data

    • Fetch current weather information for any city using WeatherAPI

Installation

  1. Clone the repository:

    git clone https://github.com/Mohit-2803/cli_tool.git
    cd cli_tool
  2. Install dependencies:

    npm install
  3. (Optional) Link the CLI globally:

    npm link

    This allows you to use cli-tool from anywhere.


Usage

Run the CLI using:

node ./bin/index.js <command> [options]

Or, if linked globally:

cli-tool <command> [options]

Available Commands

String Manipulation

  • Uppercase

    cli-tool upper <filePath>

    Converts file content to uppercase.

  • Lowercase

    cli-tool lower <filePath>

    Converts file content to lowercase.

  • Word Count

    cli-tool count <filePath>

    Counts words in the file.

  • Palindrome Count

    cli-tool palindrome <filePath>

    Counts palindromes in the file.

File Compression

  • Compress

    cli-tool compress <filePath>

    Compresses the file using gzip.

  • Decompress

    cli-tool decompress <filePath.gz>

    Decompresses a .gz file.

Weather Data

  • Get Weather
    cli-tool weather <city>
    Fetches current weather for the specified city.

Example Usage

cli-tool upper ./notes.txt
cli-tool compress ./data.txt
cli-tool weather London

Environment Variables

For weather data, you need an API key from WeatherAPI.

  1. Create a .env file in the project root:
    WEATHER_API_KEY=your_api_key_here

Logging

All errors and info messages are timestamped and printed to the console for easy debugging.


Project Structure

bin/
  index.js           # CLI entry point
commands/
  compress.js        # Compression commands
  stringUtils.js     # String manipulation commands
  weather.js         # Weather API command
utils/
  logger.js          # Logging utility

License

ISC © Mohit Sharma


Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.


Author

Mohit Sharma