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

@mayoyo25/codedump

v1.0.0

Published

Concatenate a Next.js/Astro project's source files into one .txt file for pasting into an AI. Lists media/asset paths separately instead of dumping binary content.

Readme

codedump

Dump a Next.js or Astro project's source into one .txt file for pasting into an AI — each file preceded by a // relative/path/to/file comment (forward slashes, always, even on Windows).

Media/asset files (images, video, fonts, etc.) are listed as paths only — their binary content is never dumped into the output.

Install

pnpm add -g @mayoyo25/codedump

Works the same with npm or yarn if that's your package manager:

npm install -g @mayoyo25/codedump
yarn global add @mayoyo25/codedump

Requires Node.js 18 or later.

Usage

Run it from your project root:

codedump

That scans the whole project (skipping node_modules, build output, lockfiles, etc.) and writes codedump.txt — ready to paste straight into ChatGPT, Claude, or any AI tool.

Common examples

codedump --dir src                # Astro: just the src/ folder
codedump --dir app                # Next.js App Router: just app/
codedump --dir src,app            # scan a few folders at once
codedump --out project.txt        # custom output filename
codedump --ignore "*.test.ts,tmp" # extra ignores, added on top of the defaults
codedump --media-dirs public,assets,static
codedump --no-media               # skip listing media/asset paths entirely
codedump --ext .astro,.ts,.tsx    # override which extensions count as "code"

All flags

| Flag | What it does | Default | |---|---|---| | --dir <list> | Comma-separated folders to scan, relative to where you run the command | . (whole project) | | --out <file> | Output filename | codedump.txt | | --ext <list> | Comma-separated file extensions to dump in full | see below | | --ignore <list> | Extra names/patterns to skip, added to the defaults (supports * wildcards) | — | | --media-dirs <list> | Folders whose contents are always listed path-only, never read | public,assets,static | | --no-media | Don't list media/asset paths at all | media listed by default | | --help, -h | Show usage | — |

What gets included

Ignored everywhere: node_modules, .git, .next, .astro, .vercel, .netlify, dist, build, out, coverage, .turbo, .cache, .vscode, .idea, and common lockfiles.

Code extensions dumped in full: .astro .ts .tsx .js .jsx .mjs .cjs .css .scss .sass .md .mdx .json .jsonc .html .yml .yaml

Media dirs (path-only, contents never read): public, assets, static

Media extensions (path-only, wherever they appear in the project): images (.png .jpg .jpeg .gif .svg .webp .avif .ico .bmp), video (.mp4 .mov .webm .avi .mkv), audio (.mp3 .wav .ogg .flac .m4a), fonts (.woff .woff2 .ttf .otf .eot), .pdf, .zip.

Every default above is just a flag — override any of it per project, per run.

Example output

// src/components/Header.astro

---
const title = "Home";
---
<h1>{title}</h1>

--------------------------------------------------------------------------------

// src/utils/format.ts

export function formatDate(d: Date) {
  return d.toLocaleDateString();
}

================================================================================
MEDIA / ASSET FILES (path only, 2 files)
================================================================================

// public/images/logo.png
// public/fonts/inter.woff2

License

MIT