history
View, search, and manage your saved prompt history.
Usage
prompter history [index|tag] [flags]Flags
--clear,-c- Clear all prompt history--yes,-y- Skip confirmation when clearing--keep-tags,-k- Keep tagged entries when clearing--editor,-e- Open history folder in editor--insert,-n- Open history entry for insertion (adds separator for new content)
Interactive Browser
Without arguments, opens an interactive browser:
prompter historyFeatures:
- Browse history entries with timestamps
- Filter/search entries
- View entry details (size, tokens, flags used)
- Open entry in editor (press Enter)
- Open for insertion (press
i) - Delete entry (press
d)
Direct Access by Index
prompter history 1Opens the most recent history entry (index 1) in your editor.
Search by Tag
prompter history bug-123Searches for history entries tagged with “bug-123” and opens them.
Examples
Browse History
prompter historyInteractive browser shows:
History
#bug-fix2 hours ago r • ~450 • 1.8 KB
One day ago _ • ~320 • 1.3 KB
Jan 15 2024 14:30 dr • ~890 • 3.5 KBOpen Recent Entry
prompter history 1Opens the most recent entry in your editor.
Open for Insertion
prompter history 1 --insertOpens the entry with a separator marker, allowing you to add new content above the previous prompt. Useful for iterating on prompts.
Search Tagged Entries
# Create a tagged promptprompter "fix login bug" --tag bug-123
# Later, find itprompter history bug-123Clear History
# Clear all history (with confirmation)prompter history --clear
# Clear without confirmationprompter history --clear --yes
# Clear but keep tagged entriesprompter history --clear --keep-tagsOpen History Folder
prompter history --editorOpens your history directory in your configured editor.
History Display
Each entry shows:
- Tag (if present):
#tag-name - Time: Relative time (e.g., “2 hours ago”) or absolute date
- Flags: Template shorthand flags used on creation (e.g.,
drfor directory + code-review) - Tokens: Estimated token count (~4 chars per token)
- Size: File size in bytes/KB/MB
History Format
History entries are saved as Markdown files with frontmatter:
---tag: "bug-123"---
[Your base prompt]
---
[Template content]
---
[File content]History Location
History is saved to history_location (default: $XDG_CACHE_HOME/prompter/history).
Configure in your config file:
history_location = "$XDG_CACHE_HOME/prompter/history"disable_history = falseAutomatic Cleanup
History entries are automatically pruned based on history_clear_cycle:
# Never clear (default)history_clear_cycle = "never"
# Clear after 1 dayhistory_clear_cycle = "1"
# Clear after 7 dayshistory_clear_cycle = "7"
# Clear after 31 dayshistory_clear_cycle = "31"Tagged entries are preserved unless you use --keep-tags=false when clearing.
Vim Integration
When using Vim/Neovim with --insert, the cursor is positioned at the insertion point:
prompter history 1 --insertOpens the file with the cursor at the separator line, ready to add new content.