CLI
This article will tell you how you can use the Filemail CLI tool
Installation instructions
Install NodeJS v20 or above (minimum required version)
For Windows and MacOS the installer is here: https://nodejs.org/en/download/
For Linux distros, using built-in package managers, the instructions are here: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
Test upload of a file with the CLI:
filemail upload testFile.txt -u [email protected]
Available commands (run filemail -h to learn more)
Usage: filemail [options] [command]
CLI for sending files to Filemail.com.
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
login [options] <username> Login to Filemail API and get login token.
logout <logintoken> Logout from Filemail API and destroy login token.
upload [options] <files...> Upload files to Filemail.com.
help [command] display help for command
Store password and settings in a json file for safety and convenience
You can create a json config file to store your password and other settings. Thanks to this you won't need to pass them as arguments. An example json file containing username, password and from parameter value settings:
{
"username": "[email protected]",
"password": "myS3cretP4ssword",
"from": "[email protected]"
}
You can then use it with CLI passing it with --config-file
option. For example:
filemail upload testFile.txt --config-file "c:\filemail-config.json"
All supported upload options (run filemail upload --help to learn more)

The application will exit with code 0 if transfer was successful, otherwise it failed and you might want to check parameters and retry.
Example:
This example will send 2 files (file1.txt
and log.log
) and a folder (/myFolder
) to 3 recipients ([email protected]
, [email protected]
and [email protected]
) from the user [email protected]
having set an E2EE key to superPassword
filemail upload --username [email protected] --e2ee-key superPassword --to [email protected] [email protected] [email protected] -- c:\file1.txt c:\log.log c:\myFolder
Last updated
Was this helpful?