문서로 건너뛰기
CLI

직접 작성한 명령

사람을 위해 작성한 명령과 모든 인수, 플래그, 예시.

명령

여기 있는 모든 명령은 --json, --profile, --dry-run 같은 전역 플래그도 받습니다. 전역 플래그 보기

openemail login

Sign in with your browser, or save an API key

로그인 불필요

사용법

openemail login
openemail login --no-browser
openemail login --scopes <list>
openemail login --with-token < key.txt
openemail login --token <key>
openemail login --profile <name>

With no flags in an interactive terminal it asks how you want to sign in. The browser sign-in opens the OpenEmail approval page, where you pick the workspace, the access and how long it lasts, then brings the approval back to the terminal on its own. Over SSH, or with --no-browser, it prints the link and you paste back the code the browser shows. A browser sign-in asks for a verification code before sensitive changes, exactly like the web app. An API key never asks for a code, which makes it the choice for scripts and servers. The sign-in is saved in ~/.openemail/config.json as a profile, and becomes the active profile only when no other profile is active, so --profile <name> adds a second sign-in without changing what other commands use.

플래그

--token <key>

Save this API key (oe_live_ or oe_test_). It lands in your shell history, so prefer --with-token

--with-token

Read an API key from stdin and save it

--no-browser

Print the sign-in link and paste the code back instead of opening a browser. Chosen for you over SSH

--scopes <list>반복 가능

Permissions to preselect on the approval page, comma separated. You can still change them there

--force

Replace the sign-in already saved on this profile without asking

예시

Asks how to sign in, then opens your browser
openemail login
Over SSH: open the link anywhere and paste the code back
openemail login --no-browser
Preselects these permissions on the approval page
openemail login --scopes emails:send,threads:read
Saves an API key without it touching your shell history
openemail login --with-token < ~/.config/openemail/key
Signs a second profile in. The active profile stays as it is, so pass `--profile work` or run `openemail profile use work`
openemail login --profile work

openemail whoami

Show who you are signed in as, and what you may do

로그인 필요

사용법

openemail whoami
openemail whoami --json
openemail whoami --profile <name>

Reads the credential the next command would use, a saved profile, OPENEMAIL_API_KEY or --api-key, and asks the API what it may do: the workspace, the mode, the scopes, any address or domain restriction, and when a browser sign-in expires.

예시

openemail whoami
Every field, for scripts
openemail whoami --json
Checks another saved profile
openemail whoami --profile work
Checks a key without saving it
OPENEMAIL_API_KEY=oe_test_... openemail whoami

openemail status

Show your sign-in, sender addresses and domains

로그인 필요

사용법

openemail status
openemail status --json

Everything whoami shows, plus the addresses you can send from and the verification state of every domain, read in parallel. A section your credential may not read, for example domains without the domains:read scope, says so instead of failing the whole command.

예시

openemail status
The account, addresses and domains as one JSON object
openemail status --json
openemail status --profile work

openemail send

Send, schedule or translate and send an email

범위emails:send로그인 필요

사용법

openemail send --to <address> --subject <text> --text <body> [flags]
openemail send --to <address> --subject <text> --body-file <path> [flags]
openemail send --to <address> --template <id> [--props <json>] [flags]

Sends one email through emails.send. The body comes from --text, --html or both, then --body-file, then anything piped on stdin, and in an interactive terminal from your editor ($VISUAL or $EDITOR). Piped input that starts with an HTML tag is sent as HTML. Without --from you pick one of the addresses you can send from, or the only one is used. A piped body counts as unattended, so the picker is off and --from is needed when you can send from more than one address. --draft sends a saved draft's body, and its subject unless you pass --subject, to the recipients you name. In an interactive terminal you see a summary and confirm before anything goes, unless you pass --yes. Files attached with --attach travel inline while they come to 5 MB or less in total, and are uploaded to Files first and sent by reference when they come to more.

플래그

--to <address>반복 가능

Recipient, or several comma separated. Ada Lovelace <[email protected]> works too

--cc <address>반복 가능

Copy recipient, or several comma separated

--bcc <address>반복 가능

Blind copy recipient, or several comma separated

--from <address>

Address to send from. Left out, the only address you can send from is used, or you pick one in a terminal. A piped body turns the picker off

--reply-to <address>

Address written into the Reply-To header

-s, --subject <text>

Subject line

--text <text>

Plain text body

--html <html>

HTML body

-f, --body-file <path>

Read the body from a file. A .html or .htm file is sent as HTML and anything else as text. - reads stdin

-a, --attach <path>반복 가능

Attach a file. Up to 5 MB in total travels inline, and a larger set is uploaded to Files first

--template <id-or-slug>

Send a stored template instead of a body

--props <json|@file>

Template props as a JSON object, @file or - for stdin

--at <when>

Schedule the send: an ISO date such as 2026-10-01T09:00:00Z, or a delay such as 10m, 2h, 1d or PT1H

--undo <seconds>

Hold an immediate send for 0 to 900 seconds so it can still be cancelled

