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

dev-utility-cli

v1.0.0

Published

Developer utility CLI: count, copy, system diagnostics

Downloads

104

Readme

dev-utility-cli

A simple, fast, and cross-platform Developer Utility CLI built with Node.js. This tool helps developers perform common tasks directly from the terminal, such as:

  • 📄 Text analysis (lines, words, characters)
  • 📂 File copy operations (cross-platform)
  • 🖥️ System diagnostics

Designed to be easy to use, beginner-friendly, and production-ready.


✨ Features

  • ✅ Count lines, words, and characters in any text file
  • ✅ Copy files from one location to another (Windows, Linux, macOS)
  • ✅ View system diagnostics (OS, CPU, memory, Node.js version)
  • ✅ Clean CLI interface
  • ✅ Proper error handling
  • ✅ Cross-platform path support using Node.js path module

📦 Installation

Install globally using npm:

npm install -g dev-utility-cli

After installation, the dev command will be available globally.


🚀 Usage

General command format:

dev <command> [arguments]

📄 Text Analysis (Count Command)

Analyze a text file and get the number of lines, words, and characters.

Command

dev count <file-path>

Example

dev count text.txt

Output

📄 File Analysis
----------------
Words : 120
Lines : 10
Chars : 800

What it does internally

  • Reads the file using fs.readFile

  • Splits text by:

    • \n for lines
    • spaces for words
  • Uses .length for character count

  • Handles file-not-found (ENOENT) errors gracefully


📂 File Copy (Copy Command)

Copy a file from one location to another — similar to copy & paste, but from the terminal.

Command

dev copy <source> <destination>

Example

dev copy ./data/file.txt ./backup/file.txt

Output

✅ File copied successfully
From: ./data/file.txt
To  : ./backup/file.txt

Highlights

  • Uses cross-platform paths
  • Automatically resolves relative paths
  • Works on Windows, Linux, and macOS

🖥️ System Diagnostics (System Command)

Display useful system information.

Command

dev system

Output (example)

🖥️ System Diagnostics
----------------------
OS        : Windows_NT
Platform  : win32
Arch      : x64
CPU       : Intel(R) Core(TM)
Cores     : 8
Memory    : 7.21 GB free / 16.00 GB total
Node.js   : v20.x.x
Uptime    : 132 minutes

🧠 Why this CLI?

This project was built to:

  • Practice Node.js file system operations
  • Understand CLI architecture
  • Learn cross-platform path handling
  • Build a real npm package
  • Help beginners understand how developer tools are built

🗂️ Project Structure

dev-utility-cli/
│
├── bin/
│   └── index.js        # CLI entry point
│
├── Command/
│   ├── Count.js        # Text analysis
│   ├── Copy.js         # File copy
│   └── System.js       # System diagnostics
│
├── package.json
├── README.md

⚠️ Error Handling

  • Shows helpful messages when:

    • File path is missing
    • File does not exist (ENOENT)
    • Invalid command is used
  • Prevents crashes and improves CLI experience


🛠️ Requirements

  • Node.js v18+ recommended
  • npm installed

🔮 Future Improvements (Roadmap)

  • Multiple file support
  • Folder copy (recursive)
  • --words, --lines, --chars flags
  • JSON output mode
  • Colored output
  • move and delete commands

👨‍💻 Author

Zaheer Rahman Backend & CLI Tool Developer


📄 License

MIT License You are free to use, modify, and distribute this project.


⭐ Final Note

If you are learning Node.js or want to understand how real CLI tools work, this project is a great starting point.

Feel free to fork, improve, and contribute 🚀