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

path-validator-cli

v1.0.4

Published

A CLI tool to validate and fix broken paths in a project. Prevent deployment issues by validating and correcting paths directly in your codebase.

Downloads

14

Readme

Path Validator CLI Tool

A command-line tool that ensures your project paths work not just locally, but also in production deployments.

What Does It Do?

This tool helps developers avoid common path-related issues that can break projects when moving from a local environment to production. It scans your project for path inconsistencies and suggests (or automatically applies) fixes to ensure smooth deployment.

Features

  • Scans and validates paths across HTML, CSS, PHP, and JavaScript projects
  • Automatically adjusts paths that work locally but would break in deployment
  • Detects and fixes issues like:
    • Incorrect relative paths (../, ./, /)
    • Paths that work locally but break when deployed
    • Absolute paths that need to be relative
    • Missing files or incorrect references
  • Automatically applies fixes (when not using --check-only)
  • Generates a clear report of all detected issues and suggested corrections
  • Fast, lightweight & easy to use

Installation

npm install -g path-validator-cli

Usage

There are two main ways to use the path validator:

1. Check and Fix Mode (Default)

path-validator

This will:

  • Scan your current directory
  • Report any path issues found
  • Automatically fix the issues by renaming files/directories

2. Check-Only Mode

path-validator --check-only

This will:

  • Scan your current directory
  • Report any path issues found
  • Not make any changes to your files

Examples

# Check and fix paths in the current directory
path-validator

# Only check paths without making changes
path-validator --check-only

Dependencies

  • chalk: Colors and styles text output in the terminal
  • commander: Creates and manages command-line interfaces (CLI) and parses arguments
  • fast-glob: Quickly finds files and directories using pattern matching
  • figlet: Converts text into ASCII art banners
  • inquirer: Creates interactive command-line prompts and forms
  • ora: Displays elegant loading spinners in the terminal

Output

The tool provides detailed feedback about invalid paths found in your codebase:

Each issue shows:

  • The invalid path that was found
  • In the file where the path is referenced, you can Ctrl-click (PC) or Command-click (Mac) to open the referenced file.
  • The exact line number where the reference occurs
  • A helpful suggestion for fixing the issue
  • ..and a passive aggressive reality check based on how many issues there are.

License

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

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository.

Roadmap

  • [ ] Add support for validating/correcting edge cases
  • [ ] Support for other programming languages and frameworks like C#, React and more
  • [ ] A path-validator --undo command

Authors