A simple CLI utility for copying files and directory trees to clipboard for easy sharing with LLMs.
Project description
ScriptMonkey 🐒
ScriptMonkey is a simple CLI utility that helps developers quickly copy files and directory structures to their clipboard in a formatted way. Perfect for sharing code context with LLMs, creating documentation, or getting help with your projects.
Features
- File Copying: Copy one or multiple files to clipboard with clean formatting
- Directory Tree: Generate and copy directory structure to clipboard
- Combined Output: Copy both files and directory tree together
- Smart Filtering: Intelligent directory tree that filters out build artifacts, dependencies, and other non-essential files
- Cross-Platform: Works on Windows, macOS, and Linux
Installation
To install ScriptMonkey, simply run:
pip install scriptmonkey
Usage
Copy Files to Clipboard
Copy one or more files to your clipboard with clean formatting:
scriptmonkey --files path/to/file1.py path/to/file2.js
The files will be copied to your clipboard in this format:
- - - - - - - - - -
Here are some details about the project.
# path/to/file1.py
<content from file1.py>
- - - - - - - - - -
# path/to/file2.js
<content from file2.js>
- - - - - - - - - -
Copy Directory Tree to Clipboard
Generate and copy a clean directory tree structure:
scriptmonkey --tree
This creates an intelligent directory tree that:
- Filters out build artifacts (
node_modules,__pycache__,.git, etc.) - Excludes temporary files (
*.log,*.pyc,.DS_Store, etc.) - Shows important directories as shallow entries (
vendor/,build/ [...]) - Provides special handling for Rust
targetdirectories
Copy Both Files and Tree
Combine file contents with directory structure:
scriptmonkey --files src/main.py src/utils.py --tree
This copies both the specified files and the directory tree to your clipboard, giving you complete context for sharing with LLMs or documentation.
Smart Directory Filtering
ScriptMonkey uses intelligent filtering to show you only the important parts of your project:
Shallow Directories (shown but contents hidden):
node_modules,.git,build,dist__pycache__,.venv,vendortest,tests,assets,img
Excluded Files (completely hidden):
*.log,*.pyc,*.swp,.DS_Store*.class,*.o,*.dll,*.so- Build artifacts and temporary files
Special Handling:
- Rust
target/releasedirectories show filtered contents - Model directories are treated as shallow
- Test directories are marked but not expanded
Use Cases
- LLM Assistance: Quickly share your code context with ChatGPT, Claude, or other AI assistants
- Code Reviews: Copy relevant files for review discussions
- Documentation: Generate clean file listings for documentation
- Project Sharing: Share project structure and key files with teammates
- Debugging Help: Include relevant code and project structure when asking for help
Requirements
- Python 3.6 or later
- Cross-platform clipboard support (automatic)
Examples
Copy a single Python file:
scriptmonkey --files main.py
Copy multiple configuration files:
scriptmonkey --files config.json requirements.txt .env.example
Just the directory tree:
scriptmonkey --tree
Everything together:
scriptmonkey --files src/*.py --tree
Legacy Compatibility
For users upgrading from ScriptMonkey 1.x: The scriptmonkey.run() function is still available but no longer provides error handling functionality. It exists only for backward compatibility and does nothing.
Version 2.0.0 - Simplified for focus and reliability. No more AI dependencies, just pure clipboard utility goodness! 🐒
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scriptmonkey-2.0.3.tar.gz.
File metadata
- Download URL: scriptmonkey-2.0.3.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4fa2d22285248c1703390f383cfb3bed95f35c9acf2a2b669e92aeb1050bef8
|
|
| MD5 |
527aa9828153da382bbbef498de196e1
|
|
| BLAKE2b-256 |
6d67f7e7939949512bbf42c273955e2555fc729b17b3df524aed99f70dcca51f
|
File details
Details for the file scriptmonkey-2.0.3-py3-none-any.whl.
File metadata
- Download URL: scriptmonkey-2.0.3-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2926889756d6792183dfdc7bb5c1d8c26556091bd7ededd355c981ebf1cb396
|
|
| MD5 |
05666600632b11621d69a471fddde3c0
|
|
| BLAKE2b-256 |
314f3dd261fa47d37f399bd56cc5967ecdd6738cbf89c6939db738b3caf495fa
|