ProjectStructoR
ProjectStructoR is a Python tool designed to analyze directories and detect the project structure and technology stack used in the files. It leverages GPT from OpenAI to provide a comprehensive analysis including the count of files, lines of code, and the likely technologies present.
Installation
To install ProjectStructoR, you can use pip:
pip install ProjectStructoR
Usage
As a Python Module
ProjectStructoR can be used as a Python module in your scripts.
Example:
from projectstructor.detector import ProjectStructureDetector
# Initialize the detector with the target directory and your OpenAI API key
detector = ProjectStructureDetector('/path/to/your/project', 'your-openai-api-key')
# Detect the structure of the project
print(detector.detect_structure(ignore_gitignore=True))
# Detect the languages used in the project
print(detector.detect_languages())
# Analyze with GPT and print the JSON result
chat_completion = detector.analyze_with_gpt()
content = chat_completion.choices[0].message.content
result = json.loads(content)
print(json.dumps(result, indent=2))
As a Command Line Tool
Currently, ProjectStructoR is intended to be used as a module in Python scripts. If there's enough interest, command line functionality may be added in future versions.
Output Example
When you run ProjectStructoR, it outputs the structure of the project directory and a report with the detected languages and technologies. Here is an example output:
detected structure:
project/
|-- main.py
|-- utils/
| |-- __init__.py
| |-- helper.py
detected languages and technologies:
Python files: 3, lines of code: 120
JavaScript files: 1, lines of code: 45
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check issues page.
License
Metadata
Release files for ProjectStructoR 2025.5.180959
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| projectstructor-2025.5.180959.tar.gz | 4.4 kB | Without provenance | Details for projectstructor-2025.5.180959.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| projectstructor-2025.5.180959-py3-none-any.whl | Python 3 | none | any | Details for projectstructor-2025.5.180959-py3-none-any.whl |
Total release size: 9.5 kB
Release files / projectstructor-2025.5.180959.tar.gz
| Download URL | projectstructor-2025.5.180959.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1ccdb6ec95e371c8718dea0ede396b533e9944ddd38e95c62e041065474a752
|
|
BLAKE2b-256 checksum How to use checksums |
38613a2d28d71f80c046e36964ff5146ef20e7acb6d5ca7a52d1af6612478512
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.11
|
Release files / projectstructor-2025.5.180959-py3-none-any.whl
| Download URL | projectstructor-2025.5.180959-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa627084d8bd0f5740a20736443dc395f6544acc6dc81391ad37a51ecc13e752
|
|
BLAKE2b-256 checksum How to use checksums |
9486a39aa5b5e820043fb134d993584d83b5159cd611f58dcdd5528c2aa7e5e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.11
|
Security for ProjectStructoR 2025.5.180959
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.