keybase : Tools to Work with the 'Keybase' 'API'

'Keybase' (https://keybase.io) is a directory of people and public keys and provides methods for obtaining public keys, validating users and exchanging files and/or messages in a secure fashion. Tools are provided to search for and retrieve information about 'Keybase' users, retrieve and import user public keys and list and/or download files.

There's also a thin but useful R wrapper around many of they keybase command-line utility functions.

The following functions are implemented:

General:

Crypto

Filesystem:

Utility:

Diagnostics:

Installation

devtools::install_github("ropenscilabs/keybase")
options(width=120)

Usage

library(keybase)
library(tidyverse)

# current verison
packageVersion("keybase")

kb_ping()

kb_discover(twitter=c("hrbrmstr", "_inundata", "briandconnelly"), github="bearloga")

kb_discover(twitter=c("sckottie", "_inundata", "briandconnelly"), kb_usernames_only=TRUE)

kb_lookup("karthik")

kb_list_files("marcopolo")

kb_list_files("marcopolo", pattern="\\.txt")

Safe(r) data sharing

kb_list_files("hrbrmstr", "data")

kb_file_exists("hrbrmstr", "index.md")

kb_file_exists("https://hrbrmstr.keybase.pub/data/Rlogo.pngd")

kb_raw_url("hrbrmstr", "data/Rlogo.png")

kb_file_exists("hrbrmstr", "data/Rlogo.png")

kb_file_exists(kb_raw_url("hrbrmstr", "data/Rlogo.png"))

kb_read_file("hrbrmstr", "data/mtcars.csv")

kb_read_file("hrbrmstr", "data/mtcars.json")

# need (for now) to use the "raw" URL for things `rio::import()` can't natively read

kb_list_files("hrbrmstr", "data", pattern = ".*.png") %>% 
  select(raw_url)

magick::image_read("https://hrbrmstr.keybase.pub/data/Rlogo.png")

Test Results

library(keybase)
library(testthat)

date()

test_dir("tests/")


ropenscilabs/keybase documentation built on May 11, 2022, 9:10 a.m.