--translate <language>

Translate the email before it goes, to a code or name such as de or German

--tag <key=value>반복 가능

Tag the email. Tags are echoed back on every read

--draft <id>

Send the body of a saved draft, and its subject unless you pass --subject. --to and --from still apply

--thread <id>

File the sent email into this thread

--idempotency-key <key>

Your own idempotency key, so running the command again never sends twice

예시

openemail send --to [email protected] --subject "Lunch?" --text "Thursday at noon works for me."
The body is read from stdin, so nothing can ask which address to send from
cat report.md | openemail send --from [email protected] --to [email protected] --subject "Weekly report" --attach chart.png
Translated to German and sent in two hours
openemail send --to [email protected] --subject "Invoice" --body-file invoice.html --translate de --at 2h
openemail send --to [email protected] --template welcome --props '{"name":"Ada"}' --tag campaign=onboarding
Running it again with the same key never sends twice
openemail send --from [email protected] --to [email protected] --subject "Receipt" --text "Thanks" --idempotency-key order-4192 --json

openemail inbox

List the threads in your inbox or another folder

범위threads:read로그인 필요별칭ls

사용법

openemail inbox [folder] [flags]

Lists one page of threads, newest first, and reads each one (six at a time) to show when it last moved, who wrote last, the subject, its labels and its id. The folder defaults to the inbox, and sent, archive, starred, snoozed, spam, trash, draft or a label id such as USER_RECEIPTS work too. A dot marks a thread with unread mail. Pass the id to openemail read to open it.

인수

<folder>

Folder or label id to list (default inbox)

플래그

-u, --unread

Only threads with unread mail

-q, --query <search>

Mailbox search such as from:ada has:pdf newer_than:7d

-l, --label <label-id>반복 가능

Only threads carrying this label id, or every one of several comma separated

-n, --limit <n>

Threads per page, 1 to 100 (default 25)

--cursor <cursor>

Carry on from the cursor an earlier page printed

--all

Read every page instead of the first one

--from-contacts

Only threads whose newest message came from a saved contact

--sort <order>

Order of the threads, newest first unless you pick another

다음 중 하나"newest""oldest""sender""subject"

예시

openemail inbox
openemail inbox --unread --limit 50
Threads you sent to Ada
openemail ls sent --query "to:ada"
openemail inbox archive --from-contacts --sort oldest
Every thread id in the inbox
openemail inbox --all --json | jq -r ".items[].id"

openemail read

Read a thread, message by message

범위threads:read로그인 필요별칭show

사용법

openemail read <thread-id> [flags]

Prints every message on the thread, oldest first, with who sent it, who it went to, when, the subject, the attachments with their sizes and ids, and the body. A plain text part is shown as it is, and an HTML-only message is turned into readable text: paragraphs, lists, quotes, headings and links as text (url). With --html stdout gets only the raw HTML of one message, so it can be saved to a file, and the headers go to stderr. Reading marks the thread read unless you pass --no-mark-read.

인수

<thread-id>필수

Thread id from openemail inbox

플래그

-m, --message <n>

Show only this message, counting from 1. A negative number counts from the newest

--html

Print only the raw HTML of one message on stdout, with the headers on stderr

--mark-read

Mark the thread read once it is shown, which is the default. Pass --no-mark-read to leave it unread

예시

openemail read CAHk7pQ2x9LmZ4
Only the newest message
openemail read CAHk7pQ2x9LmZ4 --message -1
openemail show CAHk7pQ2x9LmZ4 --html --message 1 > first.html
openemail read CAHk7pQ2x9LmZ4 --no-mark-read --json

openemail reply

Reply to the last message on a thread

범위threads:reademails:send로그인 필요

사용법

openemail reply <thread-id> --text <body> [flags]
openemail reply <thread-id> --all --body-file <path> [flags]

Replies to whoever sent the last message on the thread, or to its Reply-To address, and files the reply into the same thread. When the last message is one you sent, the reply goes to the people it went to. --all copies everyone else on that message, leaving out your own addresses. The subject gets Re: unless it already has it, and the reply is sent from the address the thread was delivered to when you can send from it. The body flags work as they do for openemail send, including stdin and your editor.

인수

<thread-id>필수

Thread id from openemail inbox

플래그

--text <text>

Plain text body

--html <html>

HTML body

-f, --body-file <path>

Read the body from a file. A .html or .htm file is sent as HTML and anything else as text. - reads stdin

--all

Reply to everyone on the last message, leaving out your own addresses

-a, --attach <path>반복 가능

Attach a file. Up to 5 MB in total travels inline, and a larger set is uploaded to Files first

--from <address>

Address to send from. Left out, the only address you can send from is used, or you pick one in a terminal. A piped body turns the picker off

--to <address>반복 가능

Recipient, or several comma separated. Ada Lovelace <[email protected]> works too

--cc <address>반복 가능

Copy recipient, or several comma separated

--bcc <address>반복 가능

Blind copy recipient, or several comma separated

-s, --subject <text>

Subject line

