A powerful, template-based prompt composer for crafting and managing complex instructions for LLMs.
Project description
|
|
Prompt ScribeA powerful, template-based prompt composer for crafting and managing complex instructions for LLMs. |
The Problem
Managing large, multi-part prompts for Large Language Models can be messy. You often combine a persona, rules, context from different files, and a specific query. Doing this manually by copy-pasting is tedious and error-prone.
The Solution
Prompt Scribe automates this process. It uses a simple YAML configuration and the powerful Jinja2 templating engine to compose your final prompts from various source files, ready to be used in any LLM chat or API.
Key Features
- Template-Based: Use Jinja2 templates for maximum flexibility.
- Modular: Split your prompts into reusable parts (personas, includes, rules).
- Safe Initialization: Creates a dedicated
.prompt_scribe/directory to avoid cluttering your project root. - Watch Mode: Automatically recompose prompts when source files change.
- Beautiful CLI: A clean, helpful command-line interface.
Installation
pip install prompt-scribe
Quick Start
-
Initialize a new project: Navigate to your project directory and run:
prompt-scribe initThis will create a self-contained
.prompt_scribe/directory with a default structure:. └── .prompt_scribe/ ├── composed_prompts/ ├── includes/ │ └── development-rules.md ├── personas/ │ └── code-reviewer.md ├── templates/ │ └── master.jinja2 └── prompts.yml -
Compose your prompts: Run the compose command from your project root:
prompt-scribe composeThis will read
.prompt_scribe/prompts.yml, process theexample-code-revieweragent, and generate the final prompt in.prompt_scribe/composed_prompts/. -
Use the output: Open the generated file, copy the content, and paste it into your LLM chat interface.
Usage
Composing Prompts
- Compose all agents:
prompt-scribe compose - Compose specific agents:
prompt-scribe compose agent-one agent-two
- Watch for changes and automatically recompose:
prompt-scribe compose --watch
Configuration (.prompt_scribe/prompts.yml)
The prompts.yml file is the heart of your project. It resolves all paths relative to its own location.
# Global settings for all agents
settings:
personas_dir: "personas"
includes_dir: "includes"
templates_dir: "templates"
output_dir: "composed_prompts"
# Map of agents to be composed
agents:
example-code-reviewer:
# Jinja2 template to use for rendering
template: master.jinja2
# The final output file name
output_file: example_code_reviewer.md
# The persona section, available as `persona` in the template
persona:
file: personas/code-reviewer.md
# A list of content sections, available as `sections` in the template
sections:
- title: "📜 Key Development Rules"
prologue: "These are the mandatory rules and principles for this project."
file: includes/development-rules.md
- title: "📄 Code Snippet for Review"
# You can also include content directly
content: |
```python
def hello_world():
print("Hello, Scribe!")
```
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prompt_scribe-0.1.0.tar.gz.
File metadata
- Download URL: prompt_scribe-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.14.0 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e8b4e0191e8ba638a3f547fc5e84079047d4f8f1c7c71ad00c3f4ef4d2c2839
|
|
| MD5 |
f18153e92965eeb85511b3e2429b2a02
|
|
| BLAKE2b-256 |
f290d53909b54911fc259974cd4bb2d375ea4468c1e7170653f4885f8484adb2
|
File details
Details for the file prompt_scribe-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prompt_scribe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.14.0 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
813bba9cc850b8869a236badce099503aed3e480dea82e18768cf28e52164b3b
|
|
| MD5 |
fd5b206b8c30f8a0dbcabd7eb935efaf
|
|
| BLAKE2b-256 |
603da1458be887dae7954ef0b20c68fc0c3ad6e716645e77585c86b4183d1fdf
|