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

lsallcp

v2.0.0

Published

Recursively list every file's content as relativePath: ```ext code fences```, with glob/regex/name skip patterns, progress bar and colored output

Readme

lsallcp

Recursively dump every file in a directory as colorized, fenced-code blocks -- with smart skip patterns, a live progress bar, and one-flag clipboard export. Built on cli-atelier, runs on Node.js.

npm install -g lsallcp

What it does

lsallcp walks a directory tree and prints every file it finds as a labeled, syntax-tagged code block:

src/index.ts:
<code>ts
console.log("hello")
</code>

It's built for quickly dumping a project's source into a chat window, a doc, or a clipboard -- for code review, LLM prompts, documentation, or debugging -- without manually opening and copy-pasting dozens of files.


Features

| Feature | Description | | ------------------------------------------------- | --------------------------------------------------------------------------- | | Recursive listing | Walks the full directory tree from any starting path | | Smart skip patterns | Skip by exact name, glob (*.png), or regex literal (/\.test\.ts$/i) | | True recursive pruning | A matched directory is never descended into -- not just filtered afterward | | Binary-safe | Detects binary files and shows a placeholder instead of dumping raw bytes | | Live progress bar | Real-time progress while files are read, powered by cli-atelier | | Colorized output | Paths, fences, and log messages are colored for readability | | Clipboard export | -c / --copy copies plain-text results directly to your system clipboard | | Zero runtime dependencies (besides cli-atelier) | Ships precompiled JavaScript -- no separate build step at install time | | Cross-platform | Works in Windows Terminal, Git Bash, macOS Terminal, and Linux shells |


Requirements

| Dependency | Minimum version | Notes | | ---------- | --------------- | ------------------------------------------------------- | | Node.js | >= 18.0.0 | Runs the compiled CLI directly, no other runtime needed |

lsallcp is a pure Node.js package. TypeScript sources are compiled to plain JavaScript with tsc and published under dist/, so no Bun, ts-node, or extra runtime is required to use it.


Installation

npm install -g lsallcp
# or
pnpm add -g lsallcp
# or
yarn global add lsallcp

To use it inside a single project instead of globally:

npm install -D lsallcp
npx lsallcp .

Usage

lsallcp <path> [skipPattern...] [--copy | -c]

| Argument | Required | Description | | -------------- | -------- | -------------------------------------------------------------- | | <path> | Yes | Directory to scan, e.g. ., ./src, ../my-project | | skipPattern | No | Zero or more names/globs/regexes to skip, recursively | | --copy, -c | No | Copy plain-text output to the clipboard instead of printing it |

Flags can appear anywhere after the path -- order doesn't matter.

Basic examples

# List every file in the current directory
lsallcp .

# Skip an exact folder name (matched at any depth)
lsallcp . node_modules

# Skip multiple exact names at once
lsallcp . node_modules dist .env

# Skip by glob pattern
lsallcp . *.png *.lock

# Skip by regex literal (wrap in slashes, flags optional)
lsallcp . /\.test\.ts$/i

# Combine skip types freely
lsallcp . node_modules *.png /\.spec\.ts$/

# Copy the result to your clipboard instead of printing it
lsallcp . --copy
lsallcp . node_modules -c

Skip patterns

Every skip argument is compiled into a matcher and checked against both the file/folder's basename and its relative path. A match on a directory prunes the entire subtree -- files inside are never even read.

| Pattern type | Syntax | Example | Matches | | ------------- | ------------------- | --------------------- | ---------------------------------------- | | Exact name | plain string | node_modules | Any file/folder named exactly this | | Glob | contains * or ? | *.png, **/dist/** | Shell-style wildcard match | | Regex literal | /pattern/flags | /\.test\.ts$/i | Full regular expression, flags supported |

Glob rules:

  • * matches any characters except /
  • ** matches any characters, including /
  • ? matches exactly one character (not /)

.git is always skipped automatically, regardless of the patterns you pass.


Clipboard export

Passing -c or --copy copies the full, ANSI-free plain-text result directly to your system clipboard and suppresses the normal terminal printout -- you'll only see the scan log, progress bar, and a final confirmation:

lsallcp . node_modules --copy
ℹ Target: /Users/<nolly>/projects/my-app
ℹ Skip patterns: node_modules
ℹ Clipboard: enabled (content will not be printed)
✔ Found 214 file(s) after skipping
✔ All files read
✔ Listed 214 file(s) from /Users/<nolly>/projects/my-app
✔ Result copied to clipboard

Clipboard support is zero-dependency and platform-native:

| Platform | Tool used | | -------- | ------------------------------------------- | | Windows | clip (built-in, also works from Git Bash) | | macOS | pbcopy (built-in) | | Linux | wl-copy → xclip → xsel, first found |

If none of these tools are available on Linux, lsallcp prints a warning and leaves the terminal output untouched.


Output format

Each file is rendered as:

<relativePath>: <code><extension> <file content> </code>

  • <relativePath> is colored cyan and bold, relative to the scanned root, using forward slashes on all platforms.
  • <extension> is the file's extension without the leading dot (ts, json, md); extensionless files fall back to text.
  • Binary files render as a dimmed, italic [binary file - content skipped] placeholder instead of raw bytes.
  • Unreadable files (permissions, broken symlinks, etc.) render a red [unreadable: <reason>] placeholder instead of crashing the whole run.

Exit behavior

  • Directory scanning never aborts on a single unreadable subdirectory -- it logs a warning and continues.
  • If the target path doesn't exist or isn't a directory, lsallcp exits with an error and a non-zero status code.
  • If no files remain after skip patterns are applied, lsallcp logs a warning and exits cleanly.

How it works

lsallcp is a thin, purpose-built CLI in three stages, written in TypeScript and compiled to JavaScript via tsc (npm run build, wired to prepare so it's built automatically on install from source):

  1. Scan -- recursively walks the target directory (src/scanner.ts), pruning any path matched by a compiled skip matcher (src/matcher.ts) before ever entering it.
  2. Read -- reads each remaining file, detects binary content (src/binary.ts), and formats it into a colorized fenced block (src/render.ts), updating a live progress bar as it goes.
  3. Output -- either prints the assembled result to stdout, or strips ANSI codes and sends it to the system clipboard (src/clipboard.ts) when -c/--copy is set.

All terminal UI -- headers, spinners, progress bars, logs, boxes -- comes from cli-atelier, a zero-dependency, pure-ANSI terminal framework.


License

Released under the WTFPL License.