Tresorit’s simple command-line interface runs on headless Linux workstations or servers. Compared to the graphical Tresorit client, it provides a limited feature set that can be used to automate tasks like sync and reporting in a way that best suits your needs.
📝 Note: Earlier the parent folders in Tresorit were called tresors. While you won't see this wording any more on the user interface, the commands in this documentation will use it. Tresor refers to the parent folders which you will see in the All Files view of your Tresorit account. Directory refers to subfolders which are under your parent folder in your folder structure.
Tresorit Linux executables
The Tresorit installer provides three executables (x86 and x64): tresorit (the GUI), tresorit-cli (the CLI) and tresorit-daemon (the Daemon). The tresorit-daemon runs as a daemon process. Both the GUI and the CLI can start and connect to the Daemon. If you wish, you can start the Daemon manually, or with an init script by executing the tresorit-daemon binary without any arguments.
On start, the Daemon performs autologin if it has been enabled.
When the Daemon is running, it will continue all operations it has been directed to do (synchronizing tresors, serving the Tresorit Drive, etc.) and it can automatically update itself without the need for either GUI or CLI interaction. This means that after configuring the Daemon with either the GUI or the CLI, it is sufficient to just start the Daemon on startup to automatically login and continue all sync and drive operations.
CLI - GUI interoperability
The GUI and the CLI can be used simultaneously and they will execute commands on the same Daemon instance.
If the Daemon is already running when the GUI starts (because it has been started manually or by the CLI), the GUI will connect to it, and when the GUI is closed, it will prompt you whether you want to shut the Daemon down along with it. Otherwise, if the Daemon is not yet running when you start the GUI, the GUI will automatically start it, and when the GUI is closed, it will close the Daemon without prompting you.
Using the CLI
Running the CLI
The tresorit-cli executable can be found in the client's installation path (the default is ~/.local/share/tresorit/). You can run the CLI by either changing to this directory and executing the tresorit-cli:
./tresorit-cli
Or by adding the client's installation path to your PATH environment variable and running the tresorit-cli command. This can be done by adding
export PATH="$HOME/.local/share/tresorit:$PATH"
to your shell's rc (.bashrc, .zshrc, ...)
Startup
You can start the Daemon by executing
which is equivalent to starting the tresorit-daemon manually.
Shutdown
You can stop the Daemon by executing
which is equivalent to sending a TERM signal (kill) to the tresorit-daemon.
Using help
If no subcommand is specified, using the --help option lists all built-in subcommands.
Using the --help option with a subcommand displays a help string about the subcommand and lists its options.
Porcelain
Normally the CLI displays lists and tables nicely formatted and padded with spaces.
If this is not desired, e.g. for scripting purposes, every command has a --porcelain option which generates easily parsable, machine-friendly output, separated by single tabs.
Parent folder (tresor) names and ids
When specifying a parent folder, you can usually use its name. However, multiple parent folders with the same name can exist. In this case, you have to use an unambiguous ID which is available in the tresorit-cli tresors listing (parent folders with the same name will have an ID postfixed in a "Tresor Name (ID)" format.
This is the same format that is used in Tresorit Drive for handling multiple parent folders with the same name, and therefore you can also use the Tresorit Drive to find out which parent folder you want to specify. Using the Tresorit Drive for this purpose has the added benefit of being able to match the folders' name and ID with its contents.
Available commands
Status
With this command you will receive a status report on the Daemon, Tresorit Drive and if there’s an active Tresorit session.
Command syntax
Proxy settings
Use this command to define the proxy settings for your Tresorit client. Depending on your network configuration, you may need to apply custom settings to succesfully login and use Tresorit.
Command syntax
proxy --no-proxy
proxy --use-system-proxy
proxy --type <type> [--host <host>] [--port <port>] [--username <username>] [--password <password>|--password-on-stdin]
Parameters
no-proxy disables proxy
use-system-proxy attempts to use the system proxy set in {https_proxy, all_proxy, http_proxy} environment variables
type type of proxy
Possible types:
None
Http
Socks4
Socks4a
Socks5
Socks5h
host hostname of the proxy
port
username username used for authentication
password password used for authentication
password-on-stdin the command will wait for the password used for authentication on the standard input
Login
With the login command, you can sign in to Tresorit from the command-line client, using your email, password and other authentication options you previously set up in your account.
Command syntax
Parameters
password
password-on-stdin the command will wait for the password on the standard input
sso initiates a Single Sign-On login sso-force initiates a Single Sign-On login enforcing reauthentication with the given email address dont-remember-me If set, does not save login secret, disabling autologin
totp One-time password used for two-factor authentication (only valid for password authentication)
Logout
Sign out of Tresorit with an option to unlink or even wipe synced files from the device you are using at the moment.
Command syntax
Parameters
wipe deletes locally stored login data and synced folder contents
Create parent folder (tresor)
Use this command to create a new parent folder (tresor). The output of this command will contain the name and id of the new parent folder (tresor).
Command syntax
Parameters
Create subfolder (directory)
Use this command to create a new directory in a parent folder (tresor).
Command syntax
Parameters
path the path of the directory to create relative to the parent folder (tresor)
List parent folders (tresors)
When you enter the list tresors command, you will receive a list of your parent folders (tresors) in the cloud with useful information such as their sync status and location on your computer.
Command syntax
Start and stop syncing
With this command, you can start or stop syncing a parent folder (tresor). Tresorit will remember this setting upon restart.
Command syntax
sync --stop <tresor_name|tresor_id>
Parameters
path when starting the sync, use path as the tresor's mount path
stop stop syncing on the parent folder (tresor) with the given tresor_id or tresor_name if unambiguous
Mount or unmount drive
Use this command to enable or disable Tresorit Drive on your computer. Tresorit will remember this setting upon restart.
The following package has to be installed:
-
libfuse2
Debian/Ubuntu/Mint:
- apt-get install libfuse2
Ubuntu 22.04+
- apt-get install libfuse2t64
openSUSE
- zypper in libfuse2
Gentoo:
- emerge sys-fs/fuse
Command syntax
Parameters
unmount unmount Drive
Show sync transfers per parent folder (tresor)
When you enter the transfers command, you will receive a list of a parent folder's (tresor’s) sync status: it will show if it is syncing at the moment and if so, it will include the number of files left and if are there any errors.
Command syntax
Parameters
files if set, shows individual file transfers instead of a summary (tresor name, file path, status progress)
Create file request link
📝 Note: File request related features are not supported in the Linux GUI, but they are enabled via the CLI.
Use this command to create a new file request link. The output of this command will contain the settings of the new file request link.
Command syntax
Parameters
path the destination path (relative to the parent folder(tresor)) of the file request link files if they are accepted
name the name of the file request link
verified if specified, require email verification will be required from the uploader
expiration the number of days the file request link will be active for
Modify file request link
Use this command to modify the settings of an existing file request link. Please note that omitting any parameter will leave the corresponding setting unchanged.
The output of this command will contain the settings of the modified file request link.
Command syntax
Parameters
id the id of the file request link
path the destination path (relative to the parent folder(tresor)) of the file request link files if they are accepted
name the name of the file request link
expiration the number of days the file request link will be active for. 0 means no expiration
Revoke, remove file request link
Use this command to revoke or remove a file request link. Please note that the file request link must be revoked to be able to remove it.
Command syntax
Parameters
id the id of the file request link
List file request links
With this command you will receive a list of file request links. The output of this command will contain the status of the file request links. You can use this command to find the id of the existing file request links.
Command syntax
Parameters
id the id of the file request link
open list only open file request links
pending list only open file request links with pending files
List file request link pending files
With this command you can list the pending files of a file request link. The output of this command will contain the status of the pending files. You can use this command to find the id of the pending file request link files.
Command syntax
Parameters
id the id of the file request link
Accept, discard file request link pending files
You can use this command to accept or discard pending file request link files. The output of this command will contain the names of accepted/discarded files.
Command syntax
Parameters
id the id of the file request link
all accept or discard all pending files
file-id file IDs to be accepted or discarded, expects a comma-separated list of file IDs
Download file request link pending files
You can use this command to download pending file request link files to your file system. The output of this command will contain the names of downloaded files.
Command syntax
Parameters
id the id of the file request link
download-path the path where the files should be downloaded on your file system
all download all pending files
file-id file IDs to be downloaded, expects a comma-separated list of file IDs
Log and metrics settings
Use this command to enable or disable log sending and metrics. If you encounter an issue, our support team may ask you to submit your logs to speed up the investigation.
Command syntax
logging --disable-metrics|--enable-metrics
logging --status
Parameters
enable-logs-sending enables aggregated log sending
disable-metrics disables metrics
enable-metrics enables metrics
status displays current log and metrics settings
File request
Still have questions left? Drop us a line