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

search-pack

v1.0.4

Published

Search code patterns with ripgrep and optionally package matching files with repomix for AI analysis

Downloads

25

Readme

search-pack

Fast code search with ripgrep + optional packaging for AI analysis with repomix

What it does

  • Find code fast - Literal string search powered by vscode-ripgrep
  • Package for AI - Uses repomix to pack matching files to clipboard for use with any AI provider (ChatGPT, Claude, Gemini, etc.)

Use without installing (recommended)

npx search-pack <pattern> [options]

# Examples:
npx search-pack "your pattern"
npx search-pack "your pattern" --copy
npx search-pack "your pattern" -f ./packages/api --copy

Example

Basic search:

$ npx search-pack "performSearch"
# Finds and list all literal matches of "performSearch" in your codebase
./src/commands/search.ts:32:40:      const searchResults = await this.performSearch(pattern, folder, rgPath)
./src/commands/search.ts:53:17:  private async performSearch(

Search + pack for AI:

$ npx search-pack "performSearch" --copy
# Finds all matches of "performSearch" and copies to clipboard the containing files for AI analysis
./src/commands/search.ts:32:40:      const searchResults = await this.performSearch(pattern, folder, rgPath)
./src/commands/search.ts:53:17:  private async performSearch(

⠸ Running repomix...
✔ Packing completed successfully!

📈 Top 5 Files by Token Count:
──────────────────────────────
1.  src/commands/search.ts (1,056 tokens, 4,401 chars, 73.9%)

🔎 Security Check:
──────────────────
✔ No suspicious files detected.

📊 Pack Summary:
────────────────
  Total Files: 1 files
 Total Tokens: 1,429 tokens
  Total Chars: 6,171 chars

🎉 All Done!
Your repository has been successfully packed.
✔ Files packed and copied to clipboard!

Options

  • -c, --copy - Pack matching files with repomix and copy to clipboard
  • -f, --folder <dir> - Directory to search (default: current)

Global installation (optional)

npm install -g search-pack

# Now use directly
search-pack "your pattern"
sp "your pattern"  # Short alias

How it works

  1. Search - Uses vscode-ripgrep for fast literal string matching
  2. Display - Shows colored results with file:line:column format
  3. Pack (with --copy) - Uses repomix to package matching files and copy to clipboard

Features

  • Literal string search - What you type is what you search
  • Fast - Powered by ripgrep, one of the fastest search tools available
  • AI-independent - Use with any AI provider or tool, not locked to specific IDEs or services
  • Cross-platform - Works on macOS, Linux, and Windows

Why search-pack?

Modern AI tools are powerful but fragmented across different providers and IDEs. Whether you use ChatGPT, Claude, Gemini, Cursor, or any other AI service, you need a consistent way to find and share code context.

search-pack gives you that independence - find relevant code fast, package it properly with repomix, and use it with whatever AI tool you prefer. No vendor lock-in, no IDE constraints, just your code ready for any AI conversation.

License

MIT © Francisco Depascuali

Dependencies