The examples below are slightly outdated and will be revisited at some point. All commands should still work, but the output might be a little different now. Please refer to the Getting started guide for a more up-to-date version.
This does not really explain the philosophy behind
brig, but gives a good
idea what the tool is able to do and how it’s supposed to be used. Users
git should be able to grok most of the commands intuitively.
Before you can do anything with
brig you need to create a repository.
During this step, also your online identity will be created. So make sure to
use a sane username (
email@example.com) and resource (
As an alternative to entering your password manually, you can use an existing password manager:
2. Adding files¶
Before synchronizing them, you need to stage them. The files will be stored encrypted (and possibly compressed) in blobs on your hard disks.
brig provides implementations of most file related core utils like
cat. Handling of files should thus feel
familiar for users that know the command line.
For daily use and for use with other tools you might prefer a folder that
contains the file you gave to
brig. This can be done via the built-in FUSE
Some built-in commands provided by brig are faster.
brig cp for example only copies metadata, while the real
cp will copy the whole file.
If you wish to always have the mount when
brig is running, you should look
into Making mounts permanent.
In it’s heart,
brig is very similar to
git and also supports versioning
via commits. In contrast to
git however, there are no branches and you
can’t go back in history – you can only bring the history back up front.
Each file (and directory) maintains a history of the operations that were done to this file.
7. Discovery & Remotes¶
In order to sync with your buddies, you need to add their fingerprint as remotes.
How do you get their fingerprint? In the best case by using a separate side channel
like telephone, encrypted email or elsewhise. But
brig can assist finding remotes
brig net locate command.
You should always verify the fingerprint is really the one of your buddy.
brig cannot do this for you.
8. Sync & Diff¶
Once both parties have setup each other as remotes, we can easily view and sync with their data.
brig will only keep the most recent files. All other files will
be marked to deletions after a certain timeframe. This is done via Pins. If
a file is pinned, it won’t get deleted. If you don’t need a file in local
storage, you can also unpin it. On the next access
brig will try to load it
again from a peer that provides it (if possible).