emailcli for Openclaw

A robust command-line interface for AI agents to perform comprehensive email operations across Gmail and Outlook.

mirai3103
v1.1.1
Apr 5, 2026
0
625
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install emailcli

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install emailcli using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is emailcli?

The emailcli skill provides a streamlined interface for AI agents to interact with email services directly from the command line. Built on the mail-cli utility, it allows users of Openclaw Skills to automate routine communication tasks while maintaining a structured, JSON-based communication layer. This skill is essential for developers building agents that need to monitor inboxes, send reports, or archive conversations without leaving the terminal environment.

By integrating this skill, agents gain the ability to navigate complex folder structures, handle multi-account environments, and process attachments programmatically. Whether it is for customer support automation or personal productivity, this addition to the Openclaw Skills library ensures high-fidelity email interactions.

emailcli Use Cases

  • Automating the process of checking and summarizing unread inbox messages.
  • Programmatically sending emails with file attachments for CI/CD reports or data exports.
  • Performing batch cleanup of spam or old notifications using specific search queries.
  • Synchronizing email drafts between AI-generated content and human review steps.
  • Moving high-priority messages into specific folders for better project organization.

How emailcli Works

  1. The AI agent issues a command using the mail-cli syntax to list or search for emails.
  2. The system retrieves the requested data and returns it in a structured JSON format for easy parsing.
  3. Based on the JSON response, the agent identifies specific message IDs or thread identifiers to perform follow-up actions.
  4. Commands like send, reply, or move are executed with precise flags to ensure data integrity and security.
  5. The skill provides detailed error codes and success confirmations to the agent to manage the workflow lifecycle.

emailcli Setup

To start using this skill within the Openclaw Skills ecosystem, follow these installation steps:

# Install the emailcli globally
npm install -g @laffy1309/emailcli

# Connect your first account (Gmail or Outlook)
mail-cli account add --provider gmail

# Verify your account status
mail-cli account list

emailcli Data Schema & Taxonomy

The emailcli skill utilizes a strict JSON schema to ensure reliable communication between the agent and the email provider. Below is a breakdown of the typical data structure:

Attribute Type Description
id String Unique identifier for the email message or thread.
from String The sender's email address.
subject String The subject line of the email.
ok Boolean Success indicator for write or delete operations.
failed Array A list of message IDs that failed during batch operations.
error Object Contains a standardized error code and descriptive message.

emailcli Advanced Features

  • Batch processing support to mark, move, or delete multiple emails using a single comma-separated ID string.
  • Integrated attachment management allowing for direct downloads to specific local directories.
  • Native support for advanced search syntax, including Gmail search queries and Outlook KQL.
  • Local draft persistence, enabling agents to save progress and users to finalize messages manually.
  • Seamless multi-account switching using the account email:provider naming convention.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*