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

fs2md

v0.3.0

Published

A CLI that adds contents of files to markdown along with a visual file tree.

Readme

fs2md

A CLI that adds contents of files to markdown along with a visual file tree.

Perfect for pasting context into LLMs.

Quick Start

# Include only TypeScript, exclude tests
npx fs2md . -i "**/*.ts" -x "**/*.test.ts" | pbcopy

# Or save to file (node_modules and .git excluded by default)
npx fs2md . -o codebase.md

# Exclude some binary files
fs2md . -x "**/*.{png,jpg,gif,pdf}"

Install

Install globally via npm:

npm install -g fs2md

Or use directly with npx (no installation needed):

npx fs2md <root> [options]

Usage

fs2md <root> [options]

| Option | Description | Default | | -------------------------- | ---------------------------------------------------- | ------- | | -o, --output FILE | Write the Markdown here instead of stdout | — | | -i, --include PATTERN | Glob(s) to include (repeatable, comma-separated) | all | | -x, --exclude PATTERN | Glob(s) to exclude (repeatable, comma-separated) | see below | | --no-default-excludes | Disable default excludes | false |

Default excludes: node_modules/**, .git/** (disable with --no-default-excludes)


Examples

1 · Dump current directory to stdout

fs2md .

2 · Only include TypeScript files, exclude tests, then copy to clipboard

fs2md . -i "**/*.ts" -x "**/*.test.ts" | pbCopy

3 · Produce a single repo.md that excludes node_modules

fs2md . -x "node_modules/**" -o repo.md"

4 · Include only source files from specific directories

fs2md . -i "src/**, lib/**" -o codebase.md

Example Input and output

Input:

fs2md ./test/fixtures/sample-project -x "**/*.js"

Output:


Exit codes

| Code | Meaning | | ---- | -------------------------------------------- | | 0 | Success | | 1 | Usage error / invalid flag | | >1 | Unhandled exception (I/O, permissions, etc.) |


License

MIT

Build and run manually

# Clone repo
npm install
npm run build

# Run local build 
node dist/fs2md.js <root> [options]