CLI for FastMail via JMAP.
git clone https://github.com/aliou/fastmail-cli
cd fastmail-cli
bun install
bun run startnix run github:aliou/fastmail-cli-
Get an API token from FastMail:
- Go to Settings > Privacy & Security > Integrations > API tokens
- Create a new token with the scopes you need
-
Configure the CLI:
fastmail auth login
# Authentication
fastmail auth login # Store API token
fastmail auth logout # Remove credentials
fastmail auth status # Check auth status
# Email
fastmail email list # List recent emails
fastmail email get <id> # Get email by ID
fastmail email send # Send an email
fastmail email search <query> # Search emails
# Mailboxes
fastmail mailbox list # List mailboxes
fastmail mailbox create <name> # Create mailbox
fastmail mailbox delete <id> # Delete mailbox
# Masked Email
fastmail masked list # List masked addresses
fastmail masked create # Create masked address
fastmail masked delete <id> # Delete masked address# Bash
source <(fastmail --completion bash)
# Zsh
source <(fastmail --completion zsh)
# Fish
fastmail --completion fish | sourceConfig file: ~/.config/fastmail-cli/config.json
# Enter dev shell
nix develop
# Run
bun run start
# Lint
bun run lint
# Format
bun run format
# Type check
bun run typecheckMIT