Skip to main content

A powerful, template-based prompt composer for crafting and managing complex instructions for LLMs.

Project description

The Scribe Works Logo

Prompt Scribe

A 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

  1. Initialize a new project: Navigate to your project directory and run:

    prompt-scribe init
    

    This 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
    
  2. Compose your prompts: Run the compose command from your project root:

    prompt-scribe compose
    

    This will read .prompt_scribe/prompts.yml, process the example-code-reviewer agent, and generate the final prompt in .prompt_scribe/composed_prompts/.

  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prompt_scribe-0.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

prompt_scribe-0.1.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

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

Hashes for prompt_scribe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e8b4e0191e8ba638a3f547fc5e84079047d4f8f1c7c71ad00c3f4ef4d2c2839
MD5 f18153e92965eeb85511b3e2429b2a02
BLAKE2b-256 f290d53909b54911fc259974cd4bb2d375ea4468c1e7170653f4885f8484adb2

See more details on using hashes here.

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

Hashes for prompt_scribe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 813bba9cc850b8869a236badce099503aed3e480dea82e18768cf28e52164b3b
MD5 fd5b206b8c30f8a0dbcabd7eb935efaf
BLAKE2b-256 603da1458be887dae7954ef0b20c68fc0c3ad6e716645e77585c86b4183d1fdf

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