--at <when>

Schedule the send: an ISO date such as 2026-10-01T09:00:00Z, or a delay such as 10m, 2h, 1d or PT1H

--undo <seconds>

Hold an immediate send for 0 to 900 seconds so it can still be cancelled

--translate <language>

Translate the email before it goes, to a code or name such as de or German

--tag <key=value>반복 가능

Tag the email. Tags are echoed back on every read

--idempotency-key <key>

Your own idempotency key, so running the command again never sends twice

예시

openemail reply CAHk7pQ2x9LmZ4 --text "Thanks, that works for me."
Opens your editor for the body
openemail reply CAHk7pQ2x9LmZ4 --all --attach notes.pdf
echo "Confirmed." | openemail reply CAHk7pQ2x9LmZ4 --yes
openemail reply CAHk7pQ2x9LmZ4 --body-file reply.html --undo 30

openemail archive

Archive threads out of the inbox

범위threads:write로그인 필요

사용법

openemail archive <thread-id...>

Adds ARCHIVE and removes INBOX, the same pair the app uses, so the threads leave the inbox and stay searchable. Several ids are handled in one run, and each one is reported.

인수

<thread-id...>필수하나 이상

One or more thread ids from openemail inbox

예시

openemail archive CAHk7pQ2x9LmZ4
openemail archive CAHk7pQ2x9LmZ4 CAJx0dW1bQe7Tn --json
Archive every recent alert
openemail inbox --query "newer_than:30d from:alerts" --json | jq -r ".items[].id" | xargs openemail archive

openemail unarchive

Move archived threads back to the inbox

범위threads:write로그인 필요

사용법

openemail unarchive <thread-id...>

Adds INBOX and removes ARCHIVE, so the threads show in the inbox again.

인수

<thread-id...>필수하나 이상

One or more thread ids from openemail inbox

예시

openemail unarchive CAHk7pQ2x9LmZ4
openemail unarchive CAHk7pQ2x9LmZ4 CAJx0dW1bQe7Tn

openemail trash

Move threads to the Bin

범위threads:write로그인 필요
확인을 요청합니다

사용법

openemail trash <thread-id...>

Adds TRASH and takes the threads out of the inbox, spam, snoozed and archive in one step, like delete in the app. Nothing is deleted, and a snoozed thread loses its wake time. No API call takes a thread back out of the Bin, so you are asked to confirm unless you pass --yes.

인수

<thread-id...>필수하나 이상

One or more thread ids from openemail inbox

예시

openemail trash CAHk7pQ2x9LmZ4
openemail trash CAHk7pQ2x9LmZ4 CAJx0dW1bQe7Tn --yes

openemail star

Star threads

범위threads:write로그인 필요

사용법

openemail star <thread-id...>

Adds the STARRED label, so the threads show under Starred.

인수

<thread-id...>필수하나 이상

One or more thread ids from openemail inbox

예시

openemail star CAHk7pQ2x9LmZ4
List what you starred
openemail inbox starred

openemail unstar

Take the star off threads

범위threads:write로그인 필요

사용법

openemail unstar <thread-id...>

Removes the STARRED label.

인수

<thread-id...>필수하나 이상

One or more thread ids from openemail inbox

예시

openemail unstar CAHk7pQ2x9LmZ4
openemail unstar CAHk7pQ2x9LmZ4 CAJx0dW1bQe7Tn

openemail mark read

Mark threads read

범위threads:write로그인 필요

사용법

openemail mark read <thread-id...>

Removes the UNREAD label from each thread.

인수

<thread-id...>필수하나 이상

One or more thread ids from openemail inbox

예시

openemail mark read CAHk7pQ2x9LmZ4
Mark the whole first page read
openemail inbox --unread --json | jq -r ".items[].id" | xargs openemail mark read

openemail mark unread

Mark threads unread

범위threads:write로그인 필요

사용법

openemail mark unread <thread-id...>

Adds the UNREAD label to each thread, so it shows as new again.

인수

<thread-id...>필수하나 이상

One or more thread ids from openemail inbox

예시

openemail mark unread CAHk7pQ2x9LmZ4
openemail mark unread CAHk7pQ2x9LmZ4 CAJx0dW1bQe7Tn --json

openemail snooze

Hide threads until a later time

범위threads:write로그인 필요

사용법

openemail snooze <thread-id...> --until <when>

Adds SNOOZED, takes the threads out of the inbox and stores when they come back. Threads are woken by an hourly sweep, so one returns up to about an hour after the time you set, always into the inbox. Snoozing a snoozed thread replaces its wake time.

인수

<thread-id...>필수하나 이상

One or more thread ids from openemail inbox

플래그

--until <when>

When the thread returns: an ISO date such as 2026-10-01T09:00:00Z, or a delay such as 3h, 2d or 1w

예시

openemail snooze CAHk7pQ2x9LmZ4 --until 3h
openemail snooze CAHk7pQ2x9LmZ4 CAJx0dW1bQe7Tn --until 1w
openemail snooze CAHk7pQ2x9LmZ4 --until 2026-10-01T09:00:00+02:00

