Skip to content

Instantly share code, notes, and snippets.

@maxtaco
Last active May 5, 2023 16:47
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save maxtaco/4c36bfb3f7ec101c70c756db248a5564 to your computer and use it in GitHub Desktop.
Save maxtaco/4c36bfb3f7ec101c70c756db248a5564 to your computer and use it in GitHub Desktop.
New bot signup flow

Get a Bot Token

As your keybase user run:

$ keybase bot token create > /tmp/bot-token

You'll get back a base64 token, like: 6C37sjCBgMNf06Z6oTgixIxHJpja8G-Qp. This is your bot token that allows you to sign up bots.

Signup the Bot

You can signup for your bot in a new "bot home dir" using your bot token, and by specifying the username of the bot. Here we use standalone mode which means the service and the client run in the same process, and then both exit at the same time. It won't actually write any credentials to that directory, but we give it a non-standard home directory in this example so we don't pick up your real user.

$ keybase --standalone --home=/tmp/bot bot signup -u bot_Ej338s01384 -t $(cat /tmp/bot-token) > paper-key

This will output a paper key to standard output. Note this bot has one keypair that's a paper key, and no standard device keys.

Startup the Bot

Next, start the service, logged in as the bot on startup:

$ keybase --home=/tmp/bot service --oneshot-username bot_Ej338s01384 < paper-key

Caveats

Only 5 bot signups per user are currently allowed, but we can consider relaxing that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment