Support for Adding Entire Directories to ChatGPT Projects

Description:
Currently, defining a project in ChatGPT allows adding and managing individual files. However, for more complex projects, it is crucial to enable users to include entire directories. This would allow better organization of project files, maintaining a hierarchical structure and supporting reciprocal referencing between files using relative paths

Motivations:

  • Managing complex projects: Projects with multiple files often require an organized structure in directories to avoid confusion.
  • Consistency in references: Relative references (e.g., ../module/file.py) are essential in many projects to ensure files can interact without manual adjustments.
  • Increased efficiency: Avoiding the need to upload multiple files individually simplifies the project setup process.
  • Real-world alignment: Software development projects are typically organized into directories; supporting this in ChatGPT improves alignment with real-world workflows.

Technical details:

  • Allow users to upload directories either by selecting them through a file explorer or by specifying their path.
  • Preserve the directory’s hierarchical structure within the project.
  • Provide an interface to navigate through files and subdirectories.
  • Ensure relative paths between files are recognized and handled correctly, for instance, during content analysis or processing.

Expected impact:

  • Simplifies the management of multi-file projects.
  • Reduces the time required to set up projects.
  • Boosts productivity and usability for developers and researchers working with ChatGPT on complex prototypes or study projects.

Use case example:
A user could upload a directory my_project containing:

css

Copia codice

my_project/  
├── main.py  
├── utils/  
│   ├── helper.py  
│   └── constants.py  
├── data/  
│   └── dataset.csv  

This way, all files within the directory would be available for consultation and modification by ChatGPT, and relative references (e.g., from utils.helper import my_function) would work seamlessly

Priority: Medium/High

2 Likes

I agree that this would be useful and have found myself wanting this feature almost since projects support was first rolled out. While I don’t have a perfect mitigation for the lack of directory hierarchy support in ChatGPT, I did recently release an open source tool that you might find useful: Mimeogram. Can be installed as a standalone executable or a Python package: Github Releases / PyPI.

What it does is bundle all of the files that you specify into a “mimeogram” and place it into your clipboard so that it can be pasted into a prompt input. The mimeogram is a lot like an email with attachments; each part has a Content-Location header which tells the absolute or relative path on your local file system or remote URL from which the file came. All of the various OpenAI and other models that I’ve tried with it understand this format. The tool also supports round trips, meaning that a LLM can create a mimeogram that you can apply back to your local filesystem.

Obviously, there are tradeoffs between this approach, having files managed in a project, or using an LLM-backed IDE, like Cursor. I personally like mimeograms in some situations, because they can be cheaper than tool use via an API or paying for a separate subscription to something like Cursor. Compared to projects on ChatGPT or Claude, mimeograms provide a more elegant way to reflect changes back to your local system when you’re done working with the LLM. (I.e., you don’t have to download separate files.)