promptlog
v1.0.2
Published
Version control for your AI prompts
Maintainers
Readme
PromptLog
Version control for your AI prompts. Like git, but for the prompts you use with AI coding assistants.

Installation
npm install -g promptlogQuick Start
# Copy a prompt to your clipboard, then save it
promptlog save code-review --note "initial version"
# List all saved prompts
promptlog list
# View prompt history
promptlog history code-review
# Show a specific version
promptlog show code-review@1
# Compare versions
promptlog diff code-review
# Copy a prompt back to clipboard
promptlog show code-review --copyCommands
promptlog save <name>
Save clipboard contents as a new prompt version.
promptlog save code-review # Save with confirmation
promptlog save code-review --note "v2 notes" # Add a note
promptlog save code-review --yes # Skip confirmationFlags:
-n, --note <note>- Add a note describing this version-y, --yes- Skip confirmation prompt
promptlog list
List all saved prompts.
promptlog listNAME VERSIONS LAST UPDATED
code-review 3 2 hours ago
sql-generator 7 Dec 4
commit-msg 2 Nov 28, 2024promptlog history <name>
Show version history for a prompt.
promptlog history code-reviewv3 2 hours ago "added naming convention rules"
v2 3 days ago "stricter about error handling"
v1 Dec 4 (no note)promptlog show <name>
Display a prompt. Use @N for a specific version.
promptlog show code-review # Latest version
promptlog show code-review@2 # Specific version
promptlog show code-review -c # Copy to clipboardpromptlog diff <name> [v1] [v2]
Show diff between versions.
promptlog diff code-review # Latest vs previous
promptlog diff code-review 2 # v2 vs latest
promptlog diff code-review 1 3 # v1 vs v3promptlog delete <name>
Delete a prompt and all its versions.
promptlog delete code-review # With confirmation
promptlog delete code-review --yes # Skip confirmationA backup is automatically created before deletion at ~/.promptlog/.backup/.
promptlog export <name>
Export prompt to stdout.
promptlog export code-review # Plain text
promptlog export code-review@2 # Specific version
promptlog export code-review --json # JSON formatpromptlog rename <old> <new>
Rename a prompt.
promptlog rename code-review strict-reviewerStorage
Prompts are stored at ~/.promptlog/prompts/ as JSON files:
~/.promptlog/
├── config.json # Settings (optional)
├── prompts/
│ ├── code-review.json
│ └── sql-generator.json
└── .backup/ # Backups before deletionConfiguration
Edit ~/.promptlog/config.json (created automatically):
{
"preview_length": 200,
"auto_confirm": false,
"backup_enabled": true
}Security
- Sensitive content detection: Warns if clipboard contains API keys, tokens, or private keys
- Local only: No network requests, all data stays on your machine
- Restrictive permissions: Files created with
0600(owner read/write only)
Name Rules
Prompt names must:
- Start with a lowercase letter
- Contain only
a-z,0-9,- - Be 1-50 characters
License
MIT