openemail unsnooze

Bring snoozed threads back now

범위threads:write로그인 필요

사용법

openemail unsnooze <thread-id...>

Adds INBOX, removes SNOOZED and clears the wake time, so the threads return straight away. A thread that is not snoozed stays where it is.

인수

<thread-id...>필수하나 이상

One or more thread ids from openemail inbox

예시

openemail unsnooze CAHk7pQ2x9LmZ4
List what is snoozed
openemail inbox snoozed

openemail label add

Put labels on threads

범위threads:write로그인 필요

사용법

openemail label add <thread-id...> --label <label-id>

Adds every label in --label to each thread. A label id that names no label is refused and nothing on that thread changes, so create it first with openemail labels create. TRASH, SNOOZED and DRAFT cannot be set here: use openemail trash or openemail snooze.

인수

<thread-id...>필수하나 이상

One or more thread ids from openemail inbox

플래그

-l, --label <label-id>반복 가능

Label id such as USER_RECEIPTS or STARRED, or several comma separated

예시

openemail label add CAHk7pQ2x9LmZ4 --label USER_RECEIPTS
openemail label add CAHk7pQ2x9LmZ4 CAJx0dW1bQe7Tn --label USER_TAXES,USER_2026

openemail label remove

Take labels off threads

범위threads:write로그인 필요

사용법

openemail label remove <thread-id...> --label <label-id>

Removes every label in --label from each thread. A label the thread does not carry is not an error.

인수

<thread-id...>필수하나 이상

One or more thread ids from openemail inbox

플래그

-l, --label <label-id>반복 가능

Label id such as USER_RECEIPTS or STARRED, or several comma separated

예시

openemail label remove CAHk7pQ2x9LmZ4 --label USER_RECEIPTS
openemail label rm CAHk7pQ2x9LmZ4 --label IMPORTANT --json

openemail temp new

Create a disposable inbox

로그인 불필요별칭create

사용법

openemail temp new [--name <local-part>] [--domain <domain>] [--ttl <minutes>]

Creates a disposable address that needs no account and no API key, and keeps its token in ~/.openemail/temp-mail.json so the other temp commands can reach it. The address is printed on stdout on its own, so ADDRESS=$(openemail temp new) works in a script. It lives for 60 minutes unless you pass --ttl, up to 24 hours, and openemail temp-mail extend adds up to an hour at a time within 24 hours of its creation, saving the new token it returns. A name you choose with --name is issued to anyone who asks for it too, so leave it out when the mail should reach you alone.

플래그

--name <local-part>

The part before the @, up to 64 letters, digits, dots, dashes or underscores, starting and ending with a letter or digit. Left out, one is generated. Anyone who asks for the same name reads its mail too

--domain <domain>

Domain from openemail temp-mail list-domains. Left out, the first one in that list is used

--ttl <minutes>

How long the inbox lives, 1 to 1440 minutes (default 60)

예시

openemail temp new
openemail temp new --name signup-test --ttl 120
Keep the address in a shell variable
ADDRESS=$(openemail temp new --ttl 15)
Prints the inbox with its id, expiry and token
openemail temp new --json

openemail temp list

List the disposable inboxes this CLI created

로그인 불필요

사용법

openemail temp list

Lists the inboxes kept in ~/.openemail/temp-mail.json, soonest to expire last. Expired inboxes are forgotten as they are found, because their tokens no longer open anything. An inbox extended with openemail temp-mail extend shows its later expiry. Nothing is read from the network.

예시

openemail temp list
Ids, addresses and expiry times, never the tokens
openemail temp ls --json

openemail temp read

List the mail in a disposable inbox, or read one message

로그인 불필요별칭showopen

사용법

openemail temp read [inbox] [message-id] [flags]

Without a message id it lists what has arrived, newest first, with a short preview that is often enough to read a one time code. With one it prints the whole message, turning HTML into readable text, and lists its attachments by name and size, without their bytes. The inbox is its id or address, and can be left out when you have only one, so a lone thr_ id reads that message. Reading a message does not mark it seen, and its body is never cut. The sender of mail in a temporary inbox is never verified.

인수

<inbox>

Inbox id or address from openemail temp list

<message-id>

A thr_ id from the list

플래그

--html

Print only the raw HTML on stdout, with the headers on stderr

--inbox-token <token>

The oe_inbox_ token of an inbox this CLI did not create

예시

openemail temp read
openemail temp read quiet-otter-12@example-temp.com
Reads one message from your only inbox
openemail temp read thr_9e3b7c1a5f2d8e40b6a9c3f1
openemail temp read tinb_k7m2q9xw4bdp thr_9e3b7c1a5f2d8e40b6a9c3f1
openemail temp read tinb_k7m2q9xw4bdp thr_9e3b7c1a5f2d8e40b6a9c3f1 --html > message.html

openemail temp watch

Wait for mail to arrive in a disposable inbox

로그인 불필요

사용법

