{"id":15061349,"url":"https://github.com/lbesecker195/exporttogpt","last_synced_at":"2026-02-19T18:31:25.471Z","repository":{"id":249886093,"uuid":"832890591","full_name":"lbesecker195/ExportToGPT","owner":"lbesecker195","description":"`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.","archived":false,"fork":false,"pushed_at":"2024-07-24T00:39:12.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T12:42:32.748Z","etag":null,"topics":["ai-code-generation","ai-code-generator","ai-prompts-sharing-web","chatbot","chatbot-framework","chatbots","gpt","gpt4","prompt-generator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lbesecker195.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-24T00:01:49.000Z","updated_at":"2024-07-24T19:12:53.000Z","dependencies_parsed_at":"2024-07-24T00:55:19.128Z","dependency_job_id":null,"html_url":"https://github.com/lbesecker195/ExportToGPT","commit_stats":null,"previous_names":["lbesecker195/exporttogpt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbesecker195%2FExportToGPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbesecker195%2FExportToGPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbesecker195%2FExportToGPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbesecker195%2FExportToGPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lbesecker195","download_url":"https://codeload.github.com/lbesecker195/ExportToGPT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246085645,"owners_count":20721213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-code-generation","ai-code-generator","ai-prompts-sharing-web","chatbot","chatbot-framework","chatbots","gpt","gpt4","prompt-generator"],"created_at":"2024-09-24T23:18:41.735Z","updated_at":"2025-10-15T07:03:55.042Z","avatar_url":"https://github.com/lbesecker195.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExportToGPT.js\n\n`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.\n\nGreat for software development using ChatGPT as well as using ChatGPT to debug!\n\nSimply:\n1) `exporttogpt \"./project\" \"/desired/file\"`\n2) Copy the generated SYSTEM prompt.\n3) Paste the SYSTEM prompt into your favorite LLM.\n4) Enter your development/debugging related instructions in the USER prompt.\n5) ???\n6) Profit!\n\n## Key Features\n\n- **Framework Detection:** Automatically detects popular JavaScript frameworks (Express.js, React, Vue.js, Angular, Koa.js, NestJS) and includes relevant files.\n- **Dependency Resolution:** Analyzes `require`, `import`, and `include` statements to identify and include dependent files.\n- **Excludes Unrelated Files:** Filters out non-code resources such as images and stylesheets, focusing on code files and templates.\n- **Enhanced Context for ChatGPT:** Prints the specified input file both at the start and end if there are more than 5 total files, ensuring better context retention for ChatGPT.\n\n## Installation\n\nTo install `ExportToGPT.js` globally, run:\n\n```bash\nnpm install -g exporttogpt\n```\n\n## Usage\n\nTo use the tool, run:\n\n```bash\nexporttogpt \u003cproject_directory\u003e \u003cfilename\u003e\n```\n\n### Example Input\n\n**Current Directory:**\n\n```bash\nexporttogpt \"./\" \"src/index.js\"\n```\n\n**Absolute Directory:**\n\n```bash\nexporttogpt \"/path/to/project\" \"src/index.js\"\n```\n\n## Example Output\n\n```\nSYSTEM:\nYou 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.\n\nDirectory Structure:\n{\n  \"src\": {\n    \"index.js\": \"file\",\n     ...\n    },\n    ...\n  },\n  ...\n}\n\nFile: /path/to/project/src/index.js\n----------------------\n...file contents...\n----------------------\n\nFile: /path/to/project/src/components/App.js\n----------------------\n...file contents...\n----------------------\n...\n\n```\n\nIf 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.\n\n## Troubleshooting\n\n#### Common Issues\n\n1. **File Not Found**:\n   - Ensure the specified file path is correct and exists within the project directory.\n   \n2. **Framework Not Detected**:\n   - Double-check if the `package.json` contains the relevant dependencies for the supported frameworks.\n\n## How It Enhances ChatGPT Usage\n\n`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.\n\n### Enhanced Context Management\n\nWith 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.\n\n### Supports Various Frameworks\n\nThe tool supports a range of popular JavaScript frameworks, making it versatile for many types of projects:\n\n- **Express.js**: Includes routes, controllers, models, and views.\n- **React**: Includes components, hooks, Redux files, and excludes non-relevant resources like CSS.\n- **Vue.js**: Includes components, store modules, mixins, and templates.\n- **Angular**: Includes components, services, stores, and templates.\n\n## Contributing\n\nContributions 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](https://github.com/yourusername/ExportToGPT.js).\n\n### Steps to Contribute:\n\n1. Fork the repository.\n2. Create a new branch for your feature or bug fix.\n3. Implement your changes.\n4. Submit a pull request with a detailed description of your changes.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Disclaimer\n\nI'm not affiliated with OpenAI or ChatGPT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbesecker195%2Fexporttogpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flbesecker195%2Fexporttogpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbesecker195%2Fexporttogpt/lists"}