Skip to main content

CLI Commands

Matcha provides several subcommands for non-interactive use. These work without launching the TUI and are ideal for scripts, cron jobs, and AI agent integration.

matcha send

Send an email directly from the command line.

matcha send --to <recipients> --subject <subject> [flags]

Flags

FlagDescription
--toRecipient(s), comma-separated (required)
--subjectEmail subject (required)
--bodyEmail body (Markdown supported). Use "-" to read from stdin
--fromSender account email. Defaults to first configured account
--ccCC recipient(s), comma-separated
--bccBCC recipient(s), comma-separated
--attachAttachment file path. Can be repeated for multiple files
--signatureAppend default signature (default: true). Use --signature=false to disable
--sign-smimeSign with S/MIME. Uses account default if not set
--encrypt-smimeEncrypt with S/MIME
--sign-pgpSign with PGP. Uses account default if not set

Examples

Simple email:

matcha send --to alice@example.com --subject "Meeting tomorrow" --body "Can we meet at 2pm?"

Send from a specific account:

matcha send --from work@company.com --to client@example.com --subject "Invoice" \
--body "Please find the invoice attached." --attach ~/Documents/invoice.pdf

Multiple recipients with CC:

matcha send --to alice@example.com,bob@example.com --cc manager@example.com \
--subject "Project update" --body "The project is on track."

Read body from stdin (useful for piping):

cat ~/notes/report.md | matcha send --to team@example.com --subject "Weekly Report" --body -

Multiple attachments:

matcha send --to alice@example.com --subject "Files" --body "Here are the files." \
--attach report.pdf --attach data.csv

Without signature:

matcha send --to alice@example.com --subject "Quick note" --body "Thanks!" --signature=false

Account Selection

The --from flag matches against both the login email and fetch email of your configured accounts. If omitted, the first configured account is used.

# Use your work account
matcha send --from work@company.com --to someone@example.com --subject "Hi" --body "Hello"

Exit Codes

CodeMeaning
0Email sent successfully
1Error (missing flags, bad config, send failure)

matcha marketplace

Open the interactive plugin marketplace in the terminal. Fetches the plugin registry from GitHub and displays a browsable list of available plugins.

matcha marketplace

Use j/k or arrow keys to navigate, Enter to install a plugin, and q to quit. Installed plugins are marked with an [installed] badge.

You can also access the marketplace from Matcha's main menu, or browse the online marketplace.

matcha install

Install a plugin from a URL or a local file.

matcha install <url_or_file>

Examples

Install from the official plugin repository:

matcha install https://raw.githubusercontent.com/floatpane/matcha/master/plugins/hello.lua

Install from a third-party URL:

matcha install https://raw.githubusercontent.com/someone/repo/main/my_plugin.lua

Install from a local file:

matcha install ~/Downloads/custom_plugin.lua

Plugins are saved to ~/.config/matcha/plugins/ and loaded automatically on next startup. The file must have a .lua extension.

matcha contacts export

Export your contacts cache to JSON or CSV format.

matcha contacts export [flags]

Flags

FlagDescription
-fOutput format: json or csv (default: json)
-oOutput file path. If omitted, prints to stdout
--no-headerOmit CSV header row (CSV format only)
-hShow help

Examples

Export as JSON to stdout:

matcha contacts export

Export as CSV to stdout:

matcha contacts export -f csv

Export to a file:

matcha contacts export -o ~/contacts.json
matcha contacts export -f csv -o ~/contacts.csv

Export CSV without headers:

matcha contacts export -f csv --no-header

If encryption is enabled, you will be prompted for your password before the contacts can be read.

Output Format

JSON exports an array of contact objects with name, email, last_used, and use_count fields.

CSV exports a header row (name,email,last_used,use_count) followed by one row per contact. Use --no-header to omit the header row.

matcha config

Open a configuration file in your $EDITOR (falls back to vi).

matcha config [plugin_name]

Examples

Open the main config file:

matcha config

Opens ~/.config/matcha/config.json.

Open a plugin for configuration:

matcha config ai_rewrite

Opens ~/.config/matcha/plugins/ai_rewrite.lua so you can edit settings like API keys or model names.

matcha update

Check for and install the latest version of Matcha.

matcha update

Automatically detects your installation method (Homebrew, Snap, Flatpak, WinGet, or binary) and updates accordingly.

matcha oauth

Manage OAuth2 authorization for Gmail and Outlook.

matcha oauth auth <email> # Authorize an account (opens browser, auto-detects provider)
matcha oauth auth <email> --provider outlook # Specify provider explicitly
matcha oauth token <email> # Print a fresh access token
matcha oauth revoke <email> # Revoke and delete stored tokens

matcha gmail is kept as an alias for backwards compatibility.

Client credentials are stored per provider:

matcha version

Print the current version.

matcha --version
matcha -v
matcha version