copyDir is a simple command-line tool to copy readable code content from any directory into your clipboard. It supports all common code/text formats and skips binary or ignored folders.
- Supports CLI:
copyDir /your/projectorcopyDir pwd - Automatically copies to clipboard (cross-platform)
- Skips unnecessary folders like
.git,node_modules, etc. - Recognizes 40+ text-based file extensions
copyDir . # Use current directory
copyDir pwd # Same as above
copyDir /my/code # Specific directoryOption 1: Install manually to your PATH
chmod +x copyDir.py
mv copyDir.py ~/bin/copyDirexport PATH="$HOME/bin:$PATH"Then reload your shell:
source ~/.zshrc # or ~/.bashrcNow you can use copyDir from anywhere:
copyDir .python3 install.pyThis will place copyDir in ~/bin and tell you if you need to add it to your PA After that, just run:
copyDir .copyDir . # Copy current file No preview
copyDir . --showContent # Show full content
copyDir . --showContent 20 # Show first 20 lines per file
copyDir pwd --showContent 50 # Show first 50 lines in current folderPython 3
pyperclip → install with:
pip install pyperclipMIT