A CLI tool for managing and using prompt templates with placeholder injection.
Project description
Proplate
A CLI tool for managing and using prompt templates with placeholder injection. Perfect for storing reusable prompt templates and quickly filling them with context-specific information.
Features
- 🎯 Interactive template selection with fuzzy search
- ⚡ Direct template access with tab autocomplete
- 📋 Auto-copy to clipboard for seamless pasting
- 🔧 Placeholder support with single-line and multi-line input
- ✨ Default values for placeholders with
{{name:default}}syntax - 📝 YAML frontmatter for template metadata
- 🎨 Rich CLI output with beautiful formatting
Installation
pip install proplate
Quick Start
1. Create a template
Easy way:
proplate new code-review
This opens your editor with starter content:
---
title: Code Review
description: Add a description here
---
# {{placeholder}}
Your template content goes here.
Use {{placeholder}} syntax for variables.
Or manually create ~/.proplate/templates/code-review.md:
---
title: Code Review Guide
description: Template for thorough code reviews
---
# Code Review: {{file_path}}
## Context
{{context}}
## Review Areas
{{focus_areas}}
## Security Considerations
{{security_notes}}
Pro tip: Make placeholders self-documenting!
{{Your feature request here. Be specific about WHAT and WHY.}}
This way, the placeholder itself tells users what to enter.
2. Use your template
Interactive mode (with fuzzy search):
proplate
Direct selection (with tab autocomplete):
proplate code-review
The tool will:
- Prompt you for each
{{placeholder}} - Support multi-line input when needed
- Automatically copy the filled template to your clipboard
- You can then paste directly into Cursor, ChatGPT, or any other tool
Usage
Main Commands
# Interactive template selector
proplate
# Use a specific template (supports tab completion)
proplate <template-name>
# Create a new template (opens in $EDITOR with starter content)
proplate new <template-name>
# List all available templates
proplate list
# Edit an existing template in $EDITOR
proplate edit <template-name>
# Delete a template (with confirmation)
proplate delete <template-name>
# Delete a template without confirmation
proplate delete <template-name> --force
# Show templates directory path
proplate path
# Initialize templates directory (optional - auto-created on first use)
proplate init
Managing Templates
Create a new template:
proplate new my-template
Creates a template with starter content and opens it in your $EDITOR.
Edit existing template:
proplate edit my-template
Delete a template:
proplate delete my-template # With confirmation prompt
proplate delete my-template --force # Skip confirmation
Manual way:
Create/edit .md files directly in ~/.proplate/templates/ (auto-created on first use)
Shell Autocomplete
Enable tab completion for template names:
# For bash
proplate --install-completion bash
# For zsh
proplate --install-completion zsh
# For fish
proplate --install-completion fish
Then restart your shell or source your config file.
Template Format
Templates are Markdown files with optional YAML frontmatter and {{placeholder}} syntax.
Basic Template
# Hello {{name}}!
This is a simple template.
Template with Frontmatter
---
title: Bug Analysis
description: Structured template for bug investigation
---
# Bug Report: {{bug_id}}
## Description
{{description}}
## Steps to Reproduce
{{steps}}
## Expected vs Actual
**Expected:** {{expected}}
**Actual:** {{actual}}
Placeholder Guidelines
- Use
{{placeholder}}syntax - Default values: Use
{{placeholder:default value}}to provide fallback values - Escape colons: Use
\:to include literal colons in names or defaults (e.g.,{{url:https\://example.com}}) - Multi-line editor: Type
-to open$EDITORfor multi-line input (works with or without defaults) - Placeholders can be descriptive instructions (e.g.,
{{Your request here. Be specific!}}) - Support spaces, punctuation, and special characters
- Duplicate placeholders are prompted once and replaced everywhere
- Whitespace variations (
{{name}},{{ name }}) are normalized - Leave input empty to:
- Use default value (if defined)
- Open multi-line editor (
$EDITOR) (if no default)
Examples
Example 1: Code Review Template
~/.proplate/templates/code-review.md:
---
title: Code Review
description: Comprehensive code review template
---
# Code Review: {{file_path}}
## Context
{{context}}
## Changes Summary
{{changes}}
## Review Checklist
- [ ] Code quality and readability
- [ ] Error handling
- [ ] Security considerations
- [ ] Performance implications
- [ ] Test coverage
## Specific Feedback
{{feedback}}
Example 2: Feature Request (with Default Values)
~/.proplate/templates/feature-request.md:
---
title: Feature Request
description: Template for proposing new features with sensible defaults
---
# Feature Request: {{feature_name}}
## Priority
{{priority:Medium}}
## Requested By
{{requester:Product Team}}
## Description
{{description}}
## Expected Benefits
{{benefits}}
## Implementation Complexity
{{complexity:To be assessed}}
## Target Release
{{release:Next Quarter}}
Usage: When filling this template, press Enter on prompts with defaults to use them, or type to override.
Example 3: Refactoring Plan
~/.proplate/templates/refactor.md:
---
title: Refactoring Plan
description: Template for planning refactoring work
---
# Refactoring: {{component_name}}
## Current State
{{current_state}}
## Problems
{{problems}}
## Proposed Solution
{{solution}}
## Migration Strategy
{{migration}}
## Risks
{{risks}}
Tips
- Default Values: Use
{{placeholder:default}}to provide sensible defaults that users can accept with Enter - Multi-line Editor Access:
- Type
-to open$EDITORfor multi-line input (works even with defaults) - Or press Enter on placeholders without defaults
- Type
- Escaping Colons: Use
\:when you need literal colons in placeholder names or defaults:- URLs:
{{api_url:https\://api.example.com}} - Times:
{{meeting_time:14\:30\:00}} - Labels:
{{Note\: Important:Remember this}}
- URLs:
- Template Organization: Use descriptive filenames (they become the template name)
- Metadata: Add
titleanddescriptionin frontmatter for better organization - Separators: Use
---freely in your template body (only the first block is frontmatter)
Development
# Clone repository
git clone <repo-url>
cd proplate
# Install with uv
uv sync
# Run locally
uv run proplate
# Run tests
uv run pytest
# Run specific test
uv run pytest tests/test_template.py -v
Requirements
- Python >= 3.12
- Dependencies:
typer- CLI frameworkquestionary- Interactive promptspyperclip- Clipboard operationspyyaml- YAML parsingrich- Terminal formatting
License
MIT
Contributing
Contributions welcome! Please ensure:
- Tests pass:
pytest - Code follows project style (modern Python 3.12+ syntax)
- Add tests for new features
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
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 proplate-0.2.1.tar.gz.
File metadata
- Download URL: proplate-0.2.1.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cae84036932c0742802ceeb3bba94d94d58dfefd76740c6c7a5f7695cac67f29
|
|
| MD5 |
cd377b001fedbc4c0e8891bb22c4d706
|
|
| BLAKE2b-256 |
a054621a9474ce85b7d92f4df1bc16f2a1a72ddbe1577c27af45ab786f76395d
|
Provenance
The following attestation bundles were made for proplate-0.2.1.tar.gz:
Publisher:
release.yml on eliorc/proplate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proplate-0.2.1.tar.gz -
Subject digest:
cae84036932c0742802ceeb3bba94d94d58dfefd76740c6c7a5f7695cac67f29 - Sigstore transparency entry: 630161287
- Sigstore integration time:
-
Permalink:
eliorc/proplate@be252c4b1e627f00b28d7bad9bb37d9223ec8f8e -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/eliorc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@be252c4b1e627f00b28d7bad9bb37d9223ec8f8e -
Trigger Event:
release
-
Statement type:
File details
Details for the file proplate-0.2.1-py3-none-any.whl.
File metadata
- Download URL: proplate-0.2.1-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bba1de3eec48e301ed690b8c5be783b7b3bf2f4aae585923ba2d2e3ee6a2c37
|
|
| MD5 |
5079a112dc0a1faa9d8a6e49fc224e35
|
|
| BLAKE2b-256 |
a8ab016142d980687a65d919a043cd637eccb8ab90c8afed3e0a4d94a3cae845
|
Provenance
The following attestation bundles were made for proplate-0.2.1-py3-none-any.whl:
Publisher:
release.yml on eliorc/proplate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proplate-0.2.1-py3-none-any.whl -
Subject digest:
5bba1de3eec48e301ed690b8c5be783b7b3bf2f4aae585923ba2d2e3ee6a2c37 - Sigstore transparency entry: 630161289
- Sigstore integration time:
-
Permalink:
eliorc/proplate@be252c4b1e627f00b28d7bad9bb37d9223ec8f8e -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/eliorc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@be252c4b1e627f00b28d7bad9bb37d9223ec8f8e -
Trigger Event:
release
-
Statement type: