The FileFreak CLI

FileFreak from a terminal, on macOS, Linux and Windows. Copy files both ways, keep a folder on your computer in step with one in FileFreak, and leave it running in the background. On every plan, Free included.

Install it

On macOS or Linux, in a terminal:

curl -fsSL https://filefreak.io/install.sh | sh

It puts ff in ~/.local/bin, and says how to add that folder to your PATH if it is not on it.

On Windows, in PowerShell:

irm https://filefreak.io/install.ps1 | iex

It puts ff in %LOCALAPPDATA%\FileFreak\bin and adds that folder to your PATH.

Either one fetches the newest version for your computer, on Intel or AMD and on Arm, and refuses a build that is not the size and hash FileFreak published for it, which catches a download that went wrong. The builds are not signed yet, so Windows may warn before the CLI runs the first time.

The Windows builds are new, and have not yet been run on a Windows computer of ours. If something is wrong there, tell us.

Sign in

ff login

It shows a code and the address to approve it at, and opens that page in your browser if there is one. Approve it there, signed in, and this computer is signed in as you, with a key of its own. Nothing about your password passes through the terminal. ff whoami says who it is signed in as, and ff logout signs it out.

Each computer signed in this way is listed in Settings, Security, where it can be signed out on its own. Signing out everywhere, or changing your password, signs it out as well.

Signed in like this, it works on every plan, Free included, and nothing it does is counted as API calls. What it stores and downloads counts towards your plan, as it would from the website.

Copy files both ways

ff mkdir -p ff:/Videos
ff cp holiday.mov ff:/Videos/
ff ls -l ff:/Videos
ff cp ff:/Videos/holiday.mov .

The FileFreak side is written ff:/Folder/name, and a folder goes whole with -r. The bytes go straight between your computer and storage, four files at once. An upload that stops, however it stops, carries on when you run the same command again: only what storage does not have is sent.

A large file that replaces one sent the same way sends only the blocks that changed. A download is given its name only once every byte is there, so one that fails leaves nothing behind.

Keep folders in step

ff sync add ~/Documents/filefreak ff:/Documents
ff sync add ~/Pictures ff:/Backups/Pictures --up
ff sync run

ff sync add links a folder on your computer to a folder in FileFreak, and makes either one if it is not there. Changes go both ways, unless --up says only to send (a copy kept for safety) or --down says only to fetch (a library kept on this computer). ff sync run keeps every link in step until you stop it: a change on your computer is noticed as it happens, and FileFreak is asked what has changed every minute.

Nothing is lost on the way. When a file changed on both sides, both are kept, one under a name that says when and where it came from. What sync deletes goes to a trash first, FileFreak's or one inside the folder, and a run that would delete more than a link allows deletes nothing until you say so. A download is put in place only once it is whole and checked.

A link can also be told whether deletes follow, how often to ask, which files to take by name or by path, a ceiling on speed, and how much room to keep free on the disk: ff sync add --help lists them. Asking FileFreak what has changed is not counted against your account, however often a link asks.

In the background

ff service install
ff service status
ff ui

ff service install runs the CLI whenever you sign in to your computer, keeping every link in step, so nothing has to be left open in a terminal. It runs as you and needs no administrator: a LaunchAgent on macOS, a systemd user unit on Linux, and a value in your own Run key on Windows. ff service status says whether it is running and shows the last of its log, and ff service uninstall stops it. Your links stay as they are.

On Linux it starts when you sign in. To have it start when the computer does, turn lingering on for yourself with loginctl enable-linger.

ff ui opens a page in your browser showing what the CLI is doing on this computer: who it is signed in as, whether the service is running, and each link with its last run and what it did lately. It is served to this computer alone, and it only shows: nothing on it changes anything. ff ui --autostart has the service serve it from then on.

Keep it up to date

ff update

It replaces the CLI with the newest version, checked the same way as the install, and starts the service again if it is running, so that it runs the new one. ff update --check only says whether there is a newer one.

Every command

CommandWhat it does
ff loginSign this computer in, with a code you approve on the website.
ff whoamiWho this computer is signed in as.
ff logoutSign this computer out.
ff lsList a folder, or show one file.
ff cpCopy to FileFreak or from it.
ff mvMove or rename a file or folder in FileFreak.
ff rmMove files or folders to the trash, or delete them for good.
ff mkdirMake folders in FileFreak.
ff shareMake a link that opens a file or folder for whoever has it, with a password, an end date or a number of downloads if you want them. Or list links, or remove one.
ff usageWhat the account holds, and has downloaded this month.
ff syncKeep folders on this computer in step with folders in FileFreak: both ways, or one.
ff serviceRun the CLI in the background whenever you sign in to this computer, keeping every link in step.
ff uiA page in your browser showing what the CLI is doing on this computer.
ff updateReplace the CLI with the newest version FileFreak has published.

ff --help lists them too, and ff sync --help, or any other command with --help, says more about one.

For your own programs

In a build or on a server, where nobody is there to sign in, the CLI takes an app's key in FILEFREAK_KEY instead, and its calls count as the app's. Apps, their keys and the developer API are part of Pro, and the TypeScript SDK on npm does the same work from your own code.

The CLI - FileFreak