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 🙏

© 2024 – Pkg Stats / Ryan Hefner

codecompactor

v1.0.1

Published

Effortlessly condense and prepare your codebase for seamless analysis by online LLMs.

Downloads

8

Readme

CodeCompactor

CodeCompactor is a command-line tool that effortlessly condenses and prepares your codebase for seamless analysis by online Large Language Models (LLMs). It recursively traverses a specified directory, collects the contents of all non-binary files, and generates a single text file containing the relative paths and contents of each file. This makes it convenient to upload and analyze your entire codebase using online LLMs without the need to handle multiple files.

Of course you can use it for any other purpose you want, like sharing a codebase with someone else, or just to have a single file with all your code.

More features and improvements are planned for future releases, so stay tuned!

Features

  • Recursively traverses a directory and its subdirectories
  • Collects the contents of all non-binary files
  • Generates a single text file with relative file paths and contents
  • Supports excluding specific files and directories
  • Handles binary files by skipping them
  • Automatically resolves naming conflicts for the output file

Installation

To install CodeCompactor globally, use the following command:

npm install -g codecompactor

Usage

To generate a condensed file tree, run the following command:

generate-file-tree <folderPath> [excludeList...]

This command will generate a text file named after the input directory (e.g., project.txt) in the current working directory. The file will contain the relative paths and contents of all non-binary files within the specified directory, excluding the "node_modules" directory, files with the ".log" extension, and directories named "temp".

Output Format

The generated text file will have the following format:

relative/path/to/file1.js

file1 contents... 

relative/path/to/file2.py

file2 contents...

Each file's relative path is followed by its contents, separated by a newline character. Binary files are skipped and not included in the output.

Contributing

Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue on the GitHub repository. If you'd like to contribute code, please fork the repository and submit a pull request.

License

This project is licensed under the MIT License.

Acknowledgements

CodeCompactor was inspired by the need to simplify the process of uploading and analyzing codebases using online LLMs. It builds upon the power of Node.js and the npm ecosystem to provide a convenient and efficient solution.

It is inspired by @BradMyrick and his project goFlat.

I have no idea of Go, so I decided to create a similar project in Node.js.

Contact

If you have any questions or inquiries, please contact the project maintainer at [email protected] or fork the repository and submit a pull request. You can add an issue to the repository if you have any questions or suggestions.