PT Documentation

PT Logo

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 (like git status)

  • pt commit -m "message" - Backup all changed files (like git commit)

  • pt -l <file> - View commit history

  • pt -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.

Indices and Tables