`ExportToGPT.js` is a utility designed to streamline the process of using ChatGPT for programming, development, and debugging. It simplifies the task of identifying and copying relevant project files and their directory structures, making it easy to paste them into ChatGPT (and other LLM based) prompts.
ExportToGPT.js
is a utility designed to streamline the process of using ChatGPT for programming, development, and debugging. It simplifies the task of identifying and copying relevant project files and their directory structures, making it easy to paste them into ChatGPT (and other LLM based) prompts.
Great for software development using ChatGPT as well as using ChatGPT to debug!
Simply:
exporttogpt "./project" "/desired/file"
require
, import
, and include
statements to identify and include dependent files.To install ExportToGPT.js
globally, run:
npm install -g exporttogpt
To use the tool, run:
exporttogpt <project_directory> <filename>
Current Directory:
exporttogpt "./" "src/index.js"
Absolute Directory:
exporttogpt "/path/to/project" "src/index.js"
SYSTEM:
You are a Senior Node.js Software Engineer. Please use the following directory structure and provided project files to respond about the 'src/index.js' file.
Directory Structure:
{
"src": {
"index.js": "file",
...
},
...
},
...
}
File: /path/to/project/src/index.js
----------------------
...file contents...
----------------------
File: /path/to/project/src/components/App.js
----------------------
...file contents...
----------------------
...
If there are more than 5 files, the specified input file is printed at both the start and the end to enhance context retention for LLM based prompts like ChatGPT.
File Not Found:
Framework Not Detected:
package.json
contains the relevant dependencies for the supported frameworks.ExportToGPT.js
makes it easier to provide ChatGPT with the context it needs to assist in development and debugging. By structuring and filtering relevant files, you can ensure that ChatGPT has the necessary information to provide accurate and helpful responses.
With its ability to print the specified input file at both the start and the end of the output when there are more than 5 files, ExportToGPT.js
ensures that important context is retained, improving the quality of assistance provided by ChatGPT.
The tool supports a range of popular JavaScript frameworks, making it versatile for many types of projects:
Contributions are welcome! If you have any issues or feature requests, feel free to open an issue or submit a pull request on our GitHub repository.
This project is licensed under the MIT License. See the LICENSE file for details.
I'm not affiliated with OpenAI or ChatGPT.