A powerful and cross-platform command-line tool for copying files to clipboard. It supports copying file contents, file paths, and entire files, working seamlessly across macOS, Windows, and Linux.
- 🔄 Cross-Platform Support: Works on macOS, Windows, and Linux
- 📋 Multiple Copy Modes:
- Copy file contents (text and images)
- Copy file paths
- Copy entire files (system-native file copying)
- 🎯 Native Integration: Uses platform-specific APIs for best compatibility
- 🚀 Easy to Use: Simple command-line interface
- 💪 Robust Error Handling: Clear error messages and helpful suggestions
- Clone the repository:
git clone https://github.com/xin700/copy-copy.git
cd copy-copy- Install dependencies:
pip install -r requirements.txtInstall xclip:
# Ubuntu/Debian
sudo apt-get install xclip
# Fedora
sudo dnf install xclip
# Arch Linux
sudo pacman -S xclippython copy_to_clipboard.py [options] file_path-c, --content: Copy file contents (default mode)- Text files: copies as text
- Image files: copies as image
-p, --path: Copy file path-f, --file: Copy file itself (like system's native file copy)
# Copy file contents (default)
python copy_to_clipboard.py document.txt
# Copy file path
python copy_to_clipboard.py -p document.txt
# Copy the entire file (can be pasted in file manager)
python copy_to_clipboard.py -f document.txtCopy-Copy uses platform-specific mechanisms to ensure native compatibility:
- macOS: Uses AppleScript for file operations and native clipboard handling
- Windows: Utilizes Win32 API through pywin32
- Linux: Implements xclip for clipboard operations
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to all the contributors who have helped with the project
- Inspired by the need for a cross-platform file copying solution
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue if your problem isn't already listed
- Provide as much detail as possible, including your OS and Python version
Made with ❤️ by [ XIN ]