Skip to content

Start in 15 minutes

This page gets two devices in sync. The first part needs no Google account: two databases sync through a shared folder, which is how you develop and test. The second part switches to Google Drive.

Terminal window
cargo install bothy-cli
# Two local databases ("a" and "b") that sync through a folder.
bothy --db a init --remote path:/tmp/bothy-shared
bothy --db b join --remote path:/tmp/bothy-shared
bothy --db a put notes n1 '{"title": "Hello", "done": false}'
bothy --db a sync
bothy --db b sync
bothy --db b get notes n1 # {"done":false,"title":"Hello"}

Edit the same note on both sides before syncing, one field each, and both edits survive. Edit the same field and the later one wins; the other is kept in the conflict log.

  1. Create the Google Cloud project and download a Desktop app client (guide).

  2. Sign in and create an encrypted database on the first computer:

    Terminal window
    bothy auth setup --client ~/Downloads/client_secret_desktop.json
    bothy auth login # opens the browser
    bothy init --encrypt --remember # asks for a password twice
    bothy put notes n1 '{"title": "From my laptop"}'
    bothy sync
  3. On the second computer, with the same client file:

    Terminal window
    bothy auth setup --client client_secret_desktop.json
    bothy auth login
    bothy join --remember # the same password
    bothy get notes n1
  4. Keep both in sync in the background, with a direct channel while both are online:

    Terminal window
    bothy sync --watch --p2p

Next: how sync works, or a guide for Flutter, Python or robots.