fob-mail Setup
fob-mail signs in with a Mail API key and secret, stored on your machine as a profile. One
profile per firm.
1. Create an API key
A firm admin creates the key in Mail: Settings → API keys. Pick a preset and the mailboxes the key may use. Copy the key and the secret: the secret is shown once.
| Preset | Can |
|---|---|
| Read only | List mailboxes, read threads and messages, download attachments |
| Read and label | Also set status, assignee and labels, and create labels |
| Read, label and send | Also reply and send new mail from the client's mailbox |
Pick the smallest preset that does the job. A key for an AI agent that only answers questions should be Read only. See Authentication for how keys work.
2. Add a profile
fob-mail config profiles add acme \
--api-key fob_mail_xxxxxxxxxxxx \
--api-secret yyyyyyyyyyyyyyyy
The first profile you add becomes the current one. add also looks up the firm the key belongs
to, so current can show it. --api-url is optional and defaults to
https://mail.finopsbricks.com.
3. Check it works
fob-mail config profiles current
fob-mail mailboxes list
$ fob-mail config profiles current
Source: profile 'acme'
Profile: acme
Org: Acme Accounting (acme)
Org ID: o1
API URL: https://mail.finopsbricks.com
$ fob-mail mailboxes list
ID NAME ADDRESS STATUS SEND OPEN
-------------------------------------------------------------------------
mb4k2x9q1z7c Acme accounts [email protected] connected yes 2
Output from a stand-in API with sample data, with the API URL shown as it is in production. SEND is yes for mailboxes that can send
(Google mailboxes that aren't disconnected).
Several firms
fob-mail config profiles list # the current profile is marked with *
fob-mail config profiles use acme-labs # switch
fob-mail threads list --profile acme # one command against another profile
fob-mail config profiles refresh --all # re-read each profile's firm from Mail
fob-mail config profiles remove acme-labs
orgs is an alias for config profiles, and whoami for current. Removing a profile only
deletes it from this machine; the key stays valid in Mail until an admin revokes it there.
Where profiles live
| Path | What |
|---|---|
~/.fob/fob-mail/config.yml | Profiles: API URL, key and secret per profile. Mode 0600 |
Set FOB_MAIL_CONFIG_DIR to use another folder. The CLI reads credentials only from this file,
never from environment variables, so a stray variable can't switch the firm you're working in.
Guided setup
fob-mail getting-started
It prints these steps, or says setup is done if a profile exists. It tells agents to ask you for the key and secret rather than make them up.