Adam Owada
Hooray for GPT-4's 128k token limit! This Python script copies all of your project code
into a text file for easy use with ChatGPT. See the provided project_structure.txt
which is an example of the script ran inside this project.
Attribution: ChatGPT helped me with about 80% of the code.
- Go to a desired project folder in your terminal and run
$ text - A new file named
project_structure.txtwill be created in the root of the project - This will contain the tree of your project and the contents of all UTF-8 encoded files
- Feel free to add/modify the
IGNORE_DIRSorEXTENSIONSvariables insidetextto ignore specified folders or add extension mappings - You can also run
$ text -cor$ text --copywhich will createproject_structure.txtand copy the contents to your clipboard
- Clone the repository or download the project as a .zip
- Create a Python virtual environment
- pip install from the requirements.txt
- Make
textexecutable:$ chmod +x text - Modify the shebang line 1 in
textto point to your virtual environment's interpreter - Modify your .bashrc or .zshrc file to add the folder to your $PATH
- Restart your terminal
- You can now use
$ text!