CLI tool for uploading and sharing files via datadrop.sh - like a pastebin for files
Project description
Datadrop CLI
A simple command-line tool to upload and share files via datadrop.sh - like a pastebin for files.
Installation
Recommended: pipx (Globally Available CLI)
# Install with pipx
pipx install datadrop-cli-extralsc
# Now use anywhere, anytime - no environment activation needed!
datadrop file.txt
datadrop -a photo1.jpg photo2.jpg
Why pipx?
- ✅
datadropcommand available globally in any directory - ✅ No need to activate virtual environments
- ✅ Works in
.bashrc,.zshrc, scripts, anywhere - ✅ Isolated from system Python (safe)
- ✅ Easy to manage:
pipx uninstall datadrop-cli
Don't have pipx? Install it first:
# Debian/Ubuntu
sudo apt install pipx
pipx ensurepath
# macOS
brew install pipx
pipx ensurepath
# Or with pip
pip install --user pipx
pipx ensurepath
Alternative: pip with --user
# Install to ~/.local/bin (globally available)
pip install --user datadrop-cli-extralsc
# Command is now available globally
datadrop file.txt
From GitHub
# Install latest from GitHub (globally available with pipx)
pipx install git+https://github.com/extralsc/datadrop-cli.git
From source (Development)
# Clone and install in development mode
git clone https://github.com/extralsc/datadrop-cli.git
cd datadrop-cli
pip install -e .
# Or with pipx for global access
pipx install -e .
Usage
The CLI is super simple - just pass what you want to share:
Upload a file
datadrop file.txt
datadrop screenshot.png
datadrop document.pdf
Upload multiple files/folders
datadrop file1.txt file2.txt file3.txt
datadrop file.txt folder/ screenshot.png
datadrop folder1/ folder2/ folder3/
All uploads happen separately and you get a summary with all URLs.
Upload files as an album
datadrop -a file1.txt file2.txt file3.txt
datadrop --album *.jpg
datadrop -a image1.png image2.png document.pdf
Album mode uploads all files together in one album with a file explorer UI. Perfect for sharing multiple related files!
Upload a folder (automatically zips)
datadrop myfolder/
datadrop ./my-project/
The folder will be automatically zipped before uploading.
Create a text paste
# Direct text
datadrop "Hello World"
datadrop "Quick note to share"
# From stdin (pipe)
echo "test content" | datadrop
cat myfile.txt | datadrop
pbpaste | datadrop # macOS clipboard
xclip -o | datadrop # Linux clipboard
Custom filename
datadrop myfile.txt --name "custom-name"
datadrop myfolder/ --name "project-backup"
datadrop "content" --name "my-note.txt"
Examples
# Upload a single file
datadrop screenshot.png
# Upload multiple files at once
datadrop file1.txt file2.txt file3.txt
# Upload files as an album (file explorer UI)
datadrop -a photo1.jpg photo2.jpg photo3.jpg
# Upload text notes as album
datadrop -a "First note" "Second note"
# Mix files and text in album
datadrop -a config.json "Documentation" data.zip
# Upload folders as album (auto-zipped)
datadrop -a src/ dist/
# Mix everything: files, folders, and text
datadrop -a file.txt "Notes" folder/ image.png
# Upload mix of files and folders
datadrop README.md src/ dist/
# Upload an entire project folder (zipped)
datadrop ./my-project
# Quick paste from command output
ls -la | datadrop
# Upload with custom name (single file only)
datadrop report.pdf --name "Q4-Report"
# Share clipboard content (macOS)
pbpaste | datadrop
# Share clipboard content (Linux with xclip)
xclip -o | datadrop
Features
- Album uploads: Upload multiple files as an album with file explorer UI (
-aor--album) - Multiple uploads: Upload multiple files and folders in one command
- Smart detection: Automatically detects files, folders, or text
- Folder zipping: Folders are automatically zipped before upload
- Stdin support: Pipe any content directly to datadrop
- Custom naming: Optional custom names for single uploads
- Colored output: Beautiful terminal feedback
- Simple syntax: Just
datadrop <what-you-want-to-share>
Commands
datadrop <input> [input2...] # Upload file(s)/folder(s) or create paste
datadrop -a <file1> <file2> ... # Upload multiple files as an album
datadrop --album <files...> # Upload multiple files as an album (long form)
datadrop --name "name" # Upload with custom name (single file only)
datadrop --version # Show version
datadrop --help # Show help
How it works
- Album mode (
-aor--album) → Upload all files as one album with file explorer UI - Multiple arguments → Upload each file/folder separately and show summary
- File path exists as file → Upload the file
- File path exists as folder → Zip it and upload
- Single argument, not a path → Create text paste
- No argument but stdin has data → Create text paste from stdin
Album Feature
Albums let you share multiple files together in one shareable link with a file explorer UI.
What you get:
- 📁 File tree explorer in left sidebar
- 👁️ Text file preview (auto-loads and displays)
- ⬇️ Binary file download buttons
- 📊 Album metadata (file count, total size, expiration)
- 🌙 Dark mode support
Usage:
# Upload multiple images as an album
datadrop -a photo1.jpg photo2.jpg photo3.jpg
# Upload text notes as an album
datadrop -a "First note" "Second note" "Third note"
# Mix files and text in album
datadrop -a config.json "Documentation for config" data.zip
# Upload folders as album (auto-zipped)
datadrop -a folder1/ folder2/
# Mix files, folders, and text in album
datadrop -a file.txt "README content" src/ "Notes about src"
Album vs Regular Multiple Upload:
- Album (
-a): All items in ONE link with file explorer UI - Regular: Each item gets its OWN separate link
Requirements:
- Minimum 2 items required for albums
- Supports files, folders (auto-zipped), AND text content
- 10MB total size limit
Backend Integration: Albums send data as multipart/form-data:
- Files:
files[]=@filename.ext - Text:
content[]="text"withnames[]="name" - Mixed: Both files and content in same request
Requirements
- Python >= 3.8
- click >= 8.1.7
- requests >= 2.31.0
Development
# Install dependencies
uv sync
# Run locally
python -m datadrop --help
# Test upload
.venv/bin/datadrop test.txt
API
Datadrop CLI uses the datadrop.sh API:
- Endpoint:
POST https://datadrop.sh/api/pastes - No authentication required
Development
Building the Package
# Install build tools
pip install build
# Build the package
python -m build
Publishing to PyPI
# Install twine
pip install twine
# Upload to PyPI (requires PyPI account and API token)
twine upload dist/*
Running Tests
# Install in development mode
pip install -e .
# Run tests (when added)
pytest
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Project details
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 datadrop_cli_extralsc-0.1.1.tar.gz.
File metadata
- Download URL: datadrop_cli_extralsc-0.1.1.tar.gz
- Upload date:
- Size: 28.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb122b430a8729cf61c17146a02feafc0a52c2740bcaaede7a6be8bf62f0ef6e
|
|
| MD5 |
8d8a4e5d82a80cf3840314612bbdb30e
|
|
| BLAKE2b-256 |
a904c6856923b2fffb468fdbcc211a84e8fd9349deafebf83752337db30016f4
|
File details
Details for the file datadrop_cli_extralsc-0.1.1-py3-none-any.whl.
File metadata
- Download URL: datadrop_cli_extralsc-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd982c95698e931865da302b5e9524ffa36f800a8bfeafcc0f678ee0af42f57a
|
|
| MD5 |
6bb60ad464b853cf5943b0ea213740ec
|
|
| BLAKE2b-256 |
1a7a70a1f14154f1e187f8974883abf05696763428367347c9bb6039d54ac819
|