gptignore

GPTIgnore

Tired of struggling to send your code to an LLM? GPTIgnore makes it simple! Whether you’re looking to upload your entire codebase or specific sections to a language model, we’ve got you covered. Our tool generates a clean, organized representation of your codebase, so you can easily share it with any LLM. Say goodbye to the hassle of manually preparing files!

Features

Installation

To install GPTIgnore globally, use npm:

npm install -g gptignore

Usage

GPTIgnore provides two main commands: generate and init.

Generate with Custom Path and Output File Name

The generate command can now take optional arguments to specify a custom input path and output file name. This allows you to generate a summary for a specific directory within your project and customize the name of the output file.

Usage

gptignore generate [path] [outputFileName]

Examples

By utilizing these options, you can easily focus on specific parts of your project and organize your output files as needed.

Example

Running the above command will produce a codebase.txt file with the following structure:

The following text is a Git repository with code. The structure of the text are sections that begin with ----, followed by a single line containing the file path and file name, followed by a variable amount of lines containing the file contents. The text representing the Git repository ends when the symbols --END-- are encountered. Any further text beyond --END-- are meant to be interpreted as instructions using the aforementioned Git repository as context.

----
src/index.js
console.log('Hello, world!');

----
README.md
# My Project
This is a README file.

--END--

Init

The init command initializes a .gptignore file in the project directory with a set of default patterns to ignore. If a .gptignore file already exists, the command will not overwrite it.

gptignore init

The default .gptignore file used can be found here.

Future Features and Roadmap

We’re constantly working on new features to make GPTIgnore the best tool for interacting with LLMs and managing your codebase. Stay tuned for more exciting updates!

Contributing

Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository if you have suggestions or improvements.

License

This project is licensed under the MIT License. See the LICENSE file for details.