· FlingDrop Team · Developers · 3 min read
How to Share Files From the Command Line — CLI Guide for Developers
FlingDrop's CLI tool lets you upload files and get shareable temporary links directly from your terminal on Windows, macOS, or Linux. This guide covers installation, configuration, basic usage, and scripting examples.
FlingDrop’s command-line interface (CLI) lets you upload files and retrieve temporary download links directly from your terminal — without opening a browser or using a GUI. It is available for Windows, macOS, and Linux, making it the right tool for developers, sysadmins, and DevOps engineers who work in the terminal. If you prefer programmatic access via the REST API instead of the CLI, see How to Automate File Delivery with the FlingDrop REST API.
Installation
macOS
# Download the macOS binary
curl -L https://app.flingdrop.com/cli/download/macos -o flingdrop
chmod +x flingdrop
sudo mv flingdrop /usr/local/bin/Or install via Homebrew (if tap is configured):
brew install flingdropLinux
curl -L https://app.flingdrop.com/cli/download/linux -o flingdrop
chmod +x flingdrop
sudo mv flingdrop /usr/local/bin/Windows
Download flingdrop.exe from flingdrop.com/download or via PowerShell:
Invoke-WebRequest -Uri "https://app.flingdrop.com/cli/download/windows" -OutFile "flingdrop.exe"Add the directory containing flingdrop.exe to your PATH for global access.
Configuration
Before your first upload, configure your API Key:
flingdrop config set api-key YOUR_API_KEY_HEREYour API Key is available in your FlingDrop dashboard or was emailed to you at registration. The key is stored in ~/.config/flingdrop/config.json (Linux/macOS) or %APPDATA%\flingdrop\config.json (Windows).
Verify your configuration:
flingdrop config showBasic Usage
Upload a file
flingdrop upload report.pdfOutput:
Uploading report.pdf... done
Download link: https://app.flingdrop.com/d/f_abc123xyz
Expires: 2026-04-01 (30 days)
Link copied to clipboard.Upload with custom expiration
flingdrop upload contract.pdf --expires 14Upload and get just the URL (for scripting)
flingdrop upload data-export.csv --quiet
# Outputs only the URL, no progress textList your uploaded files
flingdrop listDelete a file
flingdrop delete f_abc123xyzScripting Examples
Bash: Nightly backup upload
#!/bin/bash
BACKUP_FILE="/var/backups/db-$(date +%Y%m%d).sql.gz"
pg_dump mydb | gzip > "$BACKUP_FILE"
LINK=$(flingdrop upload "$BACKUP_FILE" --expires 7 --quiet)
echo "Backup uploaded: $LINK"
# Send link via email, Slack, or PagerDuty notification
curl -X POST https://hooks.slack.com/services/YOUR/WEBHOOK \
-H 'Content-type: application/json' \
-d "{\"text\": \"Nightly backup ready: $LINK\"}"Python: Upload from a script
import subprocess
def upload_to_flingdrop(file_path, expires_days=7):
result = subprocess.run(
['flingdrop', 'upload', file_path, '--expires', str(expires_days), '--quiet'],
capture_output=True, text=True
)
return result.stdout.strip()
download_url = upload_to_flingdrop('/tmp/report.pdf', expires_days=14)
print(f"Report available at: {download_url}")CI/CD: Share build artifacts
In a GitHub Actions workflow, upload build artifacts and post the link to a PR comment:
- name: Upload build artifact
run: |
LINK=$(flingdrop upload dist/app.zip --expires 3 --quiet)
echo "Build artifact: $LINK" >> $GITHUB_STEP_SUMMARY
env:
FLINGDROP_API_KEY: ${{ secrets.FLINGDROP_API_KEY }}Note: Set FLINGDROP_API_KEY as an environment variable to override the config file in CI environments.
Environment Variable Configuration
For CI/CD and containerized environments where writing to a config file is not practical:
export FLINGDROP_API_KEY=your_api_key_here
flingdrop upload file.zipThe environment variable takes precedence over the config file.
Plan Limits
| Plan | Max file size | Monthly pool |
|---|---|---|
| Business ($29/month) | 10GB | 500GB/month |
The CLI respects the same limits as the web interface and API. Attempting to upload a file larger than your plan allows returns an error with a clear message.
Troubleshooting
command not found: flingdrop: Ensure the binary is in a directory listed in your $PATH. Run echo $PATH to verify.
Authentication failed: Re-run flingdrop config set api-key YOUR_KEY. Verify the key in your FlingDrop dashboard.
File size exceeds plan limit: Upgrade your plan in the FlingDrop dashboard to increase the per-file limit.
Upload stalls on large files: FlingDrop uses multipart uploads for files over 100MB. If your network connection is unstable, the CLI will retry automatically up to 3 times before failing.
Summary
FlingDrop’s CLI provides a fast, scriptable interface for temporary file sharing that integrates naturally into developer workflows — from ad-hoc terminal usage to CI/CD pipelines and scheduled scripts. Install once, configure your API Key, and flingdrop upload becomes the fastest way to share a file from any terminal session.
Related guides: