zmail
Local-first email for agents: IMAP sync to maildir + SQLite (FTS5); CLI search, read, thread, who, attachments. Requires Node 20+, global install via npm (`npm install -g @cirne/zmail`; postinstall rebuilds native better-sqlite3), and IMAP credentials. OpenAI API key required for `zmail setup` / wizard, `zmail ask`, and `zmail inbox`—those features can send email-derived text to OpenAI. Optional `who --enrich` may call third-party search APIs. Source: github.com/cirne/zmail.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/cirne/zmailWhat This Skill Does
zmail is an agent-centric email interface designed to move beyond the limitations of traditional web-based mail. By synchronizing IMAP mail into a local maildir-style structure and indexing content with SQLite (FTS5), it transforms your email into a queryable local database. Instead of a standard visual inbox, zmail prioritizes CLI-based searching, threading, and natural-language analysis. It acts as an "agent-first" bridge, allowing AI to treat your email as a persistent repository for communication artifacts like invoices, flight itineraries, and professional correspondence.
Installation
To install zmail, ensure you have Node.js 20+ installed on your system. Run the command npm install -g @cirne/zmail. The package includes a postinstall script that automatically builds the native better-sqlite3 binary. If the tool fails to launch, you may need to run npm rebuild better-sqlite3 using the same Node environment. Once installed, ensure your global npm bin directory is in your PATH. Configuration is handled via zmail setup, which will guide you through connecting your IMAP credentials and setting your OpenAI API key for intelligent querying.
Use Cases
- Automated Research: Have an agent scan your inbox for specific threads regarding "Project X" and summarize the last five email exchanges.
- Invoice Management: Automatically search for and extract metadata from purchase orders or utility bills stored in your email.
- Contextual Awareness: Enable an agent to cross-reference "who" a sender is based on communication history, utilizing enrichment features to provide context on new contacts.
- Quiet Productivity: Use natural language queries to retrieve information without the cognitive overhead of scrolling through a web-based UI.
Example Prompts
- "zmail search --query 'invoice from AWS' --limit 3"
- "zmail ask 'What is the status of the upcoming travel itinerary sent by Delta?'"
- "zmail thread --id 1042 --summary"
Tips & Limitations
- Privacy Considerations: Features like
zmail askandzmail inboxtransmit email content to OpenAI. Ensure you trust the service and are comfortable with the data privacy policy regarding your mail contents. - Data Integrity: Your mail is stored locally in
~/.zmail. Be aware thatzmail setup --clean --yeswill permanently erase this data. Always maintain backups of important communications. - Shell Security: Avoid passing raw, unsanitized text from emails directly into shell command strings to prevent potential command-injection vulnerabilities. Use structured arguments whenever possible.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-cirne-zmail": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-write, file-read, external-api