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

@tasteee/replicate

v0.1.0

Published

Concatenate globbed files into a single markdown file, or reconstruct from one.

Readme

replicate

A tiny CLI that folds an entire folder into one tidy markdown file — and unfolds it right back into the original file tree.

npm i -g @tasteee/replicate
replicate up ./src        # folder  → markdown snapshot
replicate down snap.md    # snapshot → folder

That's the whole idea: up packs, down unpacks, and a round trip gives you back exactly what you started with.

Why?

Sometimes you just need a whole codebase as a single, readable, pasteable thing:

  • Hand a project to an LLM without zipping, uploading, or clicking through a file picker.
  • Share or review code in a single scrollable document, with every file fenced and syntax-highlighted.
  • Snapshot a folder into one file you can drop in a gist, an issue, or a chat.
  • Reconstruct it laterdown rebuilds the tree wherever you point it.

No config, no project files, nothing to set up. Point it at a folder and go.

Quick start

Pack a folder into a snapshot:

replicate up ./src
# ✅  Written to: replicate-1719600000000.md

You'll get a markdown file where every source file is a section: a heading with its path, followed by its contents in a fenced code block.

## `index.ts`

```ts
export const hello = () => "world";
```

## `utils/math.ts`

```ts
export const add = (a: number, b: number) => a + b;
```

Rebuild the tree from that snapshot whenever you like:

replicate down replicate-1719600000000.md
# 📦  Reconstructing 2 file(s)
#   ✅  index.ts
#   ✅  utils/math.ts

replicate up <path>

Recursively scans <path> and writes every matched file into a single markdown snapshot. By default it writes to replicate-<timestamp>.md in your current directory.

replicate up ./src                       # everything under ./src
replicate up ./src -o my-snapshot        # → my-snapshot.md
replicate up ./src -e ts tsx             # only .ts and .tsx
replicate up ./src -ne json              # everything except .json
replicate up .   -i coverage .storybook  # add extra ignore patterns

| Flag | Short | Description | | ---------------------------- | ----- | ----------------------------------------- | | --output <name> | -o | Output filename (without .md) | | --extensions <exts...> | -e | Only include files with these extensions | | --not-extensions <exts...> | -ne | Exclude files with these extensions | | --ignore <patterns...> | -i | Extra ignore patterns (added to defaults) |

Flags compose, so you can be as precise as you want:

replicate up ./src -e ts tsx js -ne d.ts -o snapshot

What it skips by default

So your snapshots stay focused on source, replicate ignores the usual noise out of the box:

  • Dependencies — node_modules, .pnpm-store, .yarn, .npm
  • Build output — dist, build, out, .next, .nuxt, .cache, coverage, …
  • Lock files — *.lock, pnpm-lock.yaml, package-lock.json, …
  • Tooling dirs — .git, .idea, .vscode
  • Generated files — *.map, *.tsbuildinfo, *.log
  • Secrets — .env, .env.*

Anything that could be source is kept — including hand-written *.d.ts declaration files. Need to drop a default? You can't remove built-ins, but -e / -ne let you narrow the set precisely.

replicate down <path>

Reads a snapshot and reconstructs the original file tree, starting from the current directory (or wherever --dir points).

replicate down snap.md                  # rebuild into the current folder
replicate down snap.md -d ./restored    # rebuild into ./restored

| Flag | Short | Description | | ------------- | ----- | -------------------------------------- | | --dir <dir> | -d | Output root directory (default: cwd) |

down only cares about the file sections — a heading like ## `path/to/file.ts` followed by a fenced block. Everything else in the document is ignored, so you can add notes, prose, or extra markdown anywhere and it'll still rebuild cleanly. Paths that try to escape the output root (../) are skipped, not written.

Two details that make it just work

Markdown-safe fences. Snapshots wrap every file in four-backtick fences. That means a file that is itself markdown with normal three-backtick code blocks nests perfectly — your snapshot never gets visually mangled.

Lossless round trips. replicate up then replicate down returns your files byte-for-byte. Pack it, share it, unpack it — same bytes out.

Development

pnpm install
pnpm dev      # watch mode
pnpm build    # production build → dist/

License

MIT