LLM Prompt manager for easily managing reusable prompts with dynamic file contents
This is a small CLI meant for terminal users who want to have reusable LLM prompts that are easy to maintain, change and "render", with dynamic content that might change everytime you run it.
Developed because I started using multiple LLMs, tend to restart conversations often (since LLMs lose track of the conversation REALLY quickly).
- Create and manage template prompts
- Replace variables in templates with dynamic content (files, code snippets, directory contents)
- Include content from other files
- Execute shell commands and include their output
- Simple comment system
For now, clone the repository and run cargo install --path .
-
Create a new template:
prompta create mytemplate
-
Edit the template:
prompta edit mytemplate
-
Add a file to a placeholder variable:
prompta add-to-var mytemplate CODE --file=src/main.rs --language=rust
-
Output the rendered template:
prompta output mytemplate
Creates a new empty template.
Opens the template in your default editor (from $EDITOR
environment variable).
Edits the template's metadata JSON file.
Shows all available templates.
Copies an existing template to a new name.
Adds content to a placeholder variable.
Options:
--file, -f <path>
: Path to a file (use "-" for stdin)--language, -l <lang>
: Specify code language for syntax highlighting--directory, -d <path>
: Directory to include files from--extension, -s <ext>
: File extension to filter by (required with --directory)
Renders the template with all placeholders replaced.
Use $VARIABLE
syntax for placeholders that will be replaced when rendered:
Here is my source code:
$CODE
$DATETIME
: Current date and time$STDIN
: Content from standard input
(INCLUDE path/to/file.md)
: Includes content from another file(SHELL command)
: Executes a shell command and includes its output
Lines starting with --
are treated as comments and removed when rendering:
-- This is a comment
This line will be included
-
Code Review Template:
# Code Review Request Date: $DATETIME ## My Code: $SOURCE_CODE ## What I'm trying to do: $PROBLEM_DESCRIPTION
-
Project Summary:
# Project Overview Here are all the Rust files in my project: $RUST_FILES Current git status: (SHELL git status) Latest commit: (SHELL git log -1)
-
Documentation Helper:
I need help documenting this function: $FUNCTION Please write comprehensive documentation explaining: - What it does - Parameters - Return value - Any edge cases
- Use the
--var
option withoutput
to override variables at runtime:prompta output mytemplate --var CODE="console.log('hello')"
- Create a standard set of templates for common tasks
- Use the
(INCLUDE)
macro to share common content between templates
MIT 2025 - Victor Bjelkholm