Skip to content
/ pmt Public

⌨️ 终端里的 TUI 提示词管理器 / TUI Prompt Manager in the terminal.

License

Notifications You must be signed in to change notification settings

BaoPaper/pmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pmt

PromptManager TUI for browsing prompt templates, filling variables, and copying the rendered result to the clipboard.

Features

  • Reads templates from ~/.config/pmt/prompts.md
  • Uses ## Title as template name; content until next heading is the body
  • Supports hierarchy with / in titles (TreeView)
  • Form-based variable input with live preview
  • Variables: {name} or {name|description}
  • Random placeholders: {random|"opt1" "opt2" ...} with reroll
  • Copy renders only the final output (shows a short status message)

Install

Rust toolchain is required.

cargo install --path .

Run

pmt

Prompt file format

Create ~/.config/pmt/prompts.md:

## Writing/Email/FollowUp
Write a polite follow-up email to {name|recipient} about {topic|subject}.

## Coding/Review/Checklist
Review the {area|component} and list {random|"security" "performance" "usability"} risks.

Rules:

  • Each template starts with ## Title
  • Body is everything until the next ##
  • Leading whitespace is preserved
  • If no template headings exist, the app shows an error

Placeholders

  • {name} or {name|description} creates an input field
  • Empty input leaves the placeholder unchanged
  • {random|"opt1" "opt2" ...} is rolled on load and kept consistent between preview and final copy

Keybindings

List view:

  • Up/Down or j/k: move
  • Enter / double click: open template
  • e: edit template
  • q: quit

Editor view:

  • Tab or Up/Down: switch fields
  • Ctrl+C: copy rendered output
  • F5: reroll random placeholders
  • Esc: back to list

Notes

  • Mouse capture is enabled to support double click in the list

About

⌨️ 终端里的 TUI 提示词管理器 / TUI Prompt Manager in the terminal.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages