Proton

Bridge CLI (command line interface) guide

Reading
5 mins
Category
Using Bridge

In this article, we list all the commands you can enter in the Bridge command line tool, along with a brief description of what each command does.

All commands

       change         Change server or account settings (aliases: ch, switch). (More below.)

       check          Check Internet connection or for Bridge updates. (More below.)

       credits        Print used resources.

       delete         Remove the account from keychain. You can use index or account name as the parameter. (aliases: del, rm, remove).

       exit           Exit the program

       help           Display help. (It will display this list of commands.)

       clear          Remove stored accounts and preferences (alias: cl). (More below.)

       info           Print account configuration. You can use index or account name as the parameter. (alias: i)

       list           Print list of your accounts (aliases: l, ls).

       log-dir        Print path to directory with logs (aliases: log, logs).

       login          Calls up the login procedure to add or connect accounts. Optionally, you can use index or account as the parameter (aliases: a, add, con, connect).

       logout         Disconnect that account. You can use index or account name as the parameter (aliases: d, disconnect).

       manual         Print URL with instructions (alias: man).

       release-notes  Print release notes with details about new features and updates (aliases: notes, fixed-bugs, bugs, ver, version).

       restart        Restart the IMAP/SMTP server.

Subcommands for `check`

Check internet connection or new version.

     Commands:

       internet  Check Internet connection. (aliases: i, conn, connection)

       updates   Check for Bridge updates. (aliases: u, v, version)

Subcommands for `change`

    Change server or account settings (aliases: ch, switch)

     Commands:

       mode  Switch between combined addresses and split addresses mode for account. Use index or account name as parameter (alias: m).

       port  Change port numbers of IMAP and SMTP servers (alias: p).

       proxy              Allow or disallow the Bridge client to securely connect to Proton via a third party when it is being blocked.

       smtp-security      Change port numbers of IMAP and SMTP servers (alias: ssl, starttls).

Subcommands for `clear`

Remove stored accounts and preferences. (alias: cl)

     Commands:

     cache     Remove stored preferences for accounts (aliases: c, prefs, preferences).

     keychain  Remove all accounts from keychain (aliases: k, accounts).

CLI configuration instructions

 Command line interface: 

Start the Bridge command line interface from your terminal (to show all commands type `help` )

     $ Desktop-Bridge --cli

     Welcome to Proton Mail Bridge interactive shell

      >>> list

     No active accounts. Please add account to continue

 Add account: 

To add your Proton Mail accounts(s) to the client, enter the `login` command and type in your `Username` and `Password` as well as your `Two factor code` (if enabled) and `Mailbox password` (if enabled).

      >>> login

     Username: benjerry

     Password:

     Authenticating …

     Adding account …

     Account benjerry successfully added

     >>> list

     # : account          (status, address mode)

     0 : benjerry         (connected, combined)

 IMAP/SMTP configuration:

After you log in, your account will be connected to the Bridge client. Bridge uses Combined Address Mode by default, which means emails from all the addresses in your account will be sorted into the same Mailbox folders in your email client. In other words, received messages will go to your Inbox and sent messages will be in “Sent,” regardless of what email address is used. If you type `info`, you will access the Bridge credentials for your mailbox. The `info` command is index or account name and tab-completion is supported.

      >>> list

     # : account          (status, address mode)

     0 : benjerry         (connected, combined)

      >>> info 0

     Configuration for benjerry@proton.me

     IMAP Settings

     Address: 127.0.0.1

     IMAP port: 1143

     Username: benjerry@proton.me

     Password: Xd4uRbsHYYxTElUMSsaVLg

     SMTP Settings

     Address: 127.0.0.1

     IMAP port: 1025

     Username: benjerry@proton.me

     Password: Xd4uRbsHYYxTElUMSsaVLg

Switching address mode: 

If you would like to switch to Split Address Mode, in which emails associated with each of your addresses are kept separate, use the command `change mode` followed by index or account name. In Split Addresses Mode, the `info` command prints the Bridge credentials for each of your addresses.

      >>> change mode 0

     Are you sure you want to change the mode for account benjerry to split mode? yes/No: yes

     Address mode for account benjerry changed to split mode

      >>> list

     # : account          (status, address mode)

     0 : benjerry         (connected, split)

     >>> info 0

     Configuration for benjerry@proton.me

     IMAP Settings

     Address: 127.0.0.1

     IMAP port: 1143

     Username: benjerry@proton.me

     Password: Xd4uRbsHYYxTElUMSsaVLg

     SMTP Settings

     Address: 127.0.0.1

     IMAP port: 1025

     Username: benjerry@proton.me

     Password: Xd4uRbsHYYxTElUMSsaVLg

     Configuration for eyescream@proton.me

     IMAP Settings

     Address: 127.0.0.1

     IMAP port: 1143

     Username: eyescream@proton.me

     Password: Xd4uRbsHYYxTElUMSsaVLg

     SMTP Settings

     Address: 127.0.0.1

     IMAP port: 1025

     Username: eyescream@proton.me

     Password: Xd4uRbsHYYxTElUMSsaVLg

Log out:

You can use the `logout` command, followed by index or name of account to disable the client from sending / receiving new emails. Your existing emails will still be stored in your client. If you are logged out, which can also happen if you change your password, you can use `login` command to connect your account again. To completely remove your account from Bridge use `delete` command.

      >>> logout benjerry

     Are you sure you want to logout account benjerry? yes/No: y

     >>> delete benjerry

     Are you sure you want to remove account benjerry? yes/No: y

     Do you want to remove cache for this account? yes/No: y

Didn’t find what you were looking for?

General contactcontact@proton.me
Media contactmedia@proton.me
Legal contactlegal@proton.me
Partnerships contactpartners@proton.me