Skip to content

Auth

Only rb login, rb sync and rb logout use an account. They talk to rabbitbrain.ai unless you name another hub with --hub <address> or RB_HUB_URL. Anyone can make an account at rabbitbrain.ai/signin.

Before you log in, rb sync sends nothing:

Terminal window
$ rb sync
rb sync: No credential for rabbitbrain.ai on this machine.
→ Run rb login once per machine, or set RB_HUB_TOKEN for CI.

rb login signs this machine in:

  1. The terminal shows a code:

    Terminal window
    $ rb login
    First, this terminal gets a code:
    NN6T-D43Q
    Open https://rabbitbrain.ai/link?code=NN6T-D43Q on any device; it signs you in first if needed, and approve the code.
  2. The person approves it at the hub’s /link page, on any device. The credential is theirs, whoever started rb login.

  3. rb stores the token in ~/.config/rabbit-brain/credentials.json with mode 0600, or under $RB_CONFIG_DIR.

For CI, RB_HUB_TOKEN overrides the file. rb logout revokes the credential on the hub and removes it from this machine. With nothing stored:

Terminal window
$ rb logout
Nothing stored for <https://rabbitbrain.ai>; nothing to do.

rb sync uploads the record’s page as a private copy in your account. rb sync --with-record also sends the record, including who made each write and the words the user gave. rb sync --watch syncs again after changes, at most once a minute, until Ctrl-C.

A hub’s refusal comes back as E_HUB_REFUSED, with its reason, and a hub rb cannot reach as E_HUB_UNREACHABLE. Either way, nothing on this machine changes.

An agent may run rb login for the user, who approves the code in their own browser. An agent must not:

  • read the credentials file
  • print or copy a token, or put one in chat, logs, commits or files
  • set or unset RB_HUB_TOKEN or RB_ACTOR
  • run rb sync --with-record unless the user asks to send the record

Rabbit Brainrabbitbrain.ai · GitHub · PyPI · Privacy · Apache-2.0