ptis 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!
- π Quick Save - Write clipboard content to file with one command
- π¦ Auto Backup - Automatic timestamped backups stored in
./backup/directory - π¬ Backup Comments - Add descriptive comments to track why changes were made β¨ NEW!
- β Append Mode - Add content without creating backups
- π Restore - Interactive or quick restore from backups with comments
- π Beautiful Listings - Formatted table view of all backups with sizes and comments β¨ NEW!
- π Production Hardened - Path validation, size limits, error handling
- π¨ Colorful Output - ANSI colors for better readability
- π Audit Logging - All operations logged for tracking
- β Check Mode - Skip writes if content unchanged (saves disk space) β¨ NEW!
- π 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
treecommand) - π GitIgnore Support - Respects
.gitignorepatterns in tree view - ποΈ Safe Delete - Backup before deletion, create empty placeholder
- βοΈ Exception Filtering - Exclude specific files/folders from tree view
- π― Multi-File Selection - Interactive prompt when multiple files found
- π Smart Path Resolution - Finds files anywhere in your project
- βοΈ Configurable - Customize behavior via
pt.ymlconfig file β¨ NEW!
PT acts as a lightweight version control system with descriptive comments:
- π Complete Version History - Every file change is preserved with optional comments
- π¬ Comment System - Track why changes were made, not just when
- π Contextual Notes - Add meaningful descriptions to each backup
- π Easy Rollback - Restore any previous version instantly, see why it was saved
- π Version Comparison - Diff any two versions visually with delta
- π― Zero Data Loss - Never lose work, automatic backup before every write
- πΎ Space Efficient - Only changed files are backed up
- π·οΈ Timestamped Versions - Microsecond precision timestamps + human-readable comments
- Go 1.16 or higher
- Git (for installation)
- Delta (optional, for diff functionality) - Install from here
go install github.com/cumulus13/pt-go/pt@latest
# or Clone the repository
git clone https://github.com/cumulus13/pt-go.git
cd pt-go
# Build and install
go build -o pt pt/main.go
# Move to your PATH (Linux/macOS)
sudo mv pt /usr/local/bin/
# Or for Windows, add to your PATH manually# One-liner installation
curl -sSL https://raw.githubusercontent.com/cumulus13/pt-go/pt/main/install.sh | bash# macOS
brew install git-delta
# Ubuntu/Debian
sudo apt install git-delta
# Arch Linux
sudo pacman -S git-delta
# Fedora/RHEL
sudo dnf install git-delta
# Windows (with Chocolatey)
choco install delta
# Windows (with Scoop)
scoop install delta
# Or download from: https://github.com/dandavison/delta/releasespt --version
# PT version 1.0.19
# Production-hardened clipboard to file tool
# Features: Recursive search, backup management, delta diff, tree view, safe delete, configurable, comments[Documentation] (https://pt.readthedocs.io/en/latest)
# Write clipboard to file (creates backup if exists)
pt myfile.txt
# Write with comment β¨ NEW!
pt myfile.txt -m "Fixed bug in authentication logic"
# Write with check mode (skip if unchanged) β¨ NEW!
pt myfile.txt -c
# Combine check mode with comment β¨ NEW!
pt myfile.txt -c -m "Updated configuration"
# Append clipboard to file (no backup)
pt + myfile.txt
# Append with comment β¨ NEW!
pt + myfile.txt -m "Added new log entry"
# List all backups with sizes, timestamps, and comments β¨ NEW!
pt -l myfile.txt
# Restore backup (interactive selection)
pt -r myfile.txt
# Restore with comment β¨ NEW!
pt -r myfile.txt -m "Rolled back to stable version"
# Restore last backup directly
pt -r myfile.txt --last
# Restore last backup with comment β¨ NEW!
pt -r myfile.txt --last -m "Emergency rollback"
# Show help
pt --help
# Show version
pt --version# Initialize configuration file
pt config init # Creates pt.yml in current directory
pt config init ~/.pt.yml # Create in custom location
# Show current configuration
pt config show
# Show config file location
pt config path# π RECURSIVE SEARCH - Automatically finds files in subdirectories
pt config.json # Searches up to 10 levels deep
pt -l utils.go # List backups (searches recursively)
pt -r main.py # Restore (searches recursively)
# π DIFF OPERATIONS - Compare with backups using delta
pt -d myfile.txt # Interactive: choose which backup to compare
pt -d myfile.txt --last # Quick: compare with most recent backup
pt --diff script.py # Alternative syntax
# π³ DIRECTORY TREE - Visualize file structure
pt -t # Show tree of current directory
pt -t /path/to/dir # Show tree of specific directory
pt -t -e node_modules,.git # Tree with exceptions (exclude folders)
pt -t /path -e build,dist # Combine path and exceptions
# ποΈ SAFE DELETE - Backup before deletion
pt -rm old_file.txt # Backup, delete, create empty placeholder
pt -rm old_file.txt -m "Deprecated old implementation" # With comment β¨ NEW!
pt --remove script.py # Alternative syntax# Copy some text to clipboard, then:
pt notes.txt -m "Meeting notes from sprint planning"
# β
Successfully written to: notes.txt
# π Content size: 142 characters
# π¬ Comment: "Meeting notes from sprint planning"# Before making risky changes
pt main.go -m "Working version before refactoring"
# π¦ Backup created: main_go.20251118_141241...
# π¬ Comment: "Working version before refactoring"
# After changes (only saves if different)
pt main.go -c -m "Refactored authentication module"
# π Content differs, proceeding with backup and write
# β
Successfully written to: main.go
# View version history with comments
pt -l main.go
# Shows table with comments for each version# Save production config
pt config.json -m "Production config for v2.1.0 release"
# Later, update for testing
pt config.json -m "Testing new cache settings"
# View all config versions with comments
pt -l config.json
# ββββββββββββββ¬ββββββββββββββ¬βββββββ¬βββββββββββββββββββββββββββββ
# β File Name β Modified β Size β Comment β
# ββββββββββββββΌββββββββββββββΌβββββββΌβββββββββββββββββββββββββββββ€
# β 1. config..β 14:12:41 β 2 KB β Testing new cache settings β
# β 2. config..β 10:30:15 β 2 KB β Production config v2.1.0 β
# ββββββββββββββ΄ββββββββββββββ΄βββββββ΄βββββββββββββββββββββββββββββ
# Restore production config
pt -r config.json -m "Reverting to production config"# Only write if content actually changed
pt data.json -c
# βΉοΈ Content identical to current file, no changes needed
# π File: data.json
# Or with comment if it does change
pt data.json -c -m "Updated user preferences"
# π Content differs, proceeding with backup and write
# π¦ Backup created with comment# Delete old implementation with explanation
pt -rm legacy_auth.py -m "Replaced by new OAuth2 implementation"
# π¦ Backup created: legacy_auth_py.20251118_141241...
# π¬ Comment: "Replaced by new OAuth2 implementation"
# ποΈ File deleted: legacy_auth.py
# π Created empty placeholder: legacy_auth.py# Append log entries with context
pt + errors.log -m "Error logs from production incident"
# β
Successfully appended to: errors.log
# π Content size: 87 characters
# π¬ Comment: "Error logs from production incident"pt -r main.go
# π Backup files for 'main.go'
# Total: 5 backup(s) (stored in ./backup/)
#
# ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββ¬βββββββββββββββββββββββββββββββββ
# β File Name β Modified β Size β Comment β
# ββββββββββββββββββββββββββββΌββββββββββββββββββββββΌβββββββββββΌβββββββββββββββββββββββββββββββββ€
# β 1. main_go.20251118... β 2025-11-18 14:12:41 β 50.5 KB β Add comment system β
# β 2. main_go.20251118... β 2025-11-18 14:11:24 β 57.0 KB β Working version before refactorβ
# β 3. main_go.20251118... β 2025-11-18 13:43:01 β 52.6 KB β Fixed authentication bug β
# β 4. main_go.20251113... β 2025-11-13 11:47:02 β 49.2 KB β - β
# β 5. main_go.20251113... β 2025-11-13 11:39:49 β 49.2 KB β - β
# ββββββββββββββββββββββββββββ΄ββββββββββββββββββββββ΄βββββββββββ΄βββββββββββββββββββββββββββββββββ
#
# Enter backup number to restore (1-5) or 0 to cancel: 2
# β
Successfully restored: main.go
# π¦ From backup: main_go.20251118_141124...
# π¬ Restore comment: "Restored from backup"# Create configuration file
pt config init
# Edit pt.yml
cat > pt.yml << EOF
# PT Configuration File
max_clipboard_size: 104857600 # 100MB
max_backup_count: 100 # Keep 100 backups
max_filename_length: 200 # Max filename length
backup_dir_name: backup # Backup directory name
max_search_depth: 10 # Max recursive search depth
EOF
# View current config
pt config show
#
# Current PT Configuration:
#
# Max Clipboard Size: 104857600 bytes (100.0 MB)
# Max Backup Count: 100
# Max Filename Length: 200 characters
# Backup Directory: backup/
# Max Search Depth: 10 levels
#
# Config loaded from: ./pt.yml# File not in current directory? PT finds it automatically!
pt config.json
# π Searching for 'config.json' recursively...
# β Found at: /path/to/project/src/config.json
# Multiple files found? PT shows interactive selection
pt README.md
# π Found 3 matching file(s)
#
# ββββββββ¬βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββββββ
# β # β Path β Modified β Size β
# ββββββββΌβββββββββββββββββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββ€
# β 1 β ./README.md β 2025-11-15 10:30:00 β 15.2 KB β
# β 2 β ./docs/README.md β 2025-11-14 15:20:00 β 8.5 KB β
# β 3 β ./examples/README.md β 2025-11-13 09:15:00 β 3.2 KB β
# ββββββββ΄βββββββββββββββββββββββββββββ΄ββββββββββββββββββββββ΄βββββββββββββββ
#
# Enter file number to use (1-3) or 0 to cancel: 1
# β Using: ./README.md# Interactive diff - choose which backup to compare
pt -d main.go
# π Backup files for 'main.go'
# [Shows list of backups with comments]
# Enter backup number to compare (1-5) or 0 to cancel: 1
# π Comparing with backup: main_go.20251115_120000...
# [Beautiful side-by-side diff powered by delta]
# Quick diff with last backup
pt -d main.go --last
# π Comparing with last backup: main_go.20251115_151804...
# Current file: /path/to/main.go
# Backup file: /path/to/backup/main_go.20251115_151804...
# [Beautiful colored diff output]# Show current directory tree
pt -t
# myproject/
# βββ src/
# β βββ main.go (15.2 KB)
# β βββ utils.go (3.4 KB)
# βββ backup/
# β βββ main_go.20251115_101530.12345 (8.1 KB)
# βββ README.md (2.1 KB)
# βββ go.mod (456 B)
#
# 2 directories, 5 files, 29.2 KB total
# Exclude specific folders
pt -t -e node_modules,.git,distπ Backup files for 'myfile.txt'
Total: 5 backup(s) (stored in ./backup/)
ββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β File Name β Modified β Size β Comment β
ββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ€
β 1. myfile_txt.20251118_141241... β 2025-11-18 14:12:41 β 2.45 KB β Add comment system β
β 2. myfile_txt.20251118_140030... β 2025-11-18 14:00:30 β 2.40 KB β Fixed bug in auth logic β
β 3. myfile_txt.20251118_120000... β 2025-11-18 12:00:00 β 1.98 KB β Updated configuration β
β 4. myfile_txt.20251114_180000... β 2025-11-14 18:00:00 β 1.85 KB β - β
β 5. myfile_txt.20251114_100000... β 2025-11-14 10:00:00 β 1.52 KB β - β
ββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββ
# When content is identical
pt data.json -c
# βΉοΈ Content identical to current file, no changes needed
# π File: data.json
# When content differs
pt data.json -c -m "Updated schema"
# π Content differs, proceeding with backup and write
# π¦ Backup created: data_json.20251118_141241...
# π¬ Comment: "Updated schema"
# β
Successfully written to: data.jsonpt/
βββ backup/ # Auto-created backup directory
β βββ main_go.20251115_163913... # Timestamped backups
β βββ main_go.20251115_163913.....meta.json # Metadata with comments β¨ NEW!
β βββ main_go.20251115_151804...
βββ go.mod # Go module definition
βββ go.sum # Dependency checksums
βββ pt/
β βββ main.go # Main application code
βββ pt.yml # Configuration file (optional) β¨ NEW!
βββ README.md # This file
βββ LICENSE # MIT License
βββ VERSION # Version file
βββ .gitignore # Git ignore rules
βββ install.sh # Installation script (optional)
All backups are stored in a ./backup/ subdirectory relative to the file location. Each backup now has an associated .meta.json file:
project/
βββ myfile.txt # Current version
βββ backup/ # Backup directory (auto-created)
β βββ myfile_txt.20251115_151804... # Backup 1
β βββ myfile_txt.20251115_143022... # Backup 2
β βββ myfile_txt.20251115_120000... # Backup 3
βββ src/
β βββ app.js # Current version
β βββ backup/ # Separate backup dir per location
β βββ app_js.20251115_120000...
βββ other_files.txt
{
"comment": "Fixed authentication bug",
"timestamp": "2025-11-18T14:12:41.500000Z",
"size": 51712,
"original_file": "/path/to/main.go"
}PT now supports configuration via pt.yml file. Search locations (in order):
./pt.ymlor./pt.yaml(current directory)~/.config/pt/pt.ymlor~/.config/pt/pt.yaml~/pt.ymlor~/pt.yaml(home directory)
# Generate sample config
pt config init
# Or create manually
cat > pt.yml << EOF
# PT Configuration File
max_clipboard_size: 104857600 # 100MB (1-1GB)
max_backup_count: 100 # 100 backups (1-10000)
max_filename_length: 200 # 200 chars (1-1000)
backup_dir_name: backup # "backup" directory
max_search_depth: 10 # 10 levels (1-100)
EOF| Setting | Default | Range | Description |
|---|---|---|---|
| max_clipboard_size | 104857600 (100MB) | 1 - 1073741824 (1GB) | Maximum clipboard content size |
| max_backup_count | 100 | 1 - 10000 | Maximum backups kept per file |
| max_filename_length | 200 | 1 - 1000 | Maximum filename length |
| backup_dir_name | backup | - | Backup directory name |
| max_search_depth | 10 | 1 - 100 | Recursive search depth |
# Show current config
pt config show
# Show config file location
pt config pathBackups use this format for zero-collision guarantee:
originalname_ext.YYYYMMDD_HHMMSS_MICROSECONDS.PID_RANDOMID
Example:
notes_txt.20251115_151804177132.12345_a1b2c3d4
notes_txt.20251115_151804177132.12345_a1b2c3d4.meta.json β¨ NEW!
Components:
notes_txt- Original filename without extension20251115_151804177132- Timestamp with microsecond precision12345- Process IDa1b2c3d4- Random 8-character hex ID.meta.json- Metadata file with comment β¨ NEW!
This ensures zero collision risk even with:
- Multiple concurrent PT instances
- Same-second operations
- Parallel processing
- Multiple files with same name in different directories
- β
Prevents path traversal attacks (
../../../etc/passwd) - β
Blocks writes to system directories (
/etc,/sys,C:\Windows) - β Validates filename length limits
- β Sanitizes all file paths
- β Validates recursive search depth
- β Validates configuration values β¨ NEW!
- β Maximum 100MB clipboard content (configurable) β¨ NEW!
- β Prevents disk exhaustion attacks
- β Validates disk space before writing
- β Checks write permissions
- β All user inputs sanitized
- β Numeric inputs validated for range
- β Graceful handling of malformed input
- β Protected against command injection
- β Safe file selection in multi-match scenarios
- β Configuration file validation β¨ NEW!
- β Atomic-like file operations
- β Verification of write completion
- β Automatic rollback on errors
- β Backup before destructive operations
- β Backup directory exclusion from search
- β Metadata integrity checks β¨ NEW!
- Text Only - Only supports text content (no binary clipboard data)
- Single File - Operates on one file at a time
- Local Only - No network or cloud storage support
- Platform Support - Requires clipboard access (may need X11 on Linux headless)
- Delta Required - Diff feature requires delta to be installed
- Search Depth - Recursive search limited to configurable depth (default 10)
- Backup Exclusion - Configured backup directories excluded from search
- Comment Length - No enforced limit on comment length β¨ NEW!
β οΈ Warning: Clipboard is emptySolution: Copy some text to clipboard before running PT
β Error: no write permission in directorySolution: Check directory permissions or use a different location
β Error: clipboard content too large (max 100MB)Solution: Content exceeds safety limit. Increase max_clipboard_size in config or save directly
β Error: file not found: config.jsonSolutions:
- Check filename spelling
- File might be deeper than 10 levels (increase MaxSearchDepth)
- Ensure file exists somewhere in the directory tree
- Use absolute path if outside search scope
β οΈ Warning: invalid max_clipboard_size, using defaultSolution: Check config file syntax and value ranges. Use pt config show to verify
βΉοΈ Content identical to current file, no changes neededThis is normal: Check mode (-c) prevents unnecessary writes when content hasn't changed
Solution: Select the file number you want to work with, or press 0 to cancel
β Error: failed to read clipboardSolution: Install clipboard utilities:
# Ubuntu/Debian
sudo apt-get install xclip xsel
# Fedora/RHEL
sudo dnf install xclip xsel
# Arch
sudo pacman -S xclip xselβ Error: delta not installed. Install it from: https://github.com/dandavison/deltaSolution: Install delta for diff functionality:
# macOS
brew install git-delta
# Ubuntu/Debian
sudo apt install git-delta
# Arch Linux
sudo pacman -S git-delta
# Windows
scoop install deltaπ Searching for 'file.txt' recursively...
β Error: file not found: file.txtPossible causes:
- File is deeper than 10 directory levels
- File is in a
backupsubdirectory (automatically excluded) - Permission issues reading some directories
- Typo in filename
Solutions:
- Use absolute path:
pt /full/path/to/file.txt - Increase MaxSearchDepth in code
- Check file permissions
- Verify filename spelling
# Test basic write
echo "Hello World" | pbcopy # macOS (or xclip -selection clipboard on Linux)
pt test.txt
# Test append
echo "Line 2" | pbcopy
pt + test.txt
# Test backup listing
pt -l test.txt
# Test restore
pt -r test.txt --last
# Test diff
pt -d test.txt --last
# Test recursive search (NEW!)
mkdir -p deep/nested/path
echo "test" | pbcopy
pt deep/nested/path/file.txt
cd ../../..
pt -l file.txt # Should find it automatically
# Test multiple file selection (NEW!)
echo "test1" | pbcopy
pt test.txt
mkdir subdir
echo "test2" | pbcopy
pt subdir/test.txt
pt test.txt # Should show selection prompt
# Test tree
pt -t
# Test safe delete
pt -rm test.txtgo test ./...| Operation | Performance | Notes |
|---|---|---|
| Startup Time | < 50ms | Very fast startup |
| Write Speed | Disk I/O limited | Depends on storage |
| Memory Usage | ~5MB + content | Minimal footprint |
| Backup Creation | < 100ms | For typical files |
| Search Speed | < 200ms | For 1000+ files (NEW!) |
| Multi-file Search | < 500ms | Up to 10 levels deep (NEW!) |
| Tree Generation | < 500ms | For 5000+ files/folders |
| Diff Rendering | Depends on delta | Powered by delta |
Use PT as a lightweight version control with meaningful comments:
- Track every change with why it was made
- Compare versions visually with delta
- Restore any previous version instantly
- See the context of each change through comments
- No git repository needed
Perfect for tracking config changes:
- Document why each config change was made
- Check mode prevents duplicate backups
- Compare configurations visually
- Easy rollback with context
- Complete audit trail with comments
Build your snippet collection with context:
- Save snippets with descriptive comments
- Version history with reasons for changes
- Compare different versions
- Organize with meaningful metadata
Better documentation management:
- Track all changes with explanations
- Visual diff of updates
- Restore previous versions
- Know why changes were made
- Organized backup history with comments
Quick recovery with understanding:
- Instant rollback to any version
- See why each version was saved
- Compare what changed
- Document the rollback reason
- Complete incident tracking
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone your fork
git clone https://github.com/cumulus13/pt-go.git
cd pt-go
# Install dependencies
go mod download
# Run in development
go run pt/main.go --help
# Build
go build -o pt pt/main.go
# Format code
go fmt ./...
# Run linters (optional)
golangci-lint runWant to contribute? Here are some ideas:
- Config file support (
.ptrc) (β DONE in v1.0.19) - Backup comments/metadata (β DONE in v1.0.19)
- Check mode to skip identical content (β DONE in v1.0.19)
- Custom backup directory location (absolute path)
- Backup compression (gzip)
- Backup to cloud storage (S3, GCS)
- Web UI for backup management
- Backup cleanup strategies (by age, size)
- File watching mode (auto-backup on change)
- Backup tags (additional metadata)
- Multi-file operations
- Backup encryption
- Recursive file search (β DONE in v1.0.25)
- Delta diff integration (β DONE in v1.0.25)
- Interactive file selection (β DONE in v1.0.25)
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Hadi Cahyadi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- GitHub: @cumulus13
- Email: cumulus13@gmail.com
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Discussions
- π§ Email: cumulus13@gmail.com
Made with β€οΈ by Hadi Cahyadi
Your complete file version management system with contextual history in a single command. β‘
If you find PT useful, consider supporting its development and please consider giving it a star on GitHub! β:
- atotto/clipboard - Cross-platform clipboard library
- dandavison/delta - Beautiful diff viewer
- gopkg.in/yaml.v3 - YAML parser for Go
- Go community for excellent tooling and documentation
- All contributors and users
π PT: More than a clipboard tool β it's your file version manager with context!
Save, compare, restore, diff, and manage all your file versions effortlessly with meaningful comments. Never lose work again, and always know why changes were made!
# 1. Install PT
go install github.com/cumulus13/pt-go/pt@latest
# 2. Save your first file with a comment β¨ NEW!
echo "Hello PT" | pbcopy
pt notes.txt -m "Initial version"
# 3. Make changes with context β¨ NEW!
echo "Hello PT v2" | pbcopy
pt notes.txt -m "Added version number"
# 4. See your versions with comments β¨ NEW!
pt -l notes.txt
# Shows table with all versions and their comments
# 5. Use check mode to save space β¨ NEW!
echo "Hello PT v2" | pbcopy # Same content
pt notes.txt -c -m "Attempted update"
# βΉοΈ Content identical, no backup created
# 6. Compare versions
pt -d notes.txt --last
# 7. Restore if needed with context β¨ NEW!
pt -r notes.txt --last -m "Rollback for testing"
# 8. Set up your preferences β¨ NEW!
pt config init
pt config show
# Congratulations! You're now a PT expert with version context! ππ₯ Start managing your file versions with meaningful context like a pro today!
