A Python CLI tool designed not just to parse and restore project structures, but to simplify the creation of complex input prompts for Large Language Models (LLMs). With CLI-Py-Project-Pars3r
, you can bundle an entire project—its files, directories, and their contents—into a single .prompt
file, making it simpler to feed elaborate and fully contextualized information into LLM-based workflows.
This ensures that your LLM can receive all the context it needs in one go, without manual copying or multiple incremental inputs.
- Introduction
- Features
- Requirements
- Installation
- Usage
- LLM Integration and Prompt Templates
- Project Structure
- Testing
- Changelog
- Contributing
- License
CLI-Py-Project-Pars3r
facilitates two key operations:
-
Packing: Parse an entire project into a
.prompt
file—this file acts as a snapshot containing all of the project's files, directories, and content. This.prompt
file can be directly provided to an LLM, allowing the model to have immediate access to the complete context of the project. -
Unpacking: Restore the directory scaffolding and files from a
.prompt
file. If you’ve received a.prompt
file from another source (like a collaborator or a previous session), you can easily reconstruct the entire project structure on your machine.
This approach is particularly useful for LLM-based development, code review, or documentation tasks, where the model needs a holistic understanding of the entire codebase or project environment at once.
- ✅ Parse entire projects into a single
.prompt
file for LLMs. - ✅ Restore directories and files from
.prompt
files, enabling a reproducible project setup. - ✅ Interactive CLI for selecting folders or
.prompt
files, making it user-friendly. - ✅ Flexible and configurable, supporting various file types.
- ✅ Ideal for complex LLM inputs, ensuring the AI has full project context in a single request.
- ✅ Compatible with Python
>= 3.6
.
- Python:
>= 3.6
- pip: Python package manager
-
Clone the repository:
git clone https://github.com/5h1ngy/cli-py-project-pars3r.git cd cli-py-project-pars3r
-
Install the package:
pip install .
-
Test the command:
pars3r
-
Packing:
- Run
pars3r
and choose the pack mode. - Select a folder to analyze. The tool then generates a
.prompt
file summarizing its entire contents. - This
.prompt
file can then be given to an LLM in one shot, providing full context.
Example:
pars3r
- Run
-
Unpacking:
- Run
pars3r
and choose the unpack mode. - Select a
.prompt
file. The tool then reconstructs the original directory structure and files.
Example:
pars3r
Follow the interactive prompts to select the desired
.prompt
file. - Run
This tool shines when integrated into an LLM workflow. For example, once you've created a .prompt
file:
- You can directly feed it into your LLM platform as context.
- The entire project's code, structure, and documentation are included at once, enabling the model to understand complex architectures, dependencies, and coding patterns without incremental context provisioning.
Populating a README template from a .prompt
file:
- Prompt Suggestion:
"Popolami ilREADME.template
in funzione del contenuto del file.prompt
"
This instructs the LLM to fill out aREADME.template
dynamically based on the full project details contained in the.prompt
file.
-
Refactoring Assistance:
"Given the.prompt
file, suggest how to refactor the codebase to improve maintainability and reduce complexity." -
Documentation Enhancement:
"From the.prompt
file, generate extended documentation and code comments for all modules to improve code readability." -
Testing Strategy:
"Using the.prompt
file as context, propose a thorough automated testing strategy that covers all major components of the project."
By including these prompts in your workflow, you can rapidly iterate on documentation, refactoring plans, or testing strategies, all from a single integrated .prompt
file.
cli-py-project-pars3r/
├── cli-py-project-pars3r/
│ ├── __init__.py # Package initialization
│ ├── cli.py # Main script
├── setup.py # Configuration for pip
├── README.md # Documentation
├── assets/ # Images and assets for the README
└── tests/ # (Optional) Automated tests
Run automated tests:
pytest tests/
This project is licensed under the MIT License. See the LICENSE file for details.
- Repository: https://github.com/5h1ngy/cli-py-project-pars3r.git
- Author: 5h1ngy