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

copycodebase

v2.1.1

Published

A cross-platform CLI tool and library to read and copy project codebase to clipboard

Readme

copycodebase

A cross-platform CLI tool and library to read and copy your project codebase to the clipboard with ignore list support, large file detection, and detailed summary output.


Installation

pnpm add -g copycodebase

Usage

CLI

-** Copy entire project codebase (respecting ignore list)**:

copycodebase ./your-project

This command reads the entire codebase of ./your-project, skipping files and folders specified in the ignore list (ignore-list.json). It detects large files (>10 MB) and prompts you whether to ignore them during copy. After completion, it copies all included files' content to clipboard and prints a clear summary showing which files were copied or ignored, presented in a tree structure.

  • Interactive mode to update ignore list:
copycodebase ./your-project --ignore

This launches an interactive prompt allowing you to select files and directories to ignore within the project. Large files are specially grouped with their sizes shown to aid your choice. Your selections are saved to ignore-list.json for persistent ignores.


Library Usage

You can also use this tool as a library in your Node.js projects:

const { getCodebase, interactiveIgnoreList } = require('copycodebase');

(async () => {
  // Interactive mode to update ignore list
  await interactiveIgnoreList('./your-project', './ignore-list.json');
  // Get codebase content and stats
  const { rootNode, stats } = await getCodebase(
    './your-project',
    './ignore-list.json',
  );
  console.log(JSON.stringify(rootNode, null, 2));
  console.log(stats);
})();

Features

  • Ignore list support combining default common ignores (like node_modules, .git) with your custom ignores.
  • Large file detection: prompts to ignore files larger than 10 MB when copying.
  • Detailed summary: shows copied and ignored files with project tree structure and status icons.
  • Clipboard integration: copies included files’ content for easy pasting.
  • Integrated with Changesets for versioning and changelog automation.

Configuration

  • .%changeset/config.json configures changelog generation, base branch, and publishing access.
  • ESLint (.eslintrc.json) and Prettier (.prettierrc) help maintain consistent code style.
  • .gitignore includes typical entries like node_modules and lock files.
  • ignore-list.json contains your custom ignores and merges internally with defaults.

Development

  • Test with Jest (pnpm test).
  • Lint with ESLint (pnpm run lint).
  • Format with Prettier (pnpm run format).
  • Use Changesets commands for versioning (pnpm run changeset, pnpm run version-packages).
  • Publish recursively with pnpm run publish-packages.

License

ISC


Additional Notes

  • Ensure you run the CLI from the project root for correct relative path handling.
  • Large files are detected and can be interactively excluded to avoid bloating your clipboard content.
  • The summary printout helps you verify what was included or excluded in each run.