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

clipdir

v1.1.0

Published

pack all nested files from the specified folder and copy to clipboard

Readme

clipdir

clipdir is a powerful Node.js tool to pack all nested files from a specified directory and copy the combined content to the clipboard. Perfect for sharing project structure and code with AI assistants.

Installation

Install clipdir globally with npm:

npm install -g clipdir

Basic Usage

To use clipdir, navigate to the directory containing your target folder and run:

clipdir /path/to/your/folder

AI-ready Usage (Default)

Copy a paste-ready Markdown bundle (tree + files in fenced blocks):

clipdir .

Write to a Markdown file instead of clipboard:

clipdir --out dump.md .

Protect large contexts:

# truncate individual huge files at 200 KB
clipdir --max-file-bytes 200000 --out dump.md .

# split the final bundle into ~30k-token chunks
clipdir --chunk-tokens 30000 --out dump.md .

Advanced Options

Output Control

  • -a, --ai - AI-friendly formatting (code fences, headers)
  • --out <file> - Write output to a file instead of clipboard
  • --no-clipboard - Print to stdout instead of clipboard

Content Protection

  • --max-file-bytes <n> - Truncate any single file beyond n bytes
  • --max-tokens <n> - Rough cap on total output size
  • --chunk-tokens <n> - Split large outputs into multiple files

Content Selection

  • -t, --tree-only - Only generate directory tree
  • -f, --files-only - Only pack file contents
  • -q, --quiet - Suppress extra messages
  • -m, --message <text> - Add custom message before the code

Examples

# Quick copy to clipboard (AI-friendly by default)
clipdir .

# AI-friendly markdown to file
clipdir --out project-snapshot.md .

# With custom message
clipdir -m "Please review this code and suggest improvements" .

# Protect against huge files (200KB limit per file)
clipdir --max-file-bytes 200000 --out safe-dump.md .

# Split large projects into manageable chunks
clipdir --chunk-tokens 30000 --out chunks/chunk.md .

# Tree only (no file contents)
clipdir -t .

# Files only (no directory tree)
clipdir -f .

Features

  • AI-Optimized by Default: Markdown formatting with proper code fences and language detection
  • Smart Binary Detection: Automatically skips binary files with clear notes
  • File Size Protection: Configurable per-file size limits to prevent AI context overflow
  • Chunking Support: Split large outputs into manageable pieces
  • Flexible Output: Clipboard, console, or file output options
  • Intelligent Filtering: Excludes common build artifacts, dependencies, and binary files

Contributing

Feel free to fork this repository, create a new feature branch, and send us a pull request. For bugs and feature requests, please create an issue.

License

This project is licensed under the ISC License.