Skip to main content

A simple tool to concatenate code files for ChatGPT prompts

Project description

CodeToGPT

Welcome to CodeToGPT, a powerful tool designed to simplify the process of preparing codebases for interactions with AI models like ChatGPT. By concatenating multiple code files into well-organized documents, this application enhances the ease and efficiency of providing complex code contexts to AI, facilitating more accurate and context-aware responses.

Features

  • Multi-Language Support: Handles both Python (*.py) and Java (*.java), creating separate output files for each language to ensure clarity and organization.
  • Automated Concatenation: Automatically combines all code files from a specified directory into concise, single documents—ideal for large projects.
  • Ease of Use: Offers a simple command-line interface that allows for straightforward operations without the need for complex GUIs.

Getting Started

Prerequisites

Before you start using CodeToGPT, make sure you have Python 3.6 or higher installed on your machine.

Installation

To install CodeToGPT, follow these steps:

pip install code-to-gpt

Usage

To run CodeToGPT, navigate to your project directory and execute:

codetogpt '/path/to/source/folder'

Usage

This command will generate:

  • combined_python_code.txt for Python files.
  • combined_java_code.txt for Java files.

These files will be created in the specified source folder, containing all the code from files of the respective languages found within that directory and its subdirectories.

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

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

Contact

Sameel Shahid - @sameelshahid

Abdul Jaleel Khan- @ajk

Project Link: https://github.com/sameelshahid/codetogpt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

code-to-gpt-0.6.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

code_to_gpt-0.6-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file code-to-gpt-0.6.tar.gz.

File metadata

  • Download URL: code-to-gpt-0.6.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.6

File hashes

Hashes for code-to-gpt-0.6.tar.gz
Algorithm Hash digest
SHA256 10366d41d41a530b07685e7175c9afb4f3146de382f829633027dacc98627511
MD5 ed6020eda38abb1c2b819682d8b2b506
BLAKE2b-256 e2b5215bc5663b34129ac2959fd553c2825e66d6ed64068f0c5d5d588529c8c7

See more details on using hashes here.

File details

Details for the file code_to_gpt-0.6-py3-none-any.whl.

File metadata

  • Download URL: code_to_gpt-0.6-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.6

File hashes

Hashes for code_to_gpt-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 55cc954455a4606c67b13d53548b83e85a51c545f3736493db0924fd97354fa6
MD5 6c25da670a78a772b756863e5907f34e
BLAKE2b-256 2475bf1b11ef1348a96ffc61b1a38af48c126c0eec0e27303e5ea04785f827e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page