Share files with a single command
Project description
fileup - Share files with a single command
fileup is your go-to Python package for hassle-free uploading and sharing of files right from your command-line interface.
You can set a time limit after which the file will be automatically removed, ensuring the security of your data.
[!TIP] Just call
fu myfile.txtto upload it and get the URL in your clipboard!
Table of Contents
Features
- :outbox_tray: Upload via FTP or SCP (using SSH config)
- :clipboard: Upload directly from clipboard (
--clipboard) - :alarm_clock: Automatic file expiration and cleanup
- :link: Smart URLs: Jupyter notebooks -> nbviewer, image markdown, direct links
- :clipboard: Automatic URL copy to clipboard (macOS)
- :zap: Simple config using
~/.config/fileup/config.ini - :closed_lock_with_key: Supports SSH keys and password authentication
- :feather: Zero dependencies - uses Python standard library
- :scroll: Works as a single script or installed package
- :snake: Supports Python >=3.10
Why fileup?
I frequently need to share files quickly with colleagues or friends. Whether it's a screenshot, a code snippet, or a Jupyter notebook, I wanted a tool that:
- Works from the command line with minimal typing
- Automatically copies the URL to my clipboard
- Supports automatic expiration for temporary files
- Requires no external dependencies
fileup was born out of this need - a simple, focused tool that does one thing well.
Installation
To install fileup, simply run the following command:
pip install -U fileup
or use uv or pipx:
uv tool install fileup
pipx install fileup
Configuration
Before you can start sharing your files, you'll need to create a configuration file at ~/.config/fileup/config.ini with the following structure:
# ~/.config/fileup/config.ini
[default]
protocol = ftp # or scp
hostname = example.com # or the Host from your ~/.ssh/config
base_folder = /path/to/files # where files are stored on the server
file_up_folder = # subdirectory in URL, can be empty
url = files.example.com # the actual URL where files are accessible
[ftp]
username = my_user_name
password = my_difficult_password
[scp]
# If empty, will use your SSH config
username =
# If using SSH config, no need for these
private_key =
password =
FTP Configuration
For FTP uploads, you need to provide both username and password in the [ftp] section.
SCP Configuration
For SCP uploads, you have two options:
- Use your SSH config by setting
protocol = scpand using a hostname from your~/.ssh/config - Explicitly configure SCP by providing
usernameand optionallyprivate_keyin the[scp]section
Usage
For a list of available commands, type fu -h.
In a nutshell, you can use fileup by running:
fu [filename]
The command supports several options:
-t DAYS,--time DAYS: Set an expiration time in days (default: 90, use 0 for no expiration)-d,--direct: Return a direct URL without any prefixes-i,--img: Return the URL formatted for markdown image embedding-c,--clipboard: Upload image/text currently in your clipboard (image preferred)
Examples:
# Regular file upload
fu image.png
# Upload from clipboard with an auto-generated name
fu --clipboard
# Upload from clipboard with an explicit remote filename
fu --clipboard screenshot.png
This is the output of fu -h:
usage: fu [-h] [-t TIME] [-d] [-i] [-c] [filename]
Publish a file.
Create a config file at ~/.config/fileup/config.ini with the following structure:
[default]
protocol = ftp # or scp
hostname = example.com # or the Host from your ~/.ssh/config
base_folder = /path/to/files # where files are stored on the server
file_up_folder = # subdirectory in URL, can be empty
url = files.example.com # the actual URL where files are accessible
[ftp]
username = my_user_name
password = my_difficult_password
[scp]
# If empty, will use your SSH config
username =
# If using SSH config, no need for these
private_key =
password =
positional arguments:
filename Local filename. With --clipboard this is an optional remote filename.
options:
-h, --help show this help message and exit
-t, --time TIME If time is 0 the file will never be deleted, default is 90 days.
-d, --direct
-i, --img
-c, --clipboard Upload clipboard content (image preferred, then text).
Special Features
- Jupyter Notebooks: If you're uploading a Jupyter notebook (
.ipynb), the returned URL will be accessible via nbviewer.jupyter.org - Automatic Deletion: Files with expiration times are automatically removed when their time is up
- Clipboard Upload: Upload clipboard image/text with
fu --clipboard - URL Copying: On macOS, the URL is automatically copied to your clipboard
macOS Integration
fileup uses pbcopy so the uploaded URL is automatically copied on macOS.
For clipboard uploads, it will try common commands in order:
- image:
pngpaste,wl-paste,xclip - text:
pbpaste,wl-paste,xclip,xsel,powershell
Limitations
- Automatic URL-to-clipboard copy currently uses macOS
pbcopy - Clipboard image uploads need a compatible command (e.g.
pngpasteon macOS) - FTP passwords are stored in plain text; use with caution
- SCP implementation requires the
sshandscpcommands to be available
Support
We appreciate your feedback and contributions! If you encounter any issues or have suggestions for improvements, please file an issue on the GitHub repository. We also welcome pull requests for bug fixes or new features.
Happy sharing! :rocket:
Give fileup a try today and experience the convenience of effortless file sharing right from your command-line!
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 fileup-2.1.0.tar.gz.
File metadata
- Download URL: fileup-2.1.0.tar.gz
- Upload date:
- Size: 49.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ff98a33b0ad9761060f32ad8adccaf2d73cfe1a9b384e9056ae89c4d91f5cc2
|
|
| MD5 |
ccf60ae248751970ae3b12213b782e94
|
|
| BLAKE2b-256 |
1cdf82f3668859682c2b5932d832f7934c945227feef4c7239a635ab07d64a03
|
Provenance
The following attestation bundles were made for fileup-2.1.0.tar.gz:
Publisher:
release.yml on basnijholt/fileup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fileup-2.1.0.tar.gz -
Subject digest:
6ff98a33b0ad9761060f32ad8adccaf2d73cfe1a9b384e9056ae89c4d91f5cc2 - Sigstore transparency entry: 950385394
- Sigstore integration time:
-
Permalink:
basnijholt/fileup@2710a4edc75bec6818b231b59c0b5042fd3cb10c -
Branch / Tag:
refs/tags/v2.1.0 - Owner: https://github.com/basnijholt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2710a4edc75bec6818b231b59c0b5042fd3cb10c -
Trigger Event:
release
-
Statement type:
File details
Details for the file fileup-2.1.0-py3-none-any.whl.
File metadata
- Download URL: fileup-2.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0f2960efe0b1c522fe8fee861bc649ca38a171a8f408f9e924aab19f4929431
|
|
| MD5 |
cd9f83719cdec772e6adad7f6272d2c4
|
|
| BLAKE2b-256 |
baaef84bc7b1876bd79080b5d7f3eb7d84212cd90c5fdc7d098891bf1b48d1b9
|
Provenance
The following attestation bundles were made for fileup-2.1.0-py3-none-any.whl:
Publisher:
release.yml on basnijholt/fileup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fileup-2.1.0-py3-none-any.whl -
Subject digest:
a0f2960efe0b1c522fe8fee861bc649ca38a171a8f408f9e924aab19f4929431 - Sigstore transparency entry: 950385450
- Sigstore integration time:
-
Permalink:
basnijholt/fileup@2710a4edc75bec6818b231b59c0b5042fd3cb10c -
Branch / Tag:
refs/tags/v2.1.0 - Owner: https://github.com/basnijholt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2710a4edc75bec6818b231b59c0b5042fd3cb10c -
Trigger Event:
release
-
Statement type: