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

repomix-unpack

v1.0.0

Published

A tool to unpack files from Repomix output format

Readme

Repomix Unpacker

A TypeScript/Node.js tool to extract files from a Repomix output file, recreating the original directory structure and files.

What is Repomix?

Repomix is a tool that packs repository files into a single text file for easy sharing and AI analysis. This unpacker reverses that process, extracting the individual files back to their original structure.

Installation

# Clone the repository
git clone <repository-url>
cd repomix-unpack

# Install dependencies
npm install

# Build the project
npm run build

# Link globally (optional)
npm link

Usage

Basic Usage

# Using npx (after building)
npx . repomix-output.txt

# If linked globally
repomix-unpack repomix-output.txt

# Using npm run
npm run start repomix-output.txt

Options

repomix-unpack <input-file> [options]

Options:
  -o, --output <dir>  Output directory (default: ./repomix-extracted)
  -d, --dry-run       Show what would be extracted without creating files
  -v, --verbose       Enable verbose output
  -h, --help          Display help
  -V, --version       Display version

Examples

# Extract to default directory (./repomix-extracted)
repomix-unpack repomix-output.txt

# Extract to specific directory
repomix-unpack repomix-output.txt --output ./my-extracted-files

# Dry run to see what would be extracted
repomix-unpack repomix-output.txt --dry-run

# Verbose output for debugging
repomix-unpack repomix-output.txt --verbose

Features

  • ✅ Parses Repomix format with line number handling
  • ✅ Recreates original directory structure
  • ✅ Progress indication during extraction
  • ✅ Dry-run mode for preview
  • ✅ Verbose mode for debugging
  • ✅ Comprehensive error handling
  • ✅ Summary report after extraction

Development

# Install dependencies
npm install

# Run in development mode
npm run dev repomix-output.txt

# Build the project
npm run build

# Run tests (when implemented)
npm test

How It Works

  1. Validation: Validates the input file is a valid Repomix output
  2. Parsing: Reads the file line by line, extracting file entries
  3. Line Number Removal: Strips line number prefixes (e.g., 123→) from content
  4. Directory Creation: Creates necessary directories recursively
  5. File Writing: Writes each file to its original location
  6. Summary: Reports on files created, directories created, and any errors

File Format

The tool expects Repomix files with the following structure:

================
File: path/to/file.ext
================
[file contents with optional line numbers]

================
File: another/file.ext
================
[file contents]

Error Handling

The tool handles various error scenarios:

  • Invalid Repomix file format
  • Missing input file
  • No write permissions
  • Invalid output directory
  • File writing errors

License

Do whatever you want