Zoho Mail CLI modeled after gog.
Project description
zog
zog is a Python CLI for Zoho Mail, designed to feel familiar to anyone who already uses gog for Google services. It keeps the dependency set small, uses argparse, stores credentials under ~/.config/zogcli/, and supports both machine-readable and terminal-friendly output.
Install
pipx install zog-cli
uv tool install zog-cli
For local development:
uv venv
source .venv/bin/activate
uv pip install -e .[dev]
Quickstart
Authorize your mailbox:
zog auth add you@yourdomain.com
Search mail:
zog mail search -a you@yourdomain.com "from:cloudflare" --max 3
List folders:
zog mail folders -a you@yourdomain.com
Dry-run a send:
zog mail send \
-a you@yourdomain.com \
--to friend@example.com \
--subject "zog test" \
--body "hello from zog" \
--dry-run
Importing existing Zoho credentials
If you already have a JSON file with client_id, client_secret, and refresh_token from a previous Zoho Self Client setup, you can import it directly:
zog auth import-legacy /path/to/credentials.json
Command Reference
zog auth add <email> [--services mail]
zog auth list
zog auth remove <email>
zog auth import-legacy <path>
zog mail search -a <email> "<query>" [--max N] [-j|-p]
zog mail get -a <email> <messageId> [-j|-p]
zog mail thread get -a <email> <threadId> [-j|-p]
zog mail send -a <email> --to ... --subject ... --body ...
zog mail folders -a <email> [-j|-p]
zog --version
Global flags follow gog-style conventions:
-a, --account-j, --json-p, --plain-n, --dry-run-v, --verbose-h, --help
Output Modes
- Default: aligned table output for list-style commands.
--json:{"status": "...", "data": ...}envelope.--plain: stable TSV for scripting.
OAuth Setup
zog auth add uses Zoho's Self Client flow. Create or select a Self Client in the Zoho API Console:
Use these scopes:
ZohoMail.messages.ALL,ZohoMail.accounts.READ,ZohoMail.folders.READ
Contributing
- Create a virtual environment with
uv venv. - Install the package in editable mode with
uv pip install -e .[dev]. - Run
pytest -q. - Keep changes small, typed, and focused.
See LICENSE for license terms.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zog_cli-0.2.0.tar.gz.
File metadata
- Download URL: zog_cli-0.2.0.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ca014d77ac389fd7395746b299b96cd0a0937b00c3588b5681b9e2748b67493
|
|
| MD5 |
607d40e434ef70c7b28f0a27b8dc3b3d
|
|
| BLAKE2b-256 |
2d631fee947ac5db220971c9e2ae488632cb88996e63bf228c7e68b4ae6227ea
|
File details
Details for the file zog_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: zog_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9c6550e208391f539d26ed7e706a844d7ae362e2d2421585f153994c41acb30
|
|
| MD5 |
2cb98f3303a3836ad2856595d7980adb
|
|
| BLAKE2b-256 |
6a99f49b3c80b1e8533f18e3f89ae23b3858156dfe50b58b2f36f13d8b352c5e
|