sharefiles CLI

Upload files to sharefiles.eu from your terminal. Get a 1-hour download link back for each file.

Download

Download the single binary for your platform โ€” no runtime required.

Install

Make the binary executable and move it onto your PATH:

# Linux x86_64
curl -fsSL https://sharefiles.eu/downloads/sharefiles-linux-x64 -o sharefiles
chmod +x sharefiles
sudo mv sharefiles /usr/local/bin/sharefiles

# Linux ARM64
curl -fsSL https://sharefiles.eu/downloads/sharefiles-linux-arm64 -o sharefiles
chmod +x sharefiles
sudo mv sharefiles /usr/local/bin/sharefiles

# macOS (Apple Silicon)
curl -fsSL https://sharefiles.eu/downloads/sharefiles-darwin-arm64 -o sharefiles
chmod +x sharefiles
sudo mv sharefiles /usr/local/bin/sharefiles

Authentication

On first use, the CLI opens a browser so you can log in. Your credentials are saved to ~/.sharefiles/credentials.json.

sharefiles photo.jpg
# โ†’ Opens browser: https://sharefiles.eu/cli-auth?token=...
# โ†’ After you authorize, the upload proceeds automatically

Alternatively, paste an existing API key (useful for CI or restricted directories):

sharefiles --api-key sk_yourkey image.png

Usage

sharefiles [options] <file> [file ...]

Options:
  --dir <name>              Upload to this directory (created if needed)
  --api-key <key>           Use this API key instead of stored credentials
  --set-default-dir <name>  Save a default upload directory
  --logout                  Remove stored credentials
  -h, --help                Show help

Examples

Upload one or more files:

sharefiles report.pdf image.png video.mp4

Upload to a specific directory:

sharefiles --dir my-project build.tar.gz

Set a default directory (used when --dir is omitted):

sharefiles --set-default-dir releases
sharefiles v2.0.tar.gz   # goes to "releases"

Output โ€” one direct link per file, valid for 1 hour:

$ sharefiles screenshot.png
Uploading to directory "uploads"...

  screenshot.png  (142.3 KB)  โ†’  https://sharefiles.eu/direct/abc123xyz

Encryption

If a directory has encryption enabled in your account settings, files uploaded via the CLI are encrypted automatically before storage using hybrid AES-256-GCM + RSA encryption. The 1-hour download link serves the encrypted blob โ€” only your private key can decrypt it.

Revoking Access

To remove CLI credentials from your machine:

sharefiles --logout

To also revoke the API key on the server, go to Settings โ†’ API Keys and delete the sharefiles CLI key.