Connects to an existing SamFileTransfer pool from a server (VPS, CI, cron job) to upload, list, and download files — no browser needed. An uploaded file shows up in the pool's file list right away; anyone in the pool can grab it with the normal "download" button.
SamFileTransfer itself is a free file transfer service for sending large files without an account, a size cap, or an upload wait — open a pool, share the link, and the file goes straight from one side to the other. This CLI is for the one case a browser can't cover: a server that needs to send or receive a file as part of a script, a deploy, or a scheduled job, using that same pool instead of a separate large file transfer tool.
This tool doesn't create a pool, it only joins one that already exists.
- Create a pool at samfiletransfer.com/create.
- On the pool page, open the "Upload from terminal"
box — it has a ready-made
connectcommand, just copy and run it. That key only shows up in the browser session that opened the pool; if you lose it, the same box has a "Generate new key" button (the old one stops working immediately).
npm install -g samfiletransfer
# or without installing:
npx samfiletransfer connect <poolKey>connect runs first and saves the pool locally, so you never re-enter poolKey:
samfiletransfer connect kR3pQ9x2vLZmN8wYtBc1FhAeSuVoDgXiJrKplWnE-4Cs7bMdT0yfHqz6RaG
samfiletransfer connect kR3pQ9x2vLZmN8wYtBc1FhAeSuVoDgXiJrKplWnE-4Cs7bMdT0yfHqz6RaG "VPS"
samfiletransfer list
samfiletransfer upload /data/report.zip
samfiletransfer download report.zip /data/downloads/
samfiletransfer download # no id = everything, no dest = current directory
samfiletransfer downloadall
samfiletransfer exit| Command | Description |
|---|---|
connect <poolKey> [name] |
Joins the pool and saves it locally |
list |
Lists files shared in the pool: id, size, name, owner |
upload <file> |
Shares the file with the pool; stays running until someone downloads it (Ctrl+C to stop) |
download [name-or-id] [dest] |
Downloads by name or id from list's output; no id downloads everything, no dest saves to the current folder |
downloadall [dest] |
Downloads every file that isn't yours into dest (default: current folder), one at a time |
exit |
Forgets the saved pool |
list/download/downloadall need connect to have run first — otherwise you'll see
a "not connected" message. Files don't show up the instant you join; everyone in the
pool announces what they have, so give it a few seconds before it prints anything.
It's more than just an address for the pool — the pool page
checks it fresh every time you connect (pool still open, password still right, key not
swapped for a new one). Anyone holding a valid poolKey can upload to and download
from that pool, so if it leaks, use "Generate new key" there to shut it off instantly.
- No chat. Downloads happen one file at a time, not several at once.
- Files sent from the CLI don't count against anyone's account limit.
- Some restrictive networks may fail to connect — a server usually has a public address, so this is rare in practice.
See LICENSE. You can install and run this freely to connect to a
SamFileTransfer pool; redistributing or reselling it anywhere other than the official
npm package isn't permitted.