Skip to content

bm client introduction

Joshua Thijssen edited this page Jan 9, 2021 · 2 revisions

bm-client is the current go-to client for managing your BitMaelum account and mails. It's a command-line interface (CLI) system. It allows you to easily create accounts, read email and do all kind of maintenance.

Vault

The vault is an encrypted store where your accounts are stored. The vault is encrypted and protected by your password.

Messages

Currently, bm-client does not store any messages locally (it should though). This means that currently all messages are downloaded from the server on each attempt to read them.

Commands

There are a lot of commands that bm-client can run.

 account      Account management
 api          Manage API keys
 auth         Authorization management
 config       Config management
 help         Help about any command
 message      Message management
 organisation Organisation management
 otp          Generate a OTP to authenticate to a server
 vault        Vault management
 webhook      Webhook management

Most commands have sub-commands which can be found by entering the command:

 $ bm-client account
 Account management

 Usage:
   bm-client account [command]

 Available Commands:
   create      Creates a new account
   key         Account key management
   list        List accounts
   settings    Settings management

 Flags:
   -h, --help   help for account

 Global Flags:
   -c, --config string     configuration file
   -p, --password string   password to unlock your account vault
       --vault string      custom vault file

 Use "bm-client account [command] --help" for more information about a command.

There are a few options that are always available:

--config or -c, which points to a configuration file. If none is given, it will search for the configuration on different paths. --password or -p, to give the password to unlock the vault. If none is given, the bm-client will ask for a password. --vault to override your vault file as found in the config.

Account

The account allows you to easily display and manage your accounts.

create      Creates a new account
key         Account key management
list        List accounts
settings    Settings management

Account create

Account create will create a new account for you. In order to create a new account, you need to have an invitation token from a mail-server.

$ bm-client account create --account example! --name "John doe" --token "....."

Account list

Account list will display all accounts found in the vault, or displays info of a single account when run with the --account option.

Account settings

THe settings subcommand allows you to manage settings that are stored with accounts. Note that settings are experimental and might be removed in the future. They serve no purpose at the moment.

Account key

Account key management allows you to manage the private keys of your accounts. When generating an account, it will automatically generate a private key for you. If this key gets compromised, or you just want to update the security of your keys, you can generate a new key. THe old key will always be present in your vault, as this key is needed to decrypt older messages.

Account key list

List all the keys in your account

Account key generate

Generate a new key in your account. You can use the --key option to decide which kind of key you want to generate. Use the --advertise option to automatically upload your new public key to resolver so people can mail you directly with your new key.

Account key advertise

Advertise a new (or old) key to the resolver. This will allow users to discover your public key to send mail to you.

Api

Api keys allow you to run functionality on behalf of an account. For instance, you can fetch headers (but not bodies), or send email based on an API key. API keys can be revoked at any time, or have an expiry time.

(NOTE: we should not be able to send mail with just an API key. Use AUTH keys for this)

Auth

Auth keys are a bit similar to API key, except they can be used to send email on behalf of you. Instead of sharing you private key to others (or tooling), you can use an auth key. These are secure mechanisms to let others send email on behalf of you. The maintainer of the auth keys (the server) cannot create these keys themselves.

Config

The config subcommand allows you to initialize a new config file, display it, or even edit it.

Message

Message management allows you to read or send messages.

Message compose

Message compose allows you to send a message to another user. It allows you to send emails with different blocks (message contents), and even attachments.

Message list

Message lists will display a list of all messages for all accounts in your vault. YOu can use the --since option to filter out messages on a certain date.

Message read

Reading messages can be done with message read. It will read all messages from the account, which you can scroll through and even download attachments.

OTP

THe one-time-password is a single signon system that will automatically authenticate you to a remote server. It's highly experimental.

vault

Vault init

Creates a new and empty vault file.

Vault password

Changes the password of the vault.

Vault export

Exports an account from the vault into an encrypted container.

Vault import

Imports an account from an encrypted container into the vault.

Clone this wiki locally