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

console-seeker

v1.0.1

Published

A tool to find log statements (like console.log) in JavaScript/TypeScript projects

Downloads

10

Readme

Console Seeker

A powerful command-line tool to find and analyze console.log statements in JavaScript/TypeScript projects. Perfect for code cleanup and identifying unused logging statements before production deployment.

Features

  • 🔍 Smart Detection: Finds all console.log statements in your project
  • 📊 Detailed Analysis: Shows file paths and line numbers for each console statement
  • 🎨 Colorized Output: Easy-to-read terminal output with color coding
  • ⚙️ Configurable: Customize scan folders, ignore paths, and file extensions
  • 🚀 Fast: Uses efficient grep-based scanning for quick results
  • 📦 CLI Tool: Install globally and use from anywhere

Installation

Global Installation (Recommended)

npm install -g console-seeker

Local Installation

npm install --save-dev console-seeker

Usage

Basic Usage

Scan the current directory for console.log statements:

console-seeker

Scan Specific Directory

console-seeker scan /path/to/your/project

Programmatic Usage

import { Main } from 'console-seeker';

// Scan current directory
await Main.scan();

Configuration

Create a console-seeker.config.json file in your project root to customize the scanning behavior:

{
  "scanFolder": "src",
  "ignorePaths": ["node_modules", "dist", "build", ".git", "coverage"],
  "extensions": [".js", ".ts", ".jsx", ".tsx", ".vue"]
}

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | scanFolder | string | "src" | Directory to scan for console statements | | ignorePaths | string[] | ["node_modules", "dist", "build", ".git"] | Paths to ignore during scanning | | extensions | string[] | [".js", ".ts", ".jsx", ".tsx"] | File extensions to include in scanning |

Output

The tool provides colorized output showing:

  • Red: Number of console.log statements found (errors)
  • Green: Zero console statements found (clean code)
  • Blue: File paths containing console statements
  • White: Line numbers where console statements are located

Example output:

3 ERROR(S):
src/components/Button.tsx
   15: console.log('Button clicked')
   23: console.log('Debug info:', props)
src/utils/helpers.js
   8: console.log('Helper function called')

Exit Codes

  • 0: No console.log statements found (success)
  • 1: Console.log statements found (error)

This makes it perfect for CI/CD pipelines where you want to fail builds that contain console statements.

Use Cases

  • Pre-deployment cleanup: Remove console statements before production
  • Code quality: Maintain clean, production-ready code
  • CI/CD integration: Fail builds that contain debugging statements
  • Code review: Quickly identify files with console statements
  • Team standards: Enforce no-console policies across projects

Integration

Git Hooks

Add to your pre-commit hook to prevent console statements from being committed:

#!/bin/sh
console-seeker

Package.json Scripts

{
  "scripts": {
    "check-console": "console-seeker",
    "prebuild": "console-seeker"
  }
}

CI/CD Pipeline

# GitHub Actions example
- name: Check for console statements
  run: npx console-seeker

Contributing

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

License

MIT © n3rd1n

Repository