Skip to main content

A tool for detecting project structure and technology stack with the help of GPT.

Project description

PyPI version License: MIT Downloads LinkedIn

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

MIT

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

projectstructor-2025.5.180959.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

projectstructor-2025.5.180959-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file projectstructor-2025.5.180959.tar.gz.

File metadata

  • Download URL: projectstructor-2025.5.180959.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for projectstructor-2025.5.180959.tar.gz
Algorithm Hash digest
SHA256 a1ccdb6ec95e371c8718dea0ede396b533e9944ddd38e95c62e041065474a752
MD5 8564772da37a7375b9909831c9a066a0
BLAKE2b-256 38613a2d28d71f80c046e36964ff5146ef20e7acb6d5ca7a52d1af6612478512

See more details on using hashes here.

File details

Details for the file projectstructor-2025.5.180959-py3-none-any.whl.

File metadata

File hashes

Hashes for projectstructor-2025.5.180959-py3-none-any.whl
Algorithm Hash digest
SHA256 aa627084d8bd0f5740a20736443dc395f6544acc6dc81391ad37a51ecc13e752
MD5 2bd0546caa2cd7a698e1ac4168cd9fa0
BLAKE2b-256 9486a39aa5b5e820043fb134d993584d83b5159cd611f58dcdd5528c2aa7e5e3

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