Prompt Generator is a flexible and user-friendly package that offers customizable scripts for generating effective and context-aware prompts. These prompts can be used to guide the writing, improvement, and debugging of code.
Project description
Prompt Generator
Prompt Generator is a flexible and user-friendly package that offers customizable scripts for generating effective and context-aware prompts. These prompts can be used to guide the writing, improvement, and debugging of code.
Installation
Prompt Generator can be installed easily using pip, a package installer for Python:
pip install prompt-generator
Features
-
Generate Project Documentation
This script generates a prompt that can be used to make the AI write documentation for the project.
When executed without arguments it will ask for some info about the project, such as the name, description, root directory, paths to config files, main files, and docs specs.
Instead of writing the info manually you can also provide the path to a JSON file that contains the prompt configuration. The JSON should have the following structure:
{ "name": "<string> (required)", "description": "<string> (required)", "target_audience": "<string> (optional)", "root_dir": "<string> (required)", "config_files": [ { "path": "<string> (required)", "label": "<string> (optional)" }, ... ] (optional), "main_files": [ { "path": "<string> (required)", "label": "<string> (optional)" }, ... ] (optional), "docs_specs": "<string> (optional)" }
To utilize this script, use the following command in your terminal:
pg docs_prompt [--config <path to config file>]
Upon successful execution, the resultant prompt will be displayed in your terminal and copied to your clipboard for immediate use or future reference.
-
Complete Tasks
This script generates a prompt that can be used to help AI complete tasks for the project.
It will ask for the project name, description or the path to README/docs, root directory, and optionally the paths and labels to the files related to the tasks. Finally, it will ask for the single task or task list.
Instead of writing the info manually you can also provide the path to a JSON file that contains the prompt configuration. The JSON should have the following structure:
{ "project_overview": "<string> (optional)", "docs_path": "<string> (optional)", "relevant_files": [ { "path": "<string> (required)", "label": "<string> (optional)" }, ... ] (optional), "tasks": [ "<string> (required)", ... ] (required) }
To utilize this script, use the following command in your terminal:
pg tasks_prompt [--config <path to config file>]
Upon successful execution, the resultant prompt will be displayed in your terminal and copied to your clipboard for immediate use or future reference.
-
Markdown Parser
The Markdown Parser is a robust utility specifically designed to parse markdown files. It works by replacing all hyperlinks within a Markdown document with the actual content of the linked files. This function proves extremely useful if you maintain a collection of prompt files written in Markdown format, and these files contain references to other project documents.
To utilize it, use the following command in your terminal:
pg parse_md <path to the markdown file>
Upon successful execution, the resultant parsed content will be displayed in your terminal and copied to your clipboard for immediate use or future reference.
-
Directory Structure
This tool provides a clear, nested representation of the structure of a directory in your project. It has been designed with gitignore compatibility, meaning it will respect the file exclusion rules defined in your project's .gitignore file. This makes it an essential tool for giving the AI a better understanding of the context of your project. The returned JSON is minified in order to be more token efficient.
To utilize it, use the following command in your terminal. You can optionally provide the .gitignore file path using the -gitignore flag, if not provided, the script will search for a .gitignore file in the root directory:
pg get_dir_structure <path to the directory> [--gitignore <path to the .gitignore file>]
Upon successful execution, the resultant json will be displayed in your terminal and copied to your clipboard for immediate use or future reference.
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
Built Distribution
File details
Details for the file prompt-generator-0.4.0.tar.gz
.
File metadata
- Download URL: prompt-generator-0.4.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de538939d61eaa69d3775fe0d0ab86194c5beba74a18a9d3f1fefc14a9338470 |
|
MD5 | 1f67eecbd4d0336916dbef966671e4bd |
|
BLAKE2b-256 | df6aea607c0ffa30ffdb138bb3a1991e130cd6675ec9233683a6ed9d2b24de17 |
File details
Details for the file prompt_generator-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: prompt_generator-0.4.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cefb70be0577d9cd6df4b5564e3c2204cbd7a2fac6ab231f374d93d950e08d80 |
|
MD5 | 0e1db2499a94bde9fbe1e14185e43458 |
|
BLAKE2b-256 | 5c10c471b698df50f449a487013169c30843c21d6d8bbdf808e8f111765c4328 |