@bitefoundry/outlook 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 BiteFoundry
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 BiteFoundry
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,165 +1,177 @@
1
- <div align="center">
2
-
3
- # `outlook`
4
-
5
- **Blazing-fast Microsoft Outlook terminal client & AI agent toolkit — Mail, Calendar, To Do, and Contacts in one native Rust binary.**
6
-
7
- [![npm version](https://img.shields.io/npm/v/%40bitefoundry%2Foutlook?color=7aa2f7&label=%40bitefoundry%2Foutlook&logo=npm)](https://www.npmjs.com/package/@bitefoundry/outlook)
8
- [![Platforms](https://img.shields.io/badge/platforms-Windows%20%7C%20macOS%20%7C%20Linux-565f89)](docs/NPM.md)
9
- [![Built with Rust & Ratatui](https://img.shields.io/badge/Rust-Ratatui-e0af68?logo=rust&logoColor=white)](https://ratatui.rs)
10
- [![License: MIT](https://img.shields.io/badge/License-MIT-9ece6a)](https://opensource.org/license/mit)
11
-
12
- <br />
13
-
14
- ![outlook TUI Demo](https://raw.githubusercontent.com/BiteFoundry/outlook/master/assets/demo.gif)
15
-
16
- </div>
17
-
18
- ---
19
-
20
- ## Highlights
21
-
22
- | Pillar | What You Get |
23
- | --- | --- |
24
- | **Minimal-Chrome TUI** | 3-tier responsive `ratatui` workspace across **Mail** (`1`), **Calendar** (`2`), and **Microsoft To Do** (`3`) with HTML-rendered email preview, inline `href` toggle (`h`), Link Extractor (`u`), quoted-reply folding (`z`), structured Compose modal (`c`), `zoxide` File Picker (`Ctrl+F`), and `Ctrl+K` Omni-Switcher. |
25
- | **High-Res Terminal Images** | Native inline rendering for attached and `cid:`/`https://` email images across **Kitty**, **iTerm2 (`OSC 1337`)**, **Sixel (`DCS q`)**, and **24-bit Half-Blocks (`▀`)** fallback with live zoom (`+`/`-`/`0`) and protocol cycling (`p`). |
26
- | **Local SQLite FTS5 + IPC Daemon** | Bundled SQLite WAL + FTS5 cache (`cache.db`) with incremental delta sync, `$batch` neighbor hydration, 0ms optimistic triage (`archive`, `flag`, `mark-read`, `complete`), offline search, and sub-5ms CLI reads via `outlook daemon`. |
27
- | **4-in-1 Agent Interface** | One static binary (Windows, macOS, Linux **GLIBC 2.28 / AlmaLinux 8+**) delivers **TUI**, scriptable **CLI (`--json`)**, **Axum HTTP REST API (`outlook serve`, `:3939`)**, and **stdio MCP server (`outlook mcp`, 23 tools)**. |
28
-
29
- ---
30
-
31
- ## Quick Start
32
-
33
- ```bash
34
- # 1. Install globally via npm (links prebuilt native binary, zero Node runtime overhead)
35
- npm i -g @bitefoundry/outlook
36
-
37
- # 2. Authenticate with Microsoft Entra ID (or automatically reuse your @bitefoundry/teams M365 session!)
38
- outlook login
39
-
40
- # 3. Launch the interactive TUI
41
- outlook
42
- ```
43
-
44
- For a company registration, use `outlook login --client-id YOUR_CLIENT_ID --tenant-id YOUR_TENANT_ID`. Without an override, Outlook uses the Microsoft Graph Command Line Tools client for its own interactive login. [Register a desktop app](https://github.com/BiteFoundry/teams/blob/master/docs/ENTERPRISE.md) · [Outlook delegated permissions](docs/NPM.md#required-microsoft-graph-delegated-scopes)
45
-
46
- > **Shared M365 Session & Token Brokers:** When `share_m365_auth = true` (default), `outlook` seamlessly reuses or upgrades an existing `@bitefoundry/teams` session without a second browser login. Also supports `--device-code`, `OUTLOOK_ACCESS_TOKEN`, `OUTLOOK_TOKEN_FILE`, `OUTLOOK_TOKEN_REFRESH_CMD` (`az account get-access-token`), and custom Entra ID apps. Run `outlook whoami` or `outlook doctor --online` for JWT scope diagnostics, and `outlook update` for one-click SHA-256 verified self-updates.
47
-
48
- ---
49
-
50
- ## Keybindings Cheat Sheet
51
-
52
- | Key | Context | Action |
53
- | --- | --- | --- |
54
- | `1` / `2` / `3` (`Alt+1..3`) | Global | Switch **Mail** / **Calendar** / **To Do Tasks** tabs |
55
- | `Ctrl+K` | Global | **Omni-Switcher / Command Palette** (`>` commands, `#` folders, `@` contacts, `/` search) |
56
- | `j` / `k` / `↑` / `↓` | Global | Navigate folders, message list, calendar agenda, tasks, or reading pane |
57
- | `Tab` / `Enter` / `Esc` | Global | Cycle pane focus (`Folders ↔ List ↔ Reader`) or close modal |
58
- | `c` / `r` / `R` / `f` | Mail | **Compose** / **Reply** / **Reply-All** / **Forward** (Markdown + `Ctrl+F` attach + `Ctrl+V` image) |
59
- | `C` / `Ctrl+S` | Mail / Compose | Start a separate composition / save the current draft to Outlook |
60
- | `e` / `g` / `m` / `Del` | Mail | **Archive** / **Flag** / **Move to folder** / **Delete** (0ms optimistic updates) |
61
- | `h` / `u` / `z` | Mail Reader | Toggle inline `href` URLs / open **Link Extractor** / fold quoted reply history |
62
- | `t` / `F` / `U` | Mail | Toggle **Thread grouping** / **Focused Inbox** / **Unread filter** |
63
- | `v` / `Alt+v` / `d` | Mail Reader | High-res **Inline Image Preview** / download latest attachment (`A` for picker) |
64
- | `n` / `a` / `y` / `x` | Calendar | **New Event** / RSVP **Accept** (`a`), **Tentative** (`y`), **Decline** (`x`) |
65
- | `Space` / `n` | Tasks | Toggle To Do completion (`Space`) / create new task or list (`n`) |
66
- | `/` / `Ctrl+D` / `Ctrl+B` | Global | Search mail (FTS5 + Graph KQL) / toggle **Cozy / Compact** density / toggle sidebar |
67
- | `Ctrl+,` / `?` / `Ctrl+Q` | Global | **Settings** / full help overlay / safe quit |
68
-
69
- ---
70
-
71
- ## CLI, HTTP API & MCP
72
-
73
- ### CLI Examples
74
-
75
- ```bash
76
- # Mail: inspect inbox, read, reply, and send Markdown with attachments
77
- outlook mail --folder inbox --unread --limit 20 --json
78
- outlook read AAMkAGI2... --json
79
- outlook read AAMkAGI2... --json --full
80
- outlook read AAMkAGI2... --mark-read
81
- outlook send --to elena.park@acme.dev --subject "v2.4 Release" \
82
- --body "**All canary checks passed.** See attached benchmarks." \
83
- --attach ./v24-benchmarks.pdf --importance high
84
-
85
- # Calendar & To Do: view agenda, schedule Teams meeting, RSVP, and manage tasks
86
- outlook calendar --days 7
87
- outlook create-event --subject "Go / No-Go Review" \
88
- --start "2026-11-20T14:00:00Z" --end "2026-11-20T14:45:00Z" \
89
- --attendee elena.park@acme.dev --online
90
- outlook add-task "Promote canary to 100%" --due 2026-11-20 --importance high
91
- outlook daemon start
92
- ```
93
-
94
- JSON output for `mail`, `read`, and `event` is compact by default. Pass `--full` with `--json` for full cached fields, HTML bodies, and attachment metadata (`content_bytes_b64` is never embedded in CLI/MCP JSON; fetch attachment bytes with `outlook download`, or `outlook download --offline` for cached bytes). `--compact` remains a compatibility alias and conflicts with `--full`. Paginated JSON listings (`mail`, `search --remote`, `folders`, `task-lists`) include `returned`, `has_more`, and `next_cursor`; continue with `--cursor <CURSOR>`. Cursors are bound to the originating command, folder, query, and filter, while `--limit` and `--full` may change between pages. In `mail --json`, `folder` is the canonical folder ID string, and the first online listing of an uncached folder syncs the full folder delta once.
95
-
96
- Use `outlook mark` for read and flag changes, and `outlook move` to change folders. MCP `update_message` supports both. In the TUI, `Ctrl+S` saves the current composition. Reopening and saving reuses the draft ID. Reply, reply-all, and forward drafts retain their source message relationship and quoted HTML.
97
-
98
- ```sh
99
- outlook edit-draft DRAFT_ID --subject "Revised release notes" --json
100
- outlook edit-draft DRAFT_ID --body 'The **final** checklist is attached.' --json
101
- outlook update-event EVENT_ID --start 2026-11-23T09:00 --end 2026-11-23T09:30 --json
102
- outlook update-task TASK_ID --list tasks --due 2026-11-25 --json
103
- ```
104
-
105
- Each edit sends the specified fields. A draft subject change preserves the original body and its markup. Use `--body-html` to supply replacement HTML directly. Calendar edits leave the body, attendees, and recurrence out of the request. To Do edits leave the body and checklist out of the request. [Message updates](https://learn.microsoft.com/en-us/graph/api/message-update?view=graph-rest-1.0) · [Event updates](https://learn.microsoft.com/en-us/graph/api/event-update?view=graph-rest-1.0) · [To Do updates](https://learn.microsoft.com/en-us/graph/api/todotask-update?view=graph-rest-1.0)
106
-
107
- Calendar wall-clock times such as `2026-11-23T09:00` use the event's original Graph time zone. Use date-only values with all-day events and give the exclusive end date. RFC3339 values such as `2026-11-23T09:00:00+09:00` are sent in UTC for timed events. Non-UTC recurring events require wall-clock times. To Do dates use midnight UTC, and RFC3339 To Do timestamps are converted to UTC. [Event time and recurrence](https://learn.microsoft.com/en-us/graph/api/resources/event?view=graph-rest-1.0)
108
-
109
- ### Local HTTP REST API (`outlook serve`)
110
-
111
- Start an Axum JSON server on `127.0.0.1:3939` (with live `/openapi.json` and optional `--api-key` auth):
112
-
113
- ```bash
114
- outlook serve --port 3939
115
- curl http://127.0.0.1:3939/v1/mail/messages?folder=inbox&unread=true
116
- curl -X POST http://127.0.0.1:3939/v1/mail/send \
117
- -H "Content-Type: application/json" \
118
- -d '{"to":["elena.park@acme.dev"],"subject":"Build green","markdown":"All checks passed!"}'
119
- ```
120
-
121
- Full endpoint & schema docs: **[docs/API.md](docs/API.md)** · **[docs/openapi.yaml](docs/openapi.yaml)**
122
-
123
- ### MCP Server (`outlook mcp`)
124
-
125
- Exposes **23 Microsoft Outlook tools** over newline-delimited stdio JSON-RPC 2.0, including `update_draft`, `update_event`, and `update_task`.
126
-
127
- ```bash
128
- # Claude Code
129
- claude mcp add outlook -- outlook mcp
130
- ```
131
-
132
- ```json
133
- // Claude Desktop / Cursor / Windsurf MCP config
134
- {
135
- "mcpServers": {
136
- "outlook": {
137
- "command": "outlook",
138
- "args": ["mcp"]
139
- }
140
- }
141
- }
142
- ```
143
-
144
- Full tool schemas & client setups: **[docs/MCP.md](docs/MCP.md)** · **[docs/NPM.md](docs/NPM.md)**
145
-
146
- ---
147
-
148
- ## `@bitefoundry` Enterprise Terminal Suite
149
-
150
- | Package | Command | Domain | Interfaces |
151
- | --- | --- | --- | --- |
152
- | [`@bitefoundry/teams`](https://github.com/BiteFoundry/teams) | `teams` | Microsoft Teams (Chats, Channels, Threads, Presence) | TUI · CLI · HTTP · MCP |
153
- | **`@bitefoundry/outlook`** *(this repo)* | `outlook` | Microsoft Outlook (Mail, Calendar, To Do, Contacts) | TUI · CLI · HTTP · MCP |
154
- | [`@bitefoundry/onenote`](https://github.com/BiteFoundry/onenote) | `onenote` | Microsoft OneNote (Notebooks, Sections, Pages) | TUI · CLI · HTTP · MCP |
155
- | [`@bitefoundry/sharepoint`](https://github.com/BiteFoundry/sharepoint) | `sharepoint`, `bitefoundry-onedrive` | SharePoint & OneDrive (Sites, Drives, Lists, Files) | TUI · CLI · HTTP · MCP |
156
- | [`@bitefoundry/atlassian`](https://github.com/BiteFoundry/atlassian) | `atlassian`, `confluence`, `conf` | Jira & Confluence (Issues, Boards, Sprints, Wiki) | TUI · CLI · HTTP · MCP |
157
- | [`@bitefoundry/notion`](https://github.com/BiteFoundry/notion) | `notion` | Notion (Pages, Databases, Blocks, Comments) | TUI · CLI · HTTP · MCP |
158
-
159
- ---
160
-
161
- ## License & Disclaimer
162
-
163
- Licensed under the [MIT License](https://opensource.org/license/mit).
164
-
165
- Unofficial terminal client for Microsoft Outlook. Not affiliated with, endorsed by, or sponsored by Microsoft Corporation.
1
+ <div align="center">
2
+
3
+ # `outlook`
4
+
5
+ **Manage Outlook mail, calendar events, contacts, and Microsoft To Do from the terminal.**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/%40bitefoundry%2Foutlook?color=7aa2f7&label=%40bitefoundry%2Foutlook&logo=npm)](https://www.npmjs.com/package/@bitefoundry/outlook)
8
+ [![Platforms](https://img.shields.io/badge/platforms-Windows%20%7C%20macOS%20%7C%20Linux-565f89)](docs/NPM.md)
9
+ [![Built with Rust & Ratatui](https://img.shields.io/badge/Rust-Ratatui-e0af68?logo=rust&logoColor=white)](https://ratatui.rs)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-9ece6a)](LICENSE)
11
+
12
+ [BiteFoundry](https://bitefoundry.dev/#app-outlook) · [Latest release notes](https://github.com/BiteFoundry/outlook/releases/latest)
13
+
14
+ <br />
15
+
16
+ ![outlook TUI Demo](https://raw.githubusercontent.com/BiteFoundry/outlook/master/assets/demo.gif)
17
+
18
+ </div>
19
+
20
+ ---
21
+
22
+ ## Highlights
23
+
24
+ | Pillar | What You Get |
25
+ | --- | --- |
26
+ | **Minimal-Chrome TUI** | 3-tier responsive `ratatui` workspace across **Mail** (`1`), **Calendar** (`2`), and **Microsoft To Do** (`3`) with HTML-rendered email preview, inline `href` toggle (`h`), Link Extractor (`u`), quoted-reply folding (`z`), structured Compose modal (`c`), `zoxide` File Picker (`Ctrl+F`), and `Ctrl+K` Omni-Switcher. |
27
+ | **High-Res Terminal Images** | Native inline rendering for attached and `cid:`/`https://` email images across **Kitty**, **iTerm2 (`OSC 1337`)**, **Sixel (`DCS q`)**, and **24-bit Half-Blocks (`▀`)** fallback with live zoom (`+`/`-`/`0`) and protocol cycling (`p`). |
28
+ | **Local SQLite FTS5 + IPC Daemon** | Bundled SQLite WAL + FTS5 cache (`cache.db`) with incremental delta sync, `$batch` neighbor hydration, optimistic triage (`archive`, `flag`, `mark-read`, `complete`), offline search, and cached CLI reads via `outlook daemon`. |
29
+ | **4-in-1 Agent Interface** | One static binary (Windows, macOS, Linux **GLIBC 2.28 / AlmaLinux 8+**) delivers **TUI**, scriptable **CLI (`--json`)**, **Axum HTTP REST API (`outlook serve`, `:3939`)**, and **stdio MCP server (`outlook mcp`, 23 tools)**. |
30
+
31
+ ---
32
+
33
+ ## Quick Start
34
+
35
+ ```bash
36
+ # 1. Install the native CLI via npm
37
+ npm i -g @bitefoundry/outlook
38
+
39
+ # 2. Authenticate with Microsoft Entra ID (or automatically reuse your @bitefoundry/teams M365 session!)
40
+ outlook login
41
+
42
+ # 3. Launch the interactive TUI
43
+ outlook
44
+ ```
45
+
46
+ ```sh
47
+ outlook read MESSAGE_ID --json
48
+ ```
49
+
50
+ Read a message and its attachment metadata. To save a file, use `outlook download MESSAGE_ID --attachment ATTACHMENT_ID --dir .`. For full detail, add `--full` in the CLI or pass `compact: false` to `get_message` in MCP.
51
+
52
+ For a company registration, use `outlook login --client-id YOUR_CLIENT_ID --tenant-id YOUR_TENANT_ID`. Without an override, Outlook uses the Microsoft Graph Command Line Tools client for its own interactive login. [Register a desktop app](https://github.com/BiteFoundry/teams/blob/master/docs/ENTERPRISE.md) · [Outlook delegated permissions](docs/NPM.md#required-microsoft-graph-delegated-scopes)
53
+
54
+ > **Shared M365 Session & Token Brokers:** When `share_m365_auth = true` (default), `outlook` seamlessly reuses or upgrades an existing `@bitefoundry/teams` session without a second browser login. Also supports `--device-code`, `OUTLOOK_ACCESS_TOKEN`, `OUTLOOK_TOKEN_FILE`, `OUTLOOK_TOKEN_REFRESH_CMD` (`az account get-access-token`), and custom Entra ID apps. Run `outlook whoami` or `outlook doctor --online` for JWT scope diagnostics.
55
+
56
+ Update a global npm install with `npm install -g @bitefoundry/outlook@latest`. For a standalone binary from [GitHub Releases](https://github.com/BiteFoundry/outlook/releases), use `outlook update`.
57
+
58
+ ---
59
+
60
+ ## Keybindings Cheat Sheet
61
+
62
+ | Key | Context | Action |
63
+ | --- | --- | --- |
64
+ | `1` / `2` / `3` (`Alt+1..3`) | Global | Switch **Mail** / **Calendar** / **To Do Tasks** tabs |
65
+ | `Ctrl+K` | Global | **Omni-Switcher / Command Palette** (`>` commands, `#` folders, `@` contacts, `/` search) |
66
+ | `j` / `k` / `↑` / `↓` | Global | Navigate folders, message list, calendar agenda, tasks, or reading pane |
67
+ | `Tab` / `Enter` / `Esc` | Global | Cycle pane focus (`Folders ↔ List ↔ Reader`) or close modal |
68
+ | `c` / `r` / `R` / `f` | Mail | **Compose** / **Reply** / **Reply-All** / **Forward** (Markdown + `Ctrl+F` attach + `Ctrl+V` image) |
69
+ | `C` / `Ctrl+S` | Mail / Compose | Start a separate composition / save the current draft to Outlook |
70
+ | `e` / `g` / `m` / `Del` | Mail | **Archive** / **Flag** / **Move to folder** / **Delete** (optimistic updates) |
71
+ | `h` / `u` / `z` | Mail Reader | Toggle inline `href` URLs / open **Link Extractor** / fold quoted reply history |
72
+ | `t` / `F` / `U` | Mail | Toggle **Thread grouping** / **Focused Inbox** / **Unread filter** |
73
+ | `v` / `Alt+v` / `d` | Mail Reader | High-res **Inline Image Preview** / download latest attachment (`A` for picker) |
74
+ | `n` / `a` / `y` / `x` | Calendar | **New Event** / RSVP **Accept** (`a`), **Tentative** (`y`), **Decline** (`x`) |
75
+ | `Space` / `n` | Tasks | Toggle To Do completion (`Space`) / create new task or list (`n`) |
76
+ | `/` / `Ctrl+D` / `Ctrl+B` | Global | Search mail (FTS5 + Graph KQL) / toggle **Cozy / Compact** density / toggle sidebar |
77
+ | `Ctrl+,` / `?` / `Ctrl+Q` | Global | **Settings** / full help overlay / safe quit |
78
+
79
+ ---
80
+
81
+ ## CLI, HTTP API & MCP
82
+
83
+ ### CLI Examples
84
+
85
+ ```bash
86
+ # Mail: inspect inbox, read, reply, and send Markdown with attachments
87
+ outlook mail --folder inbox --unread --limit 20 --json
88
+ outlook read AAMkAGI2... --json
89
+ outlook read AAMkAGI2... --json --full
90
+ outlook read AAMkAGI2... --mark-read
91
+ outlook send --to elena.park@acme.dev --subject "v2.4 Release" \
92
+ --body "**All canary checks passed.** See attached benchmarks." \
93
+ --attach ./v24-benchmarks.pdf --importance high
94
+
95
+ # Calendar & To Do: view agenda, schedule Teams meeting, RSVP, and manage tasks
96
+ outlook calendar --days 7
97
+ outlook create-event --subject "Go / No-Go Review" \
98
+ --start "2026-11-20T14:00:00Z" --end "2026-11-20T14:45:00Z" \
99
+ --attendee elena.park@acme.dev --online
100
+ outlook add-task "Promote canary to 100%" --due 2026-11-20 --importance high
101
+ outlook daemon start
102
+ ```
103
+
104
+ JSON output for `mail`, `read`, `move`, `archive`, `search --remote`, `calendar`, and `event` is compact by default. Pass `--full` with `--json` for full cached fields, HTML bodies, and attachment metadata (`content_bytes_b64` is never embedded in CLI/MCP JSON; fetch attachment bytes with `outlook download`, or `outlook download --offline` for cached bytes). `--compact` remains a compatibility alias and conflicts with `--full`. Paginated JSON listings (`mail`, `search --remote`, `folders`, `task-lists`) include `returned`, `has_more`, and `next_cursor`; continue with `--cursor <CURSOR>`. Cursors are bound to the originating command, folder, query, and filter, while `--limit` and `--full` may change between pages. In `mail --json`, `folder` is the canonical folder ID string, and the first online listing of an uncached folder syncs the full folder delta once. In `search --remote --json`, `hits` holds local cache matches while `remote` holds Graph results, so the same message ID can appear in both arrays.
105
+
106
+ For `read`, `message_id` is an exact message ID; subject and ID-prefix resolution apply only to CLI `read --offline` (online callers should locate IDs with `search` first). Runtime failures with `--json` emit a structured JSON error object on stdout (`{"ok": false, "error": {"code": ..., "message": ...}}`) with exit code `1`; exit code `2` indicates a CLI usage/parsing error printed as plain text on stderr. For `sync --json` (and `doctor --online --json`), check the `ok` field in the JSON output to determine overall success.
107
+
108
+ Use `outlook mark` for read and flag changes, and `outlook move` to change folders. MCP `update_message` supports both. In the TUI, `Ctrl+S` saves the current composition. Reopening and saving reuses the draft ID. Reply, reply-all, and forward drafts retain their source message relationship and quoted HTML.
109
+
110
+ ```sh
111
+ outlook edit-draft DRAFT_ID --subject "Revised release notes" --json
112
+ outlook edit-draft DRAFT_ID --body 'The **final** checklist is attached.' --json
113
+ outlook update-event EVENT_ID --start 2026-11-23T09:00 --end 2026-11-23T09:30 --json
114
+ outlook update-task TASK_ID --list tasks --due 2026-11-25 --json
115
+ ```
116
+
117
+ Each edit sends the specified fields. A draft subject change preserves the original body and its markup. Use `--body-html` to supply replacement HTML directly. Calendar edits leave the body, attendees, and recurrence out of the request. To Do edits leave the body and checklist out of the request. [Message updates](https://learn.microsoft.com/en-us/graph/api/message-update?view=graph-rest-1.0) · [Event updates](https://learn.microsoft.com/en-us/graph/api/event-update?view=graph-rest-1.0) · [To Do updates](https://learn.microsoft.com/en-us/graph/api/todotask-update?view=graph-rest-1.0)
118
+
119
+ Calendar wall-clock times such as `2026-11-23T09:00` use the event's original Graph time zone. Use date-only values with all-day events and give the exclusive end date. RFC3339 values such as `2026-11-23T09:00:00+09:00` are sent in UTC for timed events. Non-UTC recurring events require wall-clock times. To Do dates use midnight UTC, and RFC3339 To Do timestamps are converted to UTC. [Event time and recurrence](https://learn.microsoft.com/en-us/graph/api/resources/event?view=graph-rest-1.0)
120
+
121
+ ### Local HTTP REST API (`outlook serve`)
122
+
123
+ Start an Axum JSON server on `127.0.0.1:3939` (with live `/openapi.json` and optional `--api-key` auth):
124
+
125
+ ```bash
126
+ outlook serve --port 3939
127
+ curl http://127.0.0.1:3939/v1/mail/messages?folder=inbox&unread=true
128
+ curl -X POST http://127.0.0.1:3939/v1/mail/send \
129
+ -H "Content-Type: application/json" \
130
+ -d '{"to":["elena.park@acme.dev"],"subject":"Build green","markdown":"All checks passed!"}'
131
+ ```
132
+
133
+ Full endpoint & schema docs: **[docs/API.md](docs/API.md)** · **[docs/openapi.yaml](docs/openapi.yaml)**
134
+
135
+ ### MCP Server (`outlook mcp`)
136
+
137
+ Exposes **23 Microsoft Outlook tools** over newline-delimited stdio JSON-RPC 2.0, including `update_draft`, `update_event`, and `update_task`.
138
+
139
+ ```bash
140
+ # Claude Code
141
+ claude mcp add outlook -- outlook mcp
142
+ ```
143
+
144
+ ```json
145
+ // Claude Desktop / Cursor / Windsurf MCP config
146
+ {
147
+ "mcpServers": {
148
+ "outlook": {
149
+ "command": "outlook",
150
+ "args": ["mcp"]
151
+ }
152
+ }
153
+ }
154
+ ```
155
+
156
+ Full tool schemas & client setups: **[docs/MCP.md](docs/MCP.md)** · **[docs/NPM.md](docs/NPM.md)**
157
+
158
+ ---
159
+
160
+ ## `@bitefoundry` Enterprise Terminal Suite
161
+
162
+ | Package | Command | Domain | Interfaces |
163
+ | --- | --- | --- | --- |
164
+ | [`@bitefoundry/teams`](https://github.com/BiteFoundry/teams) | `teams` | Microsoft Teams (Chats, Channels, Threads, Presence) | TUI · CLI · HTTP · MCP |
165
+ | **`@bitefoundry/outlook`** *(this repo)* | `outlook` | Microsoft Outlook (Mail, Calendar, To Do, Contacts) | TUI · CLI · HTTP · MCP |
166
+ | [`@bitefoundry/onenote`](https://github.com/BiteFoundry/onenote) | `onenote` | Microsoft OneNote (Notebooks, Sections, Pages) | TUI · CLI · HTTP · MCP |
167
+ | [`@bitefoundry/sharepoint`](https://github.com/BiteFoundry/sharepoint) | `sharepoint`, `bitefoundry-onedrive` | SharePoint & OneDrive (Sites, Drives, Lists, Files) | TUI · CLI · HTTP · MCP |
168
+ | [`@bitefoundry/atlassian`](https://github.com/BiteFoundry/atlassian) | `atlassian`, `confluence`, `conf` | Jira & Confluence (Issues, Boards, Sprints, Wiki) | TUI · CLI · HTTP · MCP |
169
+ | [`@bitefoundry/notion`](https://github.com/BiteFoundry/notion) | `notion` | Notion (Pages, Databases, Blocks, Comments) | TUI · CLI · HTTP · MCP |
170
+
171
+ ---
172
+
173
+ ## License & Disclaimer
174
+
175
+ Licensed under the [MIT License](https://opensource.org/license/mit).
176
+
177
+ Unofficial terminal client for Microsoft Outlook. Not affiliated with, endorsed by, or sponsored by Microsoft Corporation.