PT Documentationο
PT is a powerful CLI tool that writes your clipboard content directly to a file β with automatic timestamped backups, backup comments, recursive file search, delta diff comparison, directory tree visualization, and safe file deletion. Itβs not just a clipboard manager β itβs a complete version control system for your files!
Overviewο
Core Featuresο
π Quick Save - Write clipboard content to file with one command
π¦ Auto Backup - Automatic timestamped backups stored in .pt/ directory
π¬ Backup Comments - Add descriptive comments to track why changes were made
π Restore - Interactive or quick restore from backups with comments
π Beautiful Listings - Formatted table view of all backups with sizes and comments
π Recursive File Search - Automatically finds files in subdirectories up to 10 levels deep
π Delta Diff Integration - Beautiful side-by-side diff comparison with backups
π³ Directory Tree View - Visual file structure with sizes (like tree command)
ποΈ Safe Delete - Backup before deletion, create empty placeholder
βοΈ Configurable - Customize behavior via pt.yml config file
Git-Like Workflow (NEW!)ο
PT introduces a powerful git-like workflow for version management:
pt check- Show status of all files (likegit status)pt commit -m "message"- Backup all changed files (likegit commit)pt -l <file>- View commit historypt -d <file> --last- See what changed (diff)pt -r <file> --last- Rollback if needed
Requirementsο
Go 1.16 or higher
Git (for installation)
Delta (optional, for diff functionality)
Quick Startο
Copy text to clipboard, then:
pt notes.txt -m "Initial version"
For more details, see the Quick Start Guide guide.