Set up Gmail with Himalaya
aei does not embed the Gmail OAuth dance. It shells out to Himalaya; Cursor agents should do the same.
Install Himalaya
Follow upstream: https://github.com/pimalaya/himalaya
On Windows, put himalaya on PATH, or set HIMALAYA_BIN to the full path.
Gmail REST (preferred)
Himalaya v2 uses an external OAuth broker (for example ortie) and a bearer token command:
[accounts.gmail]
email = "[email protected]"
display-name = "You"
gmail.auth.token.command = ["ortie", "token", "show", "-a", "gmail"]
Create drafts with Himalaya’s message/write flows (see himalaya message --help). Never auto-send from automation until you deliberately change safety policy.