openemail temp watch [inbox] [--first]

Prints what is already in the inbox, then checks every 3 seconds and prints each new message as it lands, until you press Ctrl+C or the inbox expires. When openemail temp-mail extend saves a new token for the inbox meanwhile, the watch carries on with it until the later expiry. With --first it stops as soon as there is a message, which suits a script waiting for a sign-up code. With --json each message is one JSON line on stdout.

인수

<inbox>

Inbox id or address from openemail temp list, optional when you have only one

플래그

--first

Stop as soon as the inbox holds a message, which suits a script waiting for a code

--inbox-token <token>

The oe_inbox_ token of an inbox this CLI did not create

예시

openemail temp watch
openemail temp watch quiet-otter-12@example-temp.com
Wait for one message and print its preview
openemail temp watch --first --json | jq -r .snippet

openemail temp delete

Move the mail in a disposable inbox to the bin and forget its token

로그인 불필요
확인을 요청합니다
별칭rm

사용법

openemail temp delete [inbox] [--yes]

Moves every message the inbox shows to the bin at once, then removes the inbox and its token from ~/.openemail/temp-mail.json. Nothing about the lease is stored on the server, so there is nothing to revoke: it runs on until its expiry, and mail that arrives in the meantime still reaches whoever holds the token. Nothing holds the address back either, so it can be issued again at once, to anybody. You are asked to confirm unless you pass --yes.

인수

<inbox>

Inbox id or address from openemail temp list, optional when you have only one

플래그

--inbox-token <token>

The oe_inbox_ token of an inbox this CLI did not create

예시

openemail temp delete
openemail temp rm quiet-otter-12@example-temp.com --yes
openemail temp delete tinb_k7m2q9xw4bdp --yes --json

openemail ai translate

Translate a subject and body without sending anything

범위emails:send로그인 필요

사용법

openemail ai translate --to <language> [--text <text>|--html <html>|--body-file <path>] [--subject <subject>]
openemail ai translate --to <language> < message.txt

Runs the same translation a translated send performs and prints the result, so you can read it before anything leaves. Nothing is stored and nothing is sent. The body comes from --text, --html, --body-file (a .html file is sent as HTML, anything else as text) or stdin when it is piped. --text and --html also read a file with @path or stdin with -. Each call spends one AI action, and the credential needs the emails:send scope.

플래그

--to <language>필수

Target language as a code (de), an English name (German) or its own name (Deutsch)

--from <language>

The language you wrote in. Stating it skips detection

--subject <subject>

A subject line to translate

--text <text|@file|->

A plain text body to translate

--html <html|@file|->

An HTML body to translate

--body-file <path>

Read the body from a file. A .html or .htm file is HTML, anything else is text

--original

Keep your original text below the translation (the default). Pass --no-original to leave it out

예시

openemail ai translate --to de --subject "Your invoice" --text "The invoice is attached."
Translates an HTML body and leaves your original out
openemail ai translate --to Japanese --body-file reply.html --no-original
Reads the body from stdin
cat notes.txt | openemail ai translate --to fr
Prints the full translation object, including the detected source language
openemail ai translate --to es --text "See you soon" --json

openemail ai languages

List every language translation accepts

로그인 여부와 관계없이 동작별칭langs

사용법

openemail ai languages [--search <text>]

Prints the language table the server translates into, in the order a picker should show it. Any row's code, English name or own name works as --to on openemail ai translate and openemail send --translate. Signed out, it prints the table bundled with this version of the CLI.

플래그

--search <text>

Keep only languages whose code, English name or own name contains this text

예시

openemail ai languages
Finds Portuguese and Brazilian Portuguese
openemail ai languages --search port
Lists the right-to-left codes
openemail ai languages --json | jq -r '.[] | select(.rtl) | .code'

openemail ai compose

Write an email body with AI from a short prompt

범위drafts:write브라우저 로그인 필요별칭write

사용법

openemail ai compose "<prompt>" [--to <address>] [--subject <subject>] [--thread <thread-id>] [--tone <tone>]

Asks the OpenEmail assistant to write an email body in your own writing style and prints it. Nothing is sent or saved, so pipe it into openemail send --from <address> when you are happy with it. With --thread the assistant reads the thread first and writes a reply to it. The prompt can also come from stdin. This uses the MCP tool composeEmail, so it needs a browser sign-in (openemail login) and spends one AI action, plus one for each web search it runs.

인수

<prompt...>하나 이상

What the email should say

플래그

--to <address>반복 가능

Who it is for. Repeat the flag or separate addresses with commas

--cc <address>반복 가능

Who is copied in

--subject <subject>

The subject the email will have, which helps the assistant stay on topic

--thread <thread-id>

Write a reply to this thread. The assistant reads its latest messages first

--tone <tone>

The tone to write in

다음 중 하나"formal""friendly""casual""concise""direct""warm"

예시

openemail ai compose "thank Ada for the invoice and ask for a PDF copy" --to [email protected]
Writes a reply after reading the thread
openemail ai compose "say yes to Tuesday at 3pm" --thread thr_123 --tone friendly
Pipes the text into a send, which reads its body from stdin and needs `--from` to know the sender
openemail ai compose "decline politely" --thread thr_123 | openemail send --from [email protected] --to [email protected] --subject "Re: Proposal"
Prints the body with the inputs as JSON
openemail ai compose "remind the team about Friday" --json

openemail ai summarize

Print the AI summary of a thread

범위threads:read브라우저 로그인 필요별칭summarisesummary

사용법

openemail ai summarize <thread-id>

Prints the short summary OpenEmail keeps for a thread, with its subject, sender and date. Summaries are written when mail arrives, and a thread holding an encrypted message is never summarised. This uses the MCP tool getThreadSummary, so it needs a browser sign-in (openemail login).

인수

<thread-id>필수

The thread to summarise, as openemail inbox lists it

예시

openemail ai summarize thr_123
Prints the summary, subject, sender and date as JSON
openemail ai summarize thr_123 --json
Reads the summary through the workspace your work profile signed in to
openemail ai summarize thr_123 --profile work

openemail mcp config

Print the snippet that connects an AI client to OpenEmail

로그인 불필요

사용법

openemail mcp config [--client <client>]

Prints what to add to an MCP client so it can read and act on your mail, and which file it goes in. There are two ways to connect. The remote server URL is the simplest: the client opens your browser, you approve it on the OpenEmail consent page, and it appears in Account, Connected apps. Each client runs its own browser sign-in for the remote URL. The local bridge (openemail mcp serve, started through npx) is for clients that only start local servers, and it reuses this CLI's sign-in, so run openemail login first. With no --client, every client is printed in short form.

플래그

--client <client>

The client to print the full snippet for

다음 중 하나"claude-code""claude-desktop""cursor""vscode""windsurf""codex"

예시

Every client in short form
openemail mcp config
openemail mcp config --client claude-code
The local bridge serves the workspace your work profile signed in to
openemail mcp config --client cursor --profile work
The snippets as JSON, for a setup script
openemail mcp config --client vscode --json

openemail mcp tools

List the MCP tools this sign-in can use

브라우저 로그인 필요별칭list

사용법

openemail mcp tools [tool]

Lists every tool the OpenEmail MCP server offers to this sign-in, with the first sentence of its description. The list already leaves out tools your role or the app grant cannot use. Name one tool to see its full description and arguments. It needs a browser sign-in (openemail login).

인수

<tool>

Show the description and arguments of this tool

예시

openemail mcp tools
Shows what composeEmail takes
openemail mcp tools composeEmail
Prints only the tool names
openemail mcp tools --json | jq -r '.[].name'

openemail mcp call

Call one MCP tool and print its result

브라우저 로그인 필요

사용법

openemail mcp call <tool> [--args <json|@file|->] [--arg key=value ...]

Calls a tool on the OpenEmail MCP server with your browser sign-in and prints the text it returns. --args gives every argument as one JSON object, and each --arg key=value sets or overrides one of them. A value is read as JSON when it parses (--arg maxResults=5 is a number, --arg labelIds='["Label_1"]' a list) and as text otherwise, so quote a number you mean as text (--arg 'id="123"'). A result that starts with Refused ( exits with code 4, and usually means your role or the app grant does not allow the tool. A tool that makes a sensitive change, such as creating a rule or removing a domain, first needs a verification code, as the same change does through the REST API. In an interactive terminal the command asks for the code and then calls the tool again. Unattended it exits with code 4, so run openemail verify beforehand. The MCP server never asks for confirmation, so a tool that sends or deletes acts at once. Run openemail mcp tools <tool> to see what a tool takes.

인수

<tool>필수

The tool to call, as openemail mcp tools lists it

플래그

--args <json|@file|->

Every argument as one JSON object, from inline JSON, a file (@args.json) or stdin (-)

--arg <key=value>반복 가능

Set one argument. The value is JSON when it parses, text otherwise

예시

openemail mcp call whoAmI
openemail mcp call listThreads --arg folder=inbox --arg maxResults=5
openemail mcp call getThread --args '{"threadId":"thr_123"}'
Prints the full MCP result, including every content part
openemail mcp call listTemplates --json | jq .content

openemail mcp serve

Run a local stdio MCP server that forwards to OpenEmail

브라우저 로그인 필요

사용법

openemail mcp serve

Reads newline-delimited JSON-RPC from stdin, sends each message to the OpenEmail MCP server with your saved browser sign-in, and writes each answer to stdout as one line. Notifications produce no output, a batch is split into single requests and answered as one array, and an expired access token is refreshed without the client noticing. Nothing but protocol reaches stdout, and nothing reaches stderr unless you pass --debug, except one hint the first time a tool is refused because it needs a verification code. That refusal reaches the client unchanged, because the bridge cannot ask for a code over stdio. Run openemail verify in a terminal with the same profile, and tools that make a sensitive change run without a code for the next 60 minutes. It stops when stdin closes. Use it for MCP clients that only start local servers; openemail mcp config prints the snippet. It needs a browser sign-in (openemail login), because API keys cannot reach the MCP server.

예시

MCP clients start it as `npx -y @openemail/cli mcp serve`. Sign in once with `openemail login` first
openemail mcp serve
Serves the workspace your work profile signed in to
openemail mcp serve --profile work
Lists the tools by hand, one JSON line in and one out
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | openemail mcp serve
Logs each forwarded method and its status to a file
openemail mcp serve --debug 2> mcp.log

openemail docs ask

Ask the docs assistant a question

로그인 불필요

사용법

openemail docs ask "<question>"

Sends your question to the OpenEmail docs assistant and prints the answer as it is written, followed by the numbered pages it came from. The assistant answers only from the documentation, so it cannot see or change your mailbox. It needs no sign-in and never sends your credentials. Questions are limited to 600 characters and to a daily number per network, so for longer research open the docs with openemail docs open.

인수

<question...>필수하나 이상

What you want to know, in plain words

예시

openemail docs ask "how do I verify a domain?"
Quotes are optional
openemail docs ask what does step-up mean for the CLI
Collects the answer and its sources into one JSON object
openemail docs ask "which scopes does sending need?" --json | jq -r .answer

openemail docs open

Open a docs page in your browser

로그인 불필요

사용법

openemail docs open [slug] [--print]

Opens the OpenEmail documentation, or the page you name. A slug is the part of the address after /docs/, such as cli/ai-and-mcp, and a full docs link works too. Over SSH, or with --print, it prints the link instead.

인수

<slug>

The page to open, such as get-started/welcome or cli/authentication

플래그

--print

Print the link instead of opening a browser

예시

Opens the docs home
openemail docs open
openemail docs open cli/authentication
openemail docs open cli/commands --print

openemail docs read

Print a docs page as Markdown

로그인 불필요

사용법

openemail docs read [slug]

Prints the Markdown version of a docs page, the same text the website serves at the page address with .md on the end. It is handy for reading in the terminal or handing a page to another tool. With no slug it prints llms.txt, the index of every page. It needs no sign-in.

인수

<slug>

The page to print, such as cli/commands. Leave it out for the index of every page

예시

openemail docs read cli/commands
Prints the index of every docs page
openemail docs read
openemail docs read get-started/welcome | less
openemail docs read cli/scripting --json | jq -r .markdown

openemail agents

A guide for AI agents and scripts that drive this CLI

로그인 불필요별칭agent

사용법

openemail agents
openemail agents --json

Prints a short guide, in Markdown, for an AI agent such as Claude Code or Codex, or a script in CI: how to sign in without a person, why to pass --json and how to read errors and exit codes, how to find commands with --help --json, how to preview a change with --dry-run and when to pass --yes, how lists and streams page, what happens when a verification code or a scope is missing, and a few recipes to copy. With --json it prints the same guide as one JSON document. It needs no sign-in and sends nothing.

예시

The guide as Markdown, ready to hand to an agent
openemail agents
Save it next to your agent instructions
openemail agents > OPENEMAIL.md
Only the recipes
openemail agents --json | jq -r '.recipes[].commands[]'

openemail verify

Enter a verification code now, so sensitive commands run for 60 minutes

브라우저 로그인 필요

사용법

openemail verify
openemail verify --status
openemail verify --force

With a browser sign-in, a sensitive change such as adding a webhook, creating or turning on a rule, or removing a domain asks for a verification code first, the way the web app does. Commands ask for it when they need it. openemail verify asks for it now instead: it emails you a code, or asks for one from your authenticator app or a backup code when two-factor sign-in is on, and once the code is right, sensitive commands, openemail mcp call and openemail mcp serve run without a code for the next 60 minutes. Run it before a script or an AI client does something sensitive, because neither can type a code. It covers this profile only. An AI client connected through the remote server URL is a connected app of its own, so this does not cover it: allow that app with Allow changes for 60 minutes in its menu under Connected apps on the website (openemail open apps). --status shows whether this sign-in is verified and until when. A code allows 5 tries. After 10 wrong codes for this sign-in within 24 hours, or 20 across all your connected apps, verification is paused, so the command says when it resumes and exits 4. API keys never need a code.

플래그

--status

Show whether this sign-in is verified and until when, without asking for a code

--force

Ask for a new code even when this sign-in is already verified, which starts a fresh 60 minutes

예시

Asks for a code, then sensitive commands run without one for 60 minutes
openemail verify
openemail verify --status
Prints elevated, elevatedUntil, method and minutes for scripts
openemail verify --status --json
Verifies the sign-in of another saved profile
openemail verify --profile work

openemail logout

Sign out and forget a saved profile

로그인 불필요

사용법

openemail logout
openemail logout --profile <name>
openemail logout --all

A browser sign-in is revoked on the server first, which removes it from Account settings, Command line, and then forgotten on this device. The profile is forgotten even when the server cannot be reached, and the command says so. An API key is only forgotten: the key itself keeps working until you revoke it.

플래그

--all

Sign out of every saved profile

예시

Signs out of the active profile
openemail logout
openemail logout --profile work
Signs out of every profile on this device
openemail logout --all
Prints what was removed and whether the server confirmed it
openemail logout --json

openemail profile list

List the saved profiles

로그인 불필요

사용법

openemail profile list
openemail profile list --json

Shows every saved sign-in with its kind, workspace and user or key. The active profile is marked with a dot.

예시

openemail profile list
Never prints tokens or keys
openemail profile ls --json

openemail profile use

Make a saved profile the active one

로그인 불필요별칭switch

사용법

openemail profile use <name>

Every command without --profile then uses this sign-in. With no name in an interactive terminal it lets you pick one.

인수

<name>필수

The profile to activate

예시

openemail profile use work
Pick from a list
openemail profile use
openemail profile use default --json

openemail profile remove

Sign out of a profile and forget it

로그인 불필요

사용법

openemail profile remove <name>

The same as openemail logout --profile <name>: a browser sign-in is revoked on the server, then the profile is forgotten on this device either way.

인수

<name>필수

The profile to remove

예시

openemail profile remove work
openemail profile rm staging --json

openemail profile current

Print the profile the next command would use

로그인 불필요

사용법

openemail profile current
openemail profile current --json

Prints the profile name on stdout, so $(openemail profile current) works in scripts. When OPENEMAIL_API_KEY or --api-key is in effect no profile is used, and it says so on stderr.

예시

openemail profile current
OPENEMAIL_PROFILE=work openemail profile current
openemail profile current --json

openemail open

Open a page of the OpenEmail web app in your browser

로그인 불필요

사용법

openemail open [page] [--print]
openemail open forwarding <address> [--print]

Opens the web app at the page you name, signed in as whoever is signed in to that browser. Use it for what the CLI does not do yet, such as billing, workspaces, account security, data export, forwarding and DNS providers. With no page it opens the mailbox. forwarding takes the address whose forwarding you want to change. A path that starts with / is opened as it is. Over SSH, or with --print, it prints the link instead.

인수

<page>

One of the pages below, or a path such as /mail/workspace/domains

<address>

The address a forwarding page belongs to

플래그

--print

Print the link instead of opening a browser

예시

Opens the mailbox
openemail open
openemail open billing
Command line, where each terminal sign-in is listed and can be signed out
openemail open cli
Forwarding for one address
openemail open forwarding [email protected]
Link a DNS provider, so the records of a new domain are written for you
openemail open providers
Prints the link instead of opening it
openemail open domains --print

openemail update

Check npm for a newer version of the CLI

로그인 불필요

사용법

openemail update

Checks the npm registry now, ignoring the daily cache, and prints the command that installs the latest release with the package manager you used. The CLI never updates itself. When npm has no release of the CLI yet it says so and exits 0, and only a registry it could not reach exits 9.

예시

openemail update
Prints current, latest, published, updateAvailable and the install command
openemail update --json

openemail completion

Print a shell completion script for bash, zsh or fish

로그인 불필요

사용법

openemail completion <bash|zsh|fish>

Prints a completion script built from every command, subcommand and flag this version of the CLI knows. Load it in your shell profile, and run the command again after an update.

인수

<shell>필수

bash, zsh or fish

예시

Add this line to ~/.bashrc
eval "$(openemail completion bash)"
Then start a new shell, or run compinit
openemail completion zsh > "${fpath[1]}/_openemail"
openemail completion fish > ~/.config/fish/completions/openemail.fish

openemail api

Call any REST endpoint with your sign-in

로그인 필요

사용법

openemail api <method> <path> [--data <json|@file|->] [--query <key=value>] [--header <key=value>]
openemail api <path>

Sends one request to the OpenEmail REST API through the same transport the other commands use, so your profile or API key, token refresh and verification codes all apply. The path is relative to the API origin, for example /threads or /keys/self, and a path on its own is a GET. A JSON response is printed as formatted JSON, and a file is saved with --out. A failed request prints the API error and exits with the matching code.

인수

<method>

GET, POST, PUT, PATCH, DELETE or HEAD (default GET)

<path>필수

Path on the API, such as /threads or /emails/msg_123

플래그

-d, --data <json|@file|->

Request body: inline JSON, @file to read a file, or - for stdin

-q, --query <key=value>반복 가능

Query parameter. Parameters written into the path are kept too

-H, --header <key=value>반복 가능

Extra request header. Key: value works too. The CLI sets Authorization itself

-o, --out <path>

Save the response body to this file as it came, which suits a download. - writes it to stdout

예시

openemail api /keys/self
openemail api GET /threads --query folder=inbox --query limit=5
openemail api POST /labels --data '{"name":"Receipts"}'
openemail api PATCH /threads/CAHk7pQ2x9LmZ4 --data @patch.json
Saves the download as it came
openemail api GET /files/file_123/content --out report.pdf
A DELETE asks to confirm first unless you pass --yes
openemail api DELETE /webhooks/wh_123 --yes