@bitefoundry/outlook 0.1.5 → 0.1.6

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/README.md CHANGED
@@ -1,145 +1,162 @@
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)](LICENSE)
11
-
12
- <br />
13
-
14
- ![outlook TUI Demo](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`, 20 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
- > **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.
45
-
46
- ---
47
-
48
- ## Keybindings Cheat Sheet
49
-
50
- | Key | Context | Action |
51
- | --- | --- | --- |
52
- | `1` / `2` / `3` (`Alt+1..3`) | Global | Switch **Mail** / **Calendar** / **To Do Tasks** tabs |
53
- | `Ctrl+K` | Global | **Omni-Switcher / Command Palette** (`>` commands, `#` folders, `@` contacts, `/` search) |
54
- | `j` / `k` / `↑` / `↓` | Global | Navigate folders, message list, calendar agenda, tasks, or reading pane |
55
- | `Tab` / `Enter` / `Esc` | Global | Cycle pane focus (`Folders ↔ List ↔ Reader`) or close modal |
56
- | `c` / `r` / `R` / `f` | Mail | **Compose** / **Reply** / **Reply-All** / **Forward** (Markdown + `Ctrl+F` attach + `Ctrl+V` image) |
57
- | `e` / `g` / `m` / `Del` | Mail | **Archive** / **Flag** / **Move to folder** / **Delete** (0ms optimistic updates) |
58
- | `h` / `u` / `z` | Mail Reader | Toggle inline `href` URLs / open **Link Extractor** / fold quoted reply history |
59
- | `t` / `F` / `U` | Mail | Toggle **Thread grouping** / **Focused Inbox** / **Unread filter** |
60
- | `v` / `Alt+v` / `d` | Mail Reader | High-res **Inline Image Preview** / download latest attachment (`A` for picker) |
61
- | `n` / `a` / `y` / `x` | Calendar | **New Event** / RSVP **Accept** (`a`), **Tentative** (`y`), **Decline** (`x`) |
62
- | `Space` / `n` | Tasks | Toggle To Do completion (`Space`) / create new task or list (`n`) |
63
- | `/` / `Ctrl+D` / `Ctrl+B` | Global | Search mail (FTS5 + Graph KQL) / toggle **Cozy / Compact** density / toggle sidebar |
64
- | `Ctrl+,` / `?` / `Ctrl+Q` | Global | **Settings** / full help overlay / safe quit |
65
-
66
- ---
67
-
68
- ## CLI, HTTP API & MCP
69
-
70
- ### CLI Examples
71
-
72
- ```bash
73
- # Mail: inspect inbox, read, reply, and send Markdown with attachments
74
- outlook mail --folder inbox --unread --limit 20 --json
75
- outlook read AAMkAGI2... --mark-read
76
- outlook send --to elena.park@acme.dev --subject "v2.4 Release" \
77
- --body "**All canary checks passed.** See attached benchmarks." \
78
- --attach ./v24-benchmarks.pdf --importance high
79
-
80
- # Calendar & To Do: view agenda, schedule Teams meeting, RSVP, and manage tasks
81
- outlook calendar --days 7
82
- outlook create-event --subject "Go / No-Go Review" \
83
- --start "2026-11-20T14:00:00Z" --end "2026-11-20T14:45:00Z" \
84
- --attendee elena.park@acme.dev --online
85
- outlook add-task "Promote canary to 100%" --due 2026-11-20 --importance high
86
- outlook daemon start
87
- ```
88
-
89
- ### Local HTTP REST API (`outlook serve`)
90
-
91
- Start an Axum JSON server on `127.0.0.1:3939` (with live `/openapi.json` and optional `--api-key` auth):
92
-
93
- ```bash
94
- outlook serve --port 3939
95
- curl http://127.0.0.1:3939/v1/mail/messages?folder=inbox&unread=true
96
- curl -X POST http://127.0.0.1:3939/v1/mail/send \
97
- -H "Content-Type: application/json" \
98
- -d '{"to":["elena.park@acme.dev"],"subject":"Build green","markdown":"All checks passed!"}'
99
- ```
100
-
101
- Full endpoint & schema docs: **[docs/API.md](docs/API.md)** · **[docs/openapi.yaml](docs/openapi.yaml)**
102
-
103
- ### MCP Server (`outlook mcp`)
104
-
105
- Exposes **20 Microsoft Outlook tools** (`whoami`, `list_mail_folders`, `list_messages`, `get_message`, `send_mail`, `reply_mail`, `forward_mail`, `update_message`, `delete_message`, `download_attachment`, `search_mail`, `list_events`, `create_event`, `respond_event`, `delete_event`, `list_todo_lists`, `list_tasks`, `create_task`, `complete_task`, `search_contacts`) over newline-delimited stdio JSON-RPC 2.0:
106
-
107
- ```bash
108
- # Claude Code
109
- claude mcp add outlook -- outlook mcp
110
- ```
111
-
112
- ```json
113
- // Claude Desktop / Cursor / Windsurf MCP config
114
- {
115
- "mcpServers": {
116
- "outlook": {
117
- "command": "outlook",
118
- "args": ["mcp"]
119
- }
120
- }
121
- }
122
- ```
123
-
124
- Full tool schemas & client setups: **[docs/MCP.md](docs/MCP.md)** · **[docs/NPM.md](docs/NPM.md)**
125
-
126
- ---
127
-
128
- ## `@bitefoundry` Enterprise Terminal Suite
129
-
130
- | Package | Command | Domain | Interfaces |
131
- | --- | --- | --- | --- |
132
- | [`@bitefoundry/teams`](https://github.com/BiteFoundry/teams) | `teams` | Microsoft Teams (Chats, Channels, Threads, Presence) | TUI · CLI · HTTP · MCP |
133
- | **`@bitefoundry/outlook`** *(this repo)* | `outlook` | Microsoft Outlook (Mail, Calendar, To Do, Contacts) | TUI · CLI · HTTP · MCP |
134
- | [`@bitefoundry/onenote`](https://github.com/BiteFoundry/onenote) | `onenote` | Microsoft OneNote (Notebooks, Sections, Pages) | TUI · CLI · HTTP · MCP |
135
- | [`@bitefoundry/sharepoint`](https://github.com/BiteFoundry/sharepoint) | `sharepoint` | SharePoint & OneDrive (Sites, Drives, Lists, Files) | TUI · CLI · HTTP · MCP |
136
- | [`@bitefoundry/atlassian`](https://github.com/BiteFoundry/atlassian) | `atlassian` | Jira & Confluence (Issues, Boards, Sprints, Wiki) | TUI · CLI · HTTP · MCP |
137
- | [`@bitefoundry/notion`](https://github.com/BiteFoundry/notion) | `notion` | Notion (Pages, Databases, Blocks, Comments) | TUI · CLI · HTTP · MCP |
138
-
139
- ---
140
-
141
- ## License & Disclaimer
142
-
143
- Licensed under the [MIT License](LICENSE).
144
-
145
- 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
+ **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
+ > **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.
45
+
46
+ ---
47
+
48
+ ## Keybindings Cheat Sheet
49
+
50
+ | Key | Context | Action |
51
+ | --- | --- | --- |
52
+ | `1` / `2` / `3` (`Alt+1..3`) | Global | Switch **Mail** / **Calendar** / **To Do Tasks** tabs |
53
+ | `Ctrl+K` | Global | **Omni-Switcher / Command Palette** (`>` commands, `#` folders, `@` contacts, `/` search) |
54
+ | `j` / `k` / `↑` / `↓` | Global | Navigate folders, message list, calendar agenda, tasks, or reading pane |
55
+ | `Tab` / `Enter` / `Esc` | Global | Cycle pane focus (`Folders ↔ List ↔ Reader`) or close modal |
56
+ | `c` / `r` / `R` / `f` | Mail | **Compose** / **Reply** / **Reply-All** / **Forward** (Markdown + `Ctrl+F` attach + `Ctrl+V` image) |
57
+ | `C` / `Ctrl+S` | Mail / Compose | Start a separate composition / save the current draft to Outlook |
58
+ | `e` / `g` / `m` / `Del` | Mail | **Archive** / **Flag** / **Move to folder** / **Delete** (0ms optimistic updates) |
59
+ | `h` / `u` / `z` | Mail Reader | Toggle inline `href` URLs / open **Link Extractor** / fold quoted reply history |
60
+ | `t` / `F` / `U` | Mail | Toggle **Thread grouping** / **Focused Inbox** / **Unread filter** |
61
+ | `v` / `Alt+v` / `d` | Mail Reader | High-res **Inline Image Preview** / download latest attachment (`A` for picker) |
62
+ | `n` / `a` / `y` / `x` | Calendar | **New Event** / RSVP **Accept** (`a`), **Tentative** (`y`), **Decline** (`x`) |
63
+ | `Space` / `n` | Tasks | Toggle To Do completion (`Space`) / create new task or list (`n`) |
64
+ | `/` / `Ctrl+D` / `Ctrl+B` | Global | Search mail (FTS5 + Graph KQL) / toggle **Cozy / Compact** density / toggle sidebar |
65
+ | `Ctrl+,` / `?` / `Ctrl+Q` | Global | **Settings** / full help overlay / safe quit |
66
+
67
+ ---
68
+
69
+ ## CLI, HTTP API & MCP
70
+
71
+ ### CLI Examples
72
+
73
+ ```bash
74
+ # Mail: inspect inbox, read, reply, and send Markdown with attachments
75
+ outlook mail --folder inbox --unread --limit 20 --json --compact
76
+ outlook read AAMkAGI2... --json --compact
77
+ outlook read AAMkAGI2... --mark-read
78
+ outlook send --to elena.park@acme.dev --subject "v2.4 Release" \
79
+ --body "**All canary checks passed.** See attached benchmarks." \
80
+ --attach ./v24-benchmarks.pdf --importance high
81
+
82
+ # Calendar & To Do: view agenda, schedule Teams meeting, RSVP, and manage tasks
83
+ outlook calendar --days 7
84
+ outlook create-event --subject "Go / No-Go Review" \
85
+ --start "2026-11-20T14:00:00Z" --end "2026-11-20T14:45:00Z" \
86
+ --attendee elena.park@acme.dev --online
87
+ outlook add-task "Promote canary to 100%" --due 2026-11-20 --importance high
88
+ outlook daemon start
89
+ ```
90
+
91
+ Use `--compact` with `--json` to list message headers or read headers and the complete plain-text body. Use `read --json` for HTML and attachment details.
92
+
93
+ 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.
94
+
95
+ ```sh
96
+ outlook edit-draft DRAFT_ID --subject "Revised release notes" --json
97
+ outlook edit-draft DRAFT_ID --body 'The **final** checklist is attached.' --json
98
+ outlook update-event EVENT_ID --start 2026-11-23T09:00 --end 2026-11-23T09:30 --json
99
+ outlook update-task TASK_ID --list tasks --due 2026-11-25 --json
100
+ ```
101
+
102
+ 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)
103
+
104
+ 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)
105
+
106
+ ### Local HTTP REST API (`outlook serve`)
107
+
108
+ Start an Axum JSON server on `127.0.0.1:3939` (with live `/openapi.json` and optional `--api-key` auth):
109
+
110
+ ```bash
111
+ outlook serve --port 3939
112
+ curl http://127.0.0.1:3939/v1/mail/messages?folder=inbox&unread=true
113
+ curl -X POST http://127.0.0.1:3939/v1/mail/send \
114
+ -H "Content-Type: application/json" \
115
+ -d '{"to":["elena.park@acme.dev"],"subject":"Build green","markdown":"All checks passed!"}'
116
+ ```
117
+
118
+ Full endpoint & schema docs: **[docs/API.md](docs/API.md)** · **[docs/openapi.yaml](docs/openapi.yaml)**
119
+
120
+ ### MCP Server (`outlook mcp`)
121
+
122
+ Exposes **23 Microsoft Outlook tools** over newline-delimited stdio JSON-RPC 2.0, including `update_draft`, `update_event`, and `update_task`.
123
+
124
+ ```bash
125
+ # Claude Code
126
+ claude mcp add outlook -- outlook mcp
127
+ ```
128
+
129
+ ```json
130
+ // Claude Desktop / Cursor / Windsurf MCP config
131
+ {
132
+ "mcpServers": {
133
+ "outlook": {
134
+ "command": "outlook",
135
+ "args": ["mcp"]
136
+ }
137
+ }
138
+ }
139
+ ```
140
+
141
+ Full tool schemas & client setups: **[docs/MCP.md](docs/MCP.md)** · **[docs/NPM.md](docs/NPM.md)**
142
+
143
+ ---
144
+
145
+ ## `@bitefoundry` Enterprise Terminal Suite
146
+
147
+ | Package | Command | Domain | Interfaces |
148
+ | --- | --- | --- | --- |
149
+ | [`@bitefoundry/teams`](https://github.com/BiteFoundry/teams) | `teams` | Microsoft Teams (Chats, Channels, Threads, Presence) | TUI · CLI · HTTP · MCP |
150
+ | **`@bitefoundry/outlook`** *(this repo)* | `outlook` | Microsoft Outlook (Mail, Calendar, To Do, Contacts) | TUI · CLI · HTTP · MCP |
151
+ | [`@bitefoundry/onenote`](https://github.com/BiteFoundry/onenote) | `onenote`, `note` | Microsoft OneNote (Notebooks, Sections, Pages) | TUI · CLI · HTTP · MCP |
152
+ | [`@bitefoundry/sharepoint`](https://github.com/BiteFoundry/sharepoint) | `sharepoint`, `sp`, `onedrive`, `od` | SharePoint & OneDrive (Sites, Drives, Lists, Files) | TUI · CLI · HTTP · MCP |
153
+ | [`@bitefoundry/atlassian`](https://github.com/BiteFoundry/atlassian) | `atlassian`, `jira`, `confluence`, `conf` | Jira & Confluence (Issues, Boards, Sprints, Wiki) | TUI · CLI · HTTP · MCP |
154
+ | [`@bitefoundry/notion`](https://github.com/BiteFoundry/notion) | `notion`, `nt` | Notion (Pages, Databases, Blocks, Comments) | TUI · CLI · HTTP · MCP |
155
+
156
+ ---
157
+
158
+ ## License & Disclaimer
159
+
160
+ Licensed under the [MIT License](https://opensource.org/license/mit).
161
+
162
+ Unofficial terminal client for Microsoft Outlook. Not affiliated with, endorsed by, or sponsored by Microsoft Corporation.