Skip to main content

Using the Cora CLI

W
Written by Waqqas Mir

Looking for Cora Agents, Cora MCP, or how to connect an AI agent (Claude Code, OpenClaw, etc.) to your Cora email? This is the right page. Agent access to Cora is set up at cora.computer/api_tokens (Settings → Agents) — it is not on the Every Connections dashboard, which is a different product (Every Agent for Slack).

The Cora CLI lets you use Cora from your terminal. It's the same account, the same inbox, and the same AI assistant you see at cora.computer, reachable as commands like cora email glimpse or cora brief show.

It's also how you give an AI agent access to your email. Tools like Claude Code and OpenClaw can run the CLI directly, so an agent can read your inbox, draft replies, and act on your instructions without you copying anything back and forth.

The CLI is in beta. It's available to anyone with a Cora account, and we'd love your feedback at [email protected].

Key highlights

  • Your whole inbox as commands. Search, read threads, archive, label, star, snooze, unsubscribe, RSVP to invites, manage drafts, plus briefs, categories, rules, and todos.

  • Fast by default. Most commands run instantly with no AI step. cora chat send talks to the full Cora assistant when a request is complex, and takes longer (roughly 10 to 60 seconds).

  • Built for agents. cora prime prints a complete, agent-ready command reference. Nearly every command supports --format json, and commands exit with predictable codes.

  • A change feed instead of polling. cora email delta returns everything that changed since your last cursor, so an agent can react to new mail rather than re-running searches.

  • Sends you can verify. Every send returns a receipt, and cora email send-status and cora email sent --since 2h answer "did that actually go out?" after a timeout or a crash.

  • Replies can't go from the wrong address. cora email reply always sends from the account that received the email.

  • Multiple accounts. Switch the active account, or target one account for a single command.

Before you start

  • A Cora account with your email connected.

  • macOS or Linux (Intel or Apple silicon). On Windows, use WSL.

  • A terminal. That's it: there's no runtime, package manager, or config file to set up.

Step 1: Create an API token

  1. Sign in at cora.computer.

  2. Go to Settings → Agents (cora.computer/api_tokens).

  3. Click + New token, give it a name you'll recognize (for example "Laptop" or "Claude Code"), and create it.

  4. Copy the token and keep it somewhere safe. Treat it like a password: it can read and act on your email.

The Agents page also lists your existing tokens with when each was last used, so you can spot one you no longer need and delete it.

Connecting an AI agent instead? On the same page, click Connect under "Give your agent access to your email." Cora creates a token and gives you a one-time setup link that walks your agent through the rest. The link expires after one hour; generate a new one any time.

Step 2: Install the CLI

Run this in your terminal:

curl -fsSL cora.computer/install | bash

The installer detects your platform, verifies the download's checksum, and installs cora to ~/.local/bin.

If ~/.local/bin isn't on your PATH, the installer prints the line to add to your shell profile:

export PATH="$PATH:$HOME/.local/bin"

Open a new terminal (or reload your profile) and check it worked:

cora help

To install somewhere else, set CORA_INSTALL_DIR before running the installer.

Step 3: Sign in

Interactively (best for your own laptop):

cora login

Paste your token when prompted. Sessions last 30 days.

With the token inline:

cora login --token=YOUR_TOKEN

For agents and scripts (no login step, no session to expire):

export CORA_API_TOKEN=YOUR_TOKEN

Every command then authenticates on its own. This is the recommended setup for anything unattended.

Confirm you're connected:

cora whoami cora status

cora whoami shows your email, account, and time zone. cora status adds your brief schedule and how many emails Cora processed in the last 24 hours. cora logout clears the session.

Step 4: Try a few commands

Action

Command

Quick look at your inbox cora

cora email glimpse

Search with Gmail query

cora email search "from:stripe"

Read one email in full cora email

cora email show <email-id> 

Read a whole thread, with Cora's state

cora email thread <thread-id> 

Your latest brief

cora brief show 

Your to-do list

cora todo list 

Open the Cora dashboard in your browser

cora open

IDs come from glimpse, search, or show. Add --format json to any of these when a script or agent is reading the output.

For help on anything: cora help, cora help <command>, or cora email help <command>.

What you can do (by area)

Area

Commands

Email: read

glimpse, search, show, thread, context, contacts, labels

Email: organize

archive, inbox, label, star / unstar, mark-read / mark-unread, snooze, unsubscribe

Email: write

reply, reply-draft, compose, forward, edit, send, discard-draft, draft

Email: files & invites

attachments, download-attachment, calendar-invite, rsvp

Email: for agents

delta, sent, send-status

Inbox

cora inbox zero, cora inbox analyze

Briefs

cora brief, brief show, brief read / unread (briefs use --json, not --format json)

Todos

list, show, create, edit, complete, uncomplete, delete

Instructions

cora instruction list / create / resolve / delete

Categories & rules

cora category …, cora rule …

Assistant

cora chat send "…", chat list, chat show

Account

cora whoami, cora status, cora account list, cora account switch

Advanced

cora skill …, cora mcp …, cora openclaw …

Working with several accounts

Action

Command

See the accounts available to you

cora account list

Change the active account (persists)

cora account switch "[email protected]"

One command only

cora email glimpse --account "[email protected]"

Sending safely

  • Use --body "…" for plain text. Use --body-markdown or --body-html only when you intend formatting, and --body-file ./message.txt to send from a file.

  • Attach files with repeated --attach ./path flags. Total attachments must stay under 25 MB, and file types Gmail blocks (plus password-protected ZIPs) are rejected.

  • Pass --idempotency-key <your-key> on direct sends so a retry can't send twice.

  • Replying to an email you already answered stops with already_replied. Add --followup if you meant to send another reply.

  • Drafts return a draft ID; send it later with cora email send <id> or drop it with cora email discard-draft <id>.

Using the CLI with an AI agent

  1. Create a token (Step 1) and set CORA_API_TOKEN in the agent's environment.

  2. Have the agent run cora prime. It prints the full command reference, including which commands are instant and which invoke the AI assistant.

  3. Point the agent at --format json output and the cora email delta cursor loop rather than repeated searches.

  4. Leave instructions on specific emails in Cora, and the agent can pick them up with cora instruction list --format json (add --wait to block until something new arrives).

If you're using OpenClaw, cora openclaw guide walks through registering your gateway so you can chat through it.

During the beta

A few areas are still being rolled out account by account. If a command replies that it isn't available for your account yet, email [email protected] and we'll enable it:

  • Composing and sending new mail

  • The bulk cora inbox zero cleanup

  • Skills, MCP servers, and OpenClaw agent commands

Troubleshooting

  • cora: command not found~/.local/bin isn't on your PATH. Add the export line from Step 2 and open a new terminal.

  • "Not authenticated" (exit code 2) — run cora login, or set CORA_API_TOKEN for unattended use.

  • "Invalid token" — the token was mistyped or deleted. Create a new one at Settings → Agents.

  • It worked last month and now asks me to log in — sessions last 30 days. Log in again, or switch to CORA_API_TOKEN, which doesn't expire with the session.

  • Windows — the installer supports macOS and Linux. Install inside WSL.

  • A command says the feature isn't available for your account — see "During the beta" above.

  • Exit codes — 0 success, 1 general error, 2 authentication required, 3 not found, 4 validation error.

Getting help

Email [email protected] with what you ran and what came back. If it's an agent problem, the JSON error output (--format json) is the most useful thing to include.

Did this answer your question?