Get the FREE Ultimate OpenClaw Setup Guide →

termail

npx machina-cli add skill lu-zhengda/macos-toolkit/termail --openclaw
Files (1)
SKILL.md
4.4 KB

termail — Terminal Email Client

Sync and list recent email threads:

!termail sync 2>&1 && termail list --limit 5 2>&1 || echo "termail not installed — brew install lu-zhengda/tap/termail"

Analyze the output above. Summarize unread threads (marked with *), highlight anything that looks urgent or time-sensitive, and offer to read specific threads with termail read <thread-id>, reply, compose, or search. If sync fails with a credentials error, guide the user through termail account add.

Commands — Reading

CommandPurposeExample
termail listList email threadstermail list --limit 20
termail list --label <label>Filter by labeltermail list --label SENT --limit 10
termail list --account <email>List from a specific accounttermail list --account work@gmail.com
termail read <thread-id>Read a full threadtermail read 19c5d4f2ea3c4478
termail search "<query>"Full-text search (FTS5)termail search "quarterly report"
termail search --account <email>Search a specific accounttermail search "invoice" --account work@gmail.com
termail labelsList all labelstermail labels

Commands — Composing

CommandPurposeExample
termail composeSend a new emailtermail compose --to user@example.com --subject "Hi" --body "Hello"
termail reply <message-id>Reply to a messagetermail reply <message-id> --body "Thanks!"
termail reply <message-id> --allReply alltermail reply <message-id> --body "Thanks!" --all
termail forward <message-id>Forward a messagetermail forward <message-id> --to other@example.com

Commands — Organizing

CommandPurposeExample
termail archive <message-id>Archive (remove from Inbox)termail archive <message-id>
termail trash <message-id>Move to trashtermail trash <message-id>
termail star <message-id>Star a messagetermail star <message-id>
termail star <message-id> --removeUnstar a messagetermail star <message-id> --remove
termail mark-read <message-id>Mark as readtermail mark-read <message-id>
termail mark-read <message-id> --unreadMark as unreadtermail mark-read <message-id> --unread
termail label-modify <id>Add/remove labelstermail label-modify <id> --add STARRED --remove INBOX

Commands — Accounts & Sync

CommandPurposeExample
termail account listList configured accountstermail account list
termail account addAdd a Gmail account (opens browser for OAuth)termail account add
termail account remove <email>Remove an accounttermail account remove user@gmail.com
termail syncSync emails for all accountstermail sync
termail sync --account <email>Sync a specific accounttermail sync --account user@gmail.com

Multi-Account

termail supports multiple Gmail accounts. Use --account <email> with list, search, and sync to target a specific account. Without the flag, commands use the default account from config.

Switch accounts in the TUI with @.

Search

Full-text search powered by SQLite FTS5:

termail search "quarterly report"
termail search "from:alice subject:meeting"

Safety Guidelines

  • Confirm before sending: Always verify recipients and content before compose, reply, or forward
  • Archive over trash: Prefer archive to keep emails accessible; use trash only for unwanted mail
  • Sync before reading: Run termail sync to fetch the latest emails before reading or searching
  • OAuth tokens are secure: Tokens are stored in the OS keyring (macOS Keychain), never in plain files

TUI Mode

Launch termail without arguments for an interactive email dashboard with keyboard navigation.

Source

git clone https://github.com/lu-zhengda/macos-toolkit/blob/main/skills/termail/SKILL.mdView on GitHub

Overview

termail is a terminal-based email client that can sync and list recent threads, read messages, compose, reply, forward, and manage Gmail labels. It supports multi-account setups, per-account syncing, and SQLite FTS5-powered search to speed inbox management from the command line.

How This Skill Works

Users run termail commands to interact with Gmail from the terminal. It supports syncing, listing, reading, composing, and organizing across one or more accounts, with per-account targeting via the --account flag. Account addition uses OAuth in a browser via termail account add, and search uses SQLite FTS5 for fast full-text queries.

When to Use It

  • Check your inbox quickly and identify unread or urgent threads.
  • Read a full thread with termail read <thread-id>.
  • Compose a new email or reply/forward an existing one.
  • Search emails for keywords or phrases using termail search.
  • Manage multiple Gmail accounts with sync, list, and account switching.

Quick Start

  1. Step 1: termail account add
  2. Step 2: termail sync
  3. Step 3: termail list --limit 5

Best Practices

  • Always specify the target account with --account when working across multiple accounts.
  • Use termail list --limit <n> to keep results manageable and focused.
  • Leverage termail search with quotes to filter exact phrases (e.g., "quarterly report").
  • Use termail label-modify to add or remove labels and keep Inbox tidy.
  • When adding accounts, complete the OAuth flow with termail account add to avoid credential errors.

Example Use Cases

  • termail sync --account work@gmail.com
  • termail list --limit 5
  • termail read 19c5d4f2ea3c4478
  • termail compose --to team@example.com --subject 'Meeting' --body 'Let's meet Friday'
  • termail search 'invoice' --account work@gmail.com

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers