ask-marcel-office-cli 0.1.0 → 0.5.5

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.
Files changed (110) hide show
  1. package/README.md +112 -114
  2. package/dist/cli.js +1849 -585
  3. package/dist/commands.json +1436 -0
  4. package/dist/composition/build-deps.d.ts +5 -1
  5. package/dist/composition/cli.d.ts +12 -6
  6. package/dist/composition/package-manager.d.ts +2 -0
  7. package/dist/index.d.ts +6 -1
  8. package/dist/index.js +1666 -548
  9. package/dist/infra/browser-auth.d.ts +9 -2
  10. package/dist/infra/graph-client.d.ts +2 -0
  11. package/dist/infra/playwright-loader.d.ts +4 -0
  12. package/dist/infra/process-runner-bun.d.ts +2 -0
  13. package/dist/infra/process-runner-node.d.ts +2 -0
  14. package/dist/use-cases/commands/build-command.d.ts +1 -1
  15. package/dist/use-cases/commands/command-types.d.ts +21 -1
  16. package/dist/use-cases/commands/docs-render.d.ts +24 -0
  17. package/dist/use-cases/commands/docs.d.ts +10 -0
  18. package/dist/use-cases/commands/download-drive-item-version-content.d.ts +12 -0
  19. package/dist/use-cases/commands/download-onedrive-file-content.d.ts +3 -1
  20. package/dist/use-cases/commands/get-calendar-event.d.ts +3 -1
  21. package/dist/use-cases/commands/get-calendar-view.d.ts +7 -2
  22. package/dist/use-cases/commands/get-current-user.d.ts +3 -1
  23. package/dist/use-cases/commands/get-drive-delta.d.ts +3 -1
  24. package/dist/use-cases/commands/get-drive-item.d.ts +3 -1
  25. package/dist/use-cases/commands/get-drive-root-item.d.ts +3 -1
  26. package/dist/use-cases/commands/get-excel-range.d.ts +3 -1
  27. package/dist/use-cases/commands/get-excel-table.d.ts +3 -1
  28. package/dist/use-cases/commands/get-mail-attachment.d.ts +3 -1
  29. package/dist/use-cases/commands/get-mail-message.d.ts +3 -1
  30. package/dist/use-cases/commands/get-mailbox-settings.d.ts +3 -1
  31. package/dist/use-cases/commands/get-my-profile-photo.d.ts +6 -2
  32. package/dist/use-cases/commands/get-onenote-page-content.d.ts +6 -2
  33. package/dist/use-cases/commands/get-planner-bucket.d.ts +3 -1
  34. package/dist/use-cases/commands/get-planner-plan.d.ts +3 -1
  35. package/dist/use-cases/commands/get-planner-task-details.d.ts +3 -1
  36. package/dist/use-cases/commands/get-planner-task.d.ts +3 -1
  37. package/dist/use-cases/commands/get-sharepoint-site-by-path.d.ts +4 -2
  38. package/dist/use-cases/commands/get-sharepoint-site-drive-by-id.d.ts +3 -1
  39. package/dist/use-cases/commands/get-sharepoint-site-list-item.d.ts +3 -1
  40. package/dist/use-cases/commands/get-sharepoint-site-list.d.ts +3 -1
  41. package/dist/use-cases/commands/get-sharepoint-site.d.ts +3 -1
  42. package/dist/use-cases/commands/get-specific-calendar-event.d.ts +3 -1
  43. package/dist/use-cases/commands/get-specific-calendar-view.d.ts +5 -1
  44. package/dist/use-cases/commands/get-team-channel.d.ts +3 -1
  45. package/dist/use-cases/commands/get-team.d.ts +3 -1
  46. package/dist/use-cases/commands/get-todo-task.d.ts +3 -1
  47. package/dist/use-cases/commands/list-all-onenote-sections.d.ts +3 -1
  48. package/dist/use-cases/commands/list-calendar-event-instances.d.ts +5 -1
  49. package/dist/use-cases/commands/list-calendar-events-delta.d.ts +3 -1
  50. package/dist/use-cases/commands/list-calendar-events.d.ts +3 -1
  51. package/dist/use-cases/commands/list-calendar-view-delta.d.ts +7 -2
  52. package/dist/use-cases/commands/list-calendars.d.ts +3 -1
  53. package/dist/use-cases/commands/list-chat-members.d.ts +3 -1
  54. package/dist/use-cases/commands/list-drive-item-permissions.d.ts +3 -1
  55. package/dist/use-cases/commands/list-drive-item-versions.d.ts +3 -1
  56. package/dist/use-cases/commands/list-drives.d.ts +3 -1
  57. package/dist/use-cases/commands/list-excel-table-rows.d.ts +3 -1
  58. package/dist/use-cases/commands/list-excel-tables.d.ts +3 -1
  59. package/dist/use-cases/commands/list-excel-worksheets.d.ts +3 -1
  60. package/dist/use-cases/commands/list-folder-files.d.ts +3 -1
  61. package/dist/use-cases/commands/{get-sharepoint-sites-delta.d.ts → list-incomplete-planner-tasks.d.ts} +3 -1
  62. package/dist/use-cases/commands/list-incomplete-todo-tasks.d.ts +8 -0
  63. package/dist/use-cases/commands/list-joined-teams.d.ts +3 -1
  64. package/dist/use-cases/commands/list-mail-attachments.d.ts +3 -1
  65. package/dist/use-cases/commands/list-mail-child-folders.d.ts +3 -1
  66. package/dist/use-cases/commands/list-mail-folder-messages.d.ts +3 -1
  67. package/dist/use-cases/commands/list-mail-folders.d.ts +3 -1
  68. package/dist/use-cases/commands/list-mail-messages.d.ts +3 -1
  69. package/dist/use-cases/commands/list-mail-rules.d.ts +3 -1
  70. package/dist/use-cases/commands/list-onenote-notebook-sections.d.ts +3 -1
  71. package/dist/use-cases/commands/list-onenote-notebooks.d.ts +3 -1
  72. package/dist/use-cases/commands/list-onenote-section-pages.d.ts +3 -1
  73. package/dist/use-cases/commands/list-plan-buckets.d.ts +3 -1
  74. package/dist/use-cases/commands/list-plan-tasks.d.ts +3 -1
  75. package/dist/use-cases/commands/{list-chats.d.ts → list-planner-plans.d.ts} +3 -1
  76. package/dist/use-cases/commands/list-planner-tasks.d.ts +3 -1
  77. package/dist/use-cases/commands/list-sharepoint-site-drives.d.ts +3 -1
  78. package/dist/use-cases/commands/list-sharepoint-site-list-items.d.ts +3 -1
  79. package/dist/use-cases/commands/list-sharepoint-site-lists.d.ts +3 -1
  80. package/dist/use-cases/commands/list-specific-calendar-events.d.ts +3 -1
  81. package/dist/use-cases/commands/list-team-channels.d.ts +3 -1
  82. package/dist/use-cases/commands/list-todo-linked-resources.d.ts +3 -1
  83. package/dist/use-cases/commands/list-todo-task-lists.d.ts +3 -1
  84. package/dist/use-cases/commands/list-todo-tasks.d.ts +3 -1
  85. package/dist/use-cases/commands/{get-channel-files-folder.d.ts → next-page.d.ts} +4 -3
  86. package/dist/use-cases/commands/{get-chat-message.d.ts → search-mail-messages.d.ts} +4 -3
  87. package/dist/use-cases/commands/{get-channel-message.d.ts → search-my-documents.d.ts} +4 -4
  88. package/dist/use-cases/commands/search-onedrive-files.d.ts +3 -1
  89. package/dist/use-cases/commands/search-onenote-pages.d.ts +8 -0
  90. package/dist/use-cases/commands/{get-chat-message-hosted-content.d.ts → search-sharepoint-sites-by-name.d.ts} +4 -4
  91. package/dist/use-cases/commands/search-sharepoint-sites.d.ts +3 -1
  92. package/dist/use-cases/commands/update.d.ts +16 -0
  93. package/dist/use-cases/ports/process-runner.d.ts +11 -0
  94. package/docs/commands.json +1436 -0
  95. package/package.json +6 -3
  96. package/dist/use-cases/commands/get-channel-message-hosted-content.d.ts +0 -9
  97. package/dist/use-cases/commands/get-chat.d.ts +0 -6
  98. package/dist/use-cases/commands/get-outlook-contact.d.ts +0 -6
  99. package/dist/use-cases/commands/get-sharepoint-site-item.d.ts +0 -7
  100. package/dist/use-cases/commands/list-channel-message-hosted-contents.d.ts +0 -8
  101. package/dist/use-cases/commands/list-channel-message-replies.d.ts +0 -8
  102. package/dist/use-cases/commands/list-channel-messages.d.ts +0 -7
  103. package/dist/use-cases/commands/list-channel-tabs.d.ts +0 -7
  104. package/dist/use-cases/commands/list-chat-message-hosted-contents.d.ts +0 -7
  105. package/dist/use-cases/commands/list-chat-message-replies.d.ts +0 -7
  106. package/dist/use-cases/commands/list-chat-messages.d.ts +0 -6
  107. package/dist/use-cases/commands/list-outlook-contacts.d.ts +0 -4
  108. package/dist/use-cases/commands/list-pinned-chat-messages.d.ts +0 -6
  109. package/dist/use-cases/commands/list-sharepoint-site-items.d.ts +0 -6
  110. package/dist/use-cases/commands/list-team-members.d.ts +0 -6
package/README.md CHANGED
@@ -10,148 +10,141 @@ Microsoft Graph CLI — designed for LLM consumption via skills. Explicit comman
10
10
  |---------|-------------|
11
11
  | `login` | Authenticate (cached → refresh → browser fallback) |
12
12
  | `logout` | Clear cached tokens |
13
+ | `update` | Update ask-marcel to the latest version on npm (auto-detects npm vs bun) |
14
+ | `docs <cmd>` | Print Markdown docs for a single command (full machine-readable manifest at [`docs/commands.json`](docs/commands.json) or via `import manifest from 'ask-marcel-office-cli/commands.json'`) |
15
+
16
+ <!-- AUTO-GENERATED-COMMANDS:BEGIN -->
13
17
 
14
18
  ### OneDrive Files
15
19
 
16
- | Command | Description | Required params |
17
- |---------|-------------|-----------------|
18
- | `list-drives` | List all drives for the authenticated user | _(none)_ |
19
- | `get-drive-root-item` | Get the root folder of a drive | `--drive-id` |
20
- | `list-folder-files` | List children of a folder/item | `--drive-id`, `--item-id` |
21
- | `download-onedrive-file-content` | Get download URL for a file | `--drive-id`, `--item-id` |
22
- | `get-drive-item` | Get metadata for a file/folder | `--drive-id`, `--item-id` |
23
- | `list-drive-item-permissions` | List sharing permissions | `--drive-id`, `--item-id` |
24
- | `list-drive-item-versions` | List file versions | `--drive-id`, `--item-id` |
25
- | `search-onedrive-files` | Search files by query | `--drive-id`, `--query` |
26
- | `get-drive-delta` | Get changes since last sync | `--drive-id`, `--item-id` |
20
+ | Command | Description | Required params | Graph endpoint |
21
+ |---------|-------------|-----------------|----------------|
22
+ | `download-drive-item-version-content` | Download the binary content of a specific *non-current* historical version of a OneDrive / SharePoint file. Graph refuses to serve the current version through this endpoint with "You cannot get the content of the current version" — for the current version use `download-onedrive-file-content` instead. Same envelope as that command (302 → downloadUrl, or base64 bytes). | `--drive-id`, `--item-id`, `--version-id` | `GET /drives/{drive-id}/items/{item-id}/versions/{version-id}/content` |
23
+ | `download-onedrive-file-content` | Download the binary content of a file stored in OneDrive / SharePoint. Graph normally returns a 302 redirect to a pre-signed CDN URL, surfaced as `@microsoft.graph.downloadUrl`; if it returns bytes directly they are base64-encoded for safe JSON output. | `--drive-id`, `--item-id` | `GET /drives/{drive-id}/items/{item-id}/content` |
24
+ | `get-drive-delta` | Get the incremental change set (added / modified / deleted items) under a OneDrive / SharePoint folder. Use the `@odata.deltaLink` from a previous response to resume. | `--drive-id`, `--item-id` | `GET /drives/{drive-id}/items/{item-id}/delta()` |
25
+ | `get-drive-item` | Get the metadata (driveItem resource) of a single file or folder in OneDrive / SharePoint. | `--drive-id`, `--item-id` | `GET /drives/{drive-id}/items/{item-id}` |
26
+ | `get-drive-root-item` | Get the root folder (driveItem) of a OneDrive / SharePoint drive. | `--drive-id` | `GET /drives/{drive-id}/root` |
27
+ | `list-drive-item-permissions` | List the sharing permissions on a OneDrive / SharePoint file or folder. | `--drive-id`, `--item-id` | `GET /drives/{drive-id}/items/{item-id}/permissions` |
28
+ | `list-drive-item-versions` | List the historical versions of a OneDrive / SharePoint file (each save creates a new version). | `--drive-id`, `--item-id` | `GET /drives/{drive-id}/items/{item-id}/versions` |
29
+ | `list-drives` | List all OneDrive / SharePoint drives the signed-in user has access to. | _(none)_ | `GET /me/drives` |
30
+ | `list-folder-files` | List the children (files and subfolders) of a folder in OneDrive / SharePoint. | `--drive-id`, `--item-id` | `GET /drives/{drive-id}/items/{item-id}/children` |
31
+ | `search-my-documents` | Search the signed-in user’s default OneDrive for documents matching a free-text query (filename, content, metadata). | `--query` | `GET /me/drive/search(q='{query}')` |
32
+ | `search-onedrive-files` | Search a single OneDrive / SharePoint drive for files and folders matching a free-text query. | `--drive-id`, `--query` | `GET /drives/{drive-id}/search(q='{query}')` |
27
33
 
28
34
  ### Excel (workbook files)
29
35
 
30
- | Command | Description | Required params |
31
- |---------|-------------|-----------------|
32
- | `list-excel-worksheets` | List worksheets in a workbook | `--drive-id`, `--item-id` |
33
- | `list-excel-tables` | List tables in a workbook | `--drive-id`, `--item-id` |
34
- | `get-excel-table` | Get table details | `--drive-id`, `--item-id`, `--table-id` |
35
- | `list-excel-table-rows` | List rows in a table | `--drive-id`, `--item-id`, `--table-id` |
36
- | `get-excel-range` | Get cell values by address | `--drive-id`, `--item-id`, `--worksheet-id`, `--address` |
36
+ | Command | Description | Required params | Graph endpoint |
37
+ |---------|-------------|-----------------|----------------|
38
+ | `get-excel-range` | Get the cell values, formulas, and formats of a specific Excel range (e.g. `A1:C10`). | `--drive-id`, `--item-id`, `--worksheet-id`, `--address` | `GET /drives/{drive-id}/items/{item-id}/workbook/worksheets/{worksheet-id}/range(address='{address}')` |
39
+ | `get-excel-table` | Get the metadata (style, header row, total row) of a single named Excel table. | `--drive-id`, `--item-id`, `--table-id` | `GET /drives/{drive-id}/items/{item-id}/workbook/tables/{table-id}` |
40
+ | `list-excel-table-rows` | List the data rows of a named Excel table (excluding the header row). | `--drive-id`, `--item-id`, `--table-id` | `GET /drives/{drive-id}/items/{item-id}/workbook/tables/{table-id}/rows` |
41
+ | `list-excel-tables` | List the named tables across every worksheet in an Excel workbook. | `--drive-id`, `--item-id` | `GET /drives/{drive-id}/items/{item-id}/workbook/tables` |
42
+ | `list-excel-worksheets` | List the worksheets (tabs) inside an Excel workbook stored in OneDrive / SharePoint. | `--drive-id`, `--item-id` | `GET /drives/{drive-id}/items/{item-id}/workbook/worksheets` |
37
43
 
38
44
  ### SharePoint Sites
39
45
 
40
- | Command | Description | Required params |
41
- |---------|-------------|-----------------|
42
- | `search-sharepoint-sites` | Search all SharePoint sites | _(none)_ |
43
- | `get-sharepoint-site` | Get site by ID | `--site-id` |
44
- | `get-sharepoint-sites-delta` | Get site changes since last sync | _(none)_ |
45
- | `get-sharepoint-site-by-path` | Get site by URL path | `--site-id`, `--path` |
46
- | `list-sharepoint-site-drives` | List drives on a site | `--site-id` |
47
- | `get-sharepoint-site-drive-by-id` | Get site drive by ID | `--site-id`, `--drive-id` |
48
- | `list-sharepoint-site-items` | List items on a site | `--site-id` |
49
- | `get-sharepoint-site-item` | Get site item by ID | `--site-id`, `--baseItem-id` |
50
- | `list-sharepoint-site-lists` | List lists on a site | `--site-id` |
51
- | `get-sharepoint-site-list` | Get list by ID | `--site-id`, `--list-id` |
52
- | `list-sharepoint-site-list-items` | List items in a list | `--site-id`, `--list-id` |
53
- | `get-sharepoint-site-list-item` | Get list item by ID | `--site-id`, `--list-id`, `--listItem-id` |
46
+ | Command | Description | Required params | Graph endpoint |
47
+ |---------|-------------|-----------------|----------------|
48
+ | `get-sharepoint-site` | Get the metadata of a single SharePoint site by its site ID. | `--site-id` | `GET /sites/{site-id}` |
49
+ | `get-sharepoint-site-by-path` | Resolve a SharePoint site by its hostname + server-relative path. Use this when you have a SharePoint URL (e.g. `https://contoso.sharepoint.com/sites/Marketing`) but no site ID. | `--hostname`, `--path` | `GET /sites/{hostname}:{path}` |
50
+ | `get-sharepoint-site-drive-by-id` | Get the metadata of a single document library (drive) on a SharePoint site by drive ID. | `--site-id`, `--drive-id` | `GET /sites/{site-id}/drives/{drive-id}` |
51
+ | `get-sharepoint-site-list` | Get the metadata (display name, template, columns) of a single SharePoint list. | `--site-id`, `--list-id` | `GET /sites/{site-id}/lists/{list-id}` |
52
+ | `get-sharepoint-site-list-item` | Get a single row (listItem) of a SharePoint list by ID. | `--site-id`, `--list-id`, `--list-item-id` | `GET /sites/{site-id}/lists/{list-id}/items/{list-item-id}` |
53
+ | `list-sharepoint-site-drives` | List the document libraries (drives) attached to a SharePoint site. | `--site-id` | `GET /sites/{site-id}/drives` |
54
+ | `list-sharepoint-site-list-items` | List the rows (listItem resources) of a single SharePoint list. | `--site-id`, `--list-id` | `GET /sites/{site-id}/lists/{list-id}/items` |
55
+ | `list-sharepoint-site-lists` | List all SharePoint lists (custom + built-in document libraries) on a site. | `--site-id` | `GET /sites/{site-id}/lists` |
56
+ | `search-sharepoint-sites` | List the SharePoint sites the signed-in user has access to (returns the followed sites by default). | _(none)_ | `GET /sites` |
57
+ | `search-sharepoint-sites-by-name` | Search the tenant for SharePoint sites whose display name or description matches a free-text query (returns up to 25). | `--query` | `GET /sites?search={query}` |
54
58
 
55
59
  ### Tasks (To Do + Planner)
56
60
 
57
- | Command | Description | Required params |
58
- |---------|-------------|-----------------|
59
- | `list-todo-task-lists` | List To Do task lists | _(none)_ |
60
- | `list-todo-tasks` | List tasks in a To Do list | `--todo-task-list-id` |
61
- | `get-todo-task` | Get a To Do task | `--todo-task-list-id`, `--todo-task-id` |
62
- | `list-todo-linked-resources` | List resources linked to a To Do task | `--todo-task-list-id`, `--todo-task-id` |
63
- | `list-planner-tasks` | List Planner tasks for user | _(none)_ |
64
- | `get-planner-plan` | Get Planner plan by ID | `--planner-plan-id` |
65
- | `list-plan-tasks` | List tasks in a Planner plan | `--planner-plan-id` |
66
- | `get-planner-task` | Get Planner task by ID | `--planner-task-id` |
67
- | `get-planner-task-details` | Get Planner task details | `--planner-task-id` |
68
- | `list-plan-buckets` | List buckets in a Planner plan | `--planner-plan-id` |
69
- | `get-planner-bucket` | Get Planner bucket by ID | `--planner-bucket-id` |
61
+ | Command | Description | Required params | Graph endpoint |
62
+ |---------|-------------|-----------------|----------------|
63
+ | `get-planner-bucket` | Get the metadata of a single Microsoft Planner bucket (column / lane). | `--planner-bucket-id` | `GET /planner/buckets/{planner-bucket-id}` |
64
+ | `get-planner-plan` | Get the metadata of a single Microsoft Planner plan (title, owner group, container). | `--planner-plan-id` | `GET /planner/plans/{planner-plan-id}` |
65
+ | `get-planner-task` | Get the metadata of a single Microsoft Planner task (title, assignees, dates, completion). | `--planner-task-id` | `GET /planner/tasks/{planner-task-id}` |
66
+ | `get-planner-task-details` | Get the rich details (description, checklist, references) of a Microsoft Planner task. | `--planner-task-id` | `GET /planner/tasks/{planner-task-id}/details` |
67
+ | `get-todo-task` | Get a single Microsoft To Do task by its ID and its parent list ID. | `--todo-task-list-id`, `--todo-task-id` | `GET /me/todo/lists/{todo-task-list-id}/tasks/{todo-task-id}` |
68
+ | `list-incomplete-planner-tasks` | List every incomplete Microsoft Planner task assigned to or owned by the signed-in user, across every plan. | _(none)_ | `GET /me/planner/tasks?$filter=percentComplete ne 100` |
69
+ | `list-incomplete-todo-tasks` | List every incomplete Microsoft To Do task in a given list (status not equal to `completed`). | `--todo-task-list-id` | `GET /me/todo/lists/{todo-task-list-id}/tasks?$filter=status ne 'completed'` |
70
+ | `list-plan-buckets` | List the buckets (columns / lanes) of a Microsoft Planner plan. | `--planner-plan-id` | `GET /planner/plans/{planner-plan-id}/buckets` |
71
+ | `list-plan-tasks` | List every task within a Microsoft Planner plan, regardless of completion status (Graph orders by `orderHint`). Use `list-incomplete-planner-tasks` for the across-plans incomplete view. | `--planner-plan-id` | `GET /planner/plans/{planner-plan-id}/tasks` |
72
+ | `list-planner-plans` | List every Microsoft Planner plan the signed-in user has access to (across every group). Use this to discover plan IDs without needing an existing task as the entry point. | _(none)_ | `GET /me/planner/plans` |
73
+ | `list-planner-tasks` | List every Microsoft Planner task assigned to or owned by the signed-in user, across all plans. | _(none)_ | `GET /me/planner/tasks` |
74
+ | `list-todo-linked-resources` | List the linked resources (URLs, emails, files) attached to a Microsoft To Do task. | `--todo-task-list-id`, `--todo-task-id` | `GET /me/todo/lists/{todo-task-list-id}/tasks/{todo-task-id}/linkedResources` |
75
+ | `list-todo-task-lists` | List the signed-in user’s Microsoft To Do task lists (e.g. `Tasks`, `Flagged Emails`, custom lists). | _(none)_ | `GET /me/todo/lists` |
76
+ | `list-todo-tasks` | List every task in a single Microsoft To Do task list, regardless of completion status. Use `list-incomplete-todo-tasks` if you only want the open ones. | `--todo-task-list-id` | `GET /me/todo/lists/{todo-task-list-id}/tasks` |
70
77
 
71
78
  ### Mail
72
79
 
73
- | Command | Description | Required params |
74
- |---------|-------------|-----------------|
75
- | `list-mail-messages` | List messages in inbox | _(none)_ |
76
- | `list-mail-folders` | List mail folders | _(none)_ |
77
- | `list-mail-child-folders` | List subfolders of a mail folder | `--mail-folder-id` |
78
- | `list-mail-folder-messages` | List messages in a mail folder | `--mail-folder-id` |
79
- | `get-mail-message` | Get a message by ID | `--message-id` |
80
- | `list-mail-attachments` | List attachments on a message | `--message-id` |
81
- | `get-mail-attachment` | Get an attachment by ID | `--message-id`, `--attachment-id` |
82
- | `list-mail-rules` | List message rules for a folder | `--mail-folder-id` |
83
- | `get-mailbox-settings` | Get mailbox settings | _(none)_ |
80
+ | Command | Description | Required params | Graph endpoint |
81
+ |---------|-------------|-----------------|----------------|
82
+ | `get-mail-attachment` | Get a single attachment on an Outlook message (metadata, plus the base64 `contentBytes` for file attachments). | `--message-id`, `--attachment-id` | `GET /me/messages/{message-id}/attachments/{attachment-id}` |
83
+ | `get-mail-message` | Get a single Outlook message by ID, including subject, sender, body, and flags. | `--message-id` | `GET /me/messages/{message-id}` |
84
+ | `get-mailbox-settings` | Get the signed-in user’s Outlook mailbox settings (timezone, working hours, automatic replies). | _(none)_ | `GET /me/mailboxSettings` |
85
+ | `list-mail-attachments` | List the attachments (file, item, reference) on a single Outlook message. | `--message-id` | `GET /me/messages/{message-id}/attachments` |
86
+ | `list-mail-child-folders` | List the subfolders of a single Outlook mail folder (e.g. subfolders of Inbox). | `--mail-folder-id` | `GET /me/mailFolders/{mail-folder-id}/childFolders` |
87
+ | `list-mail-folder-messages` | List the messages inside a specific Outlook mail folder (Inbox, custom folder, etc.). | `--mail-folder-id` | `GET /me/mailFolders/{mail-folder-id}/messages` |
88
+ | `list-mail-folders` | List the top-level mail folders in the signed-in user’s Outlook mailbox (Inbox, Sent Items, etc.). | _(none)_ | `GET /me/mailFolders` |
89
+ | `list-mail-messages` | List the most recent messages from across the signed-in user’s entire Outlook mailbox (every folder including Sent, Archive, Junk; default sort `receivedDateTime` desc). Use `list-mail-folder-messages` to scope to a single folder such as Inbox. | _(none)_ | `GET /me/messages` |
90
+ | `list-mail-rules` | List the inbox / folder rules attached to a single Outlook mail folder. | `--mail-folder-id` | `GET /me/mailFolders/{mail-folder-id}/messageRules` |
91
+ | `search-mail-messages` | Search the signed-in user’s entire Outlook mailbox using KQL or free text. Results are ranked by Graph relevance. | `--query` | `GET /me/messages?$search="{query}"` |
84
92
 
85
93
  ### Notes (OneNote)
86
94
 
87
- | Command | Description | Required params |
88
- |---------|-------------|-----------------|
89
- | `list-onenote-notebooks` | List OneNote notebooks | _(none)_ |
90
- | `list-onenote-notebook-sections` | List sections in a notebook | `--notebook-id` |
91
- | `list-all-onenote-sections` | List all sections across notebooks | _(none)_ |
92
- | `list-onenote-section-pages` | List pages in a section | `--onenote-section-id` |
93
- | `get-onenote-page-content` | Get OneNote page content | `--onenote-page-id` |
95
+ | Command | Description | Required params | Graph endpoint |
96
+ |---------|-------------|-----------------|----------------|
97
+ | `get-onenote-page-content` | Get the HTML body of a single OneNote page. Returned in a JSON envelope so the HTML survives transport. | `--onenote-page-id` | `GET /me/onenote/pages/{onenote-page-id}/content` |
98
+ | `list-all-onenote-sections` | List every OneNote section the signed-in user can see, across all notebooks. | _(none)_ | `GET /me/onenote/sections` |
99
+ | `list-onenote-notebook-sections` | List the top-level sections of a single OneNote notebook (flat — does NOT recurse into section groups; use `list-all-onenote-sections` to flatten every notebook the user has access to). | `--notebook-id` | `GET /me/onenote/notebooks/{notebook-id}/sections` |
100
+ | `list-onenote-notebooks` | List the OneNote notebooks the signed-in user owns or has access to (sorted by `createdDateTime` desc by Graph; soft-deleted notebooks excluded). | _(none)_ | `GET /me/onenote/notebooks` |
101
+ | `list-onenote-section-pages` | List the pages inside a single OneNote section. | `--onenote-section-id` | `GET /me/onenote/sections/{onenote-section-id}/pages` |
102
+ | `search-onenote-pages` | Find OneNote pages whose title contains a substring (case-sensitive — page content is NOT searched). Microsoft removed full-text OneNote `?search=` from v1.0 Graph; only $filter against `title` remains, which is what this command runs. | `--title-substring` | `GET /me/onenote/pages?$filter=contains(title,'{title-substring}')` |
94
103
 
95
104
  ### User
96
105
 
97
- | Command | Description | Required params |
98
- |---------|-------------|-----------------|
99
- | `get-current-user` | Get current user profile | _(none)_ |
100
- | `get-my-profile-photo` | Get current user profile photo | _(none)_ |
106
+ | Command | Description | Required params | Graph endpoint |
107
+ |---------|-------------|-----------------|----------------|
108
+ | `get-current-user` | Return the signed-in user’s Microsoft Graph profile (id, displayName, mail, jobTitle, etc.). | _(none)_ | `GET /me` |
109
+ | `get-my-profile-photo` | Download the signed-in user’s profile photo (largest available size). Returned as a base64 envelope so the binary survives JSON output. | _(none)_ | `GET /me/photo/$value` |
101
110
 
102
111
  ### Calendar
103
112
 
104
- | Command | Description | Required params |
105
- |---------|-------------|-----------------|
106
- | `list-calendars` | List all calendars | _(none)_ |
107
- | `list-calendar-events` | List events in default calendar | _(none)_ |
108
- | `get-calendar-event` | Get event by ID | `--event-id` |
109
- | `list-specific-calendar-events` | List events in a specific calendar | `--calendar-id` |
110
- | `get-specific-calendar-event` | Get event in a specific calendar | `--calendar-id`, `--event-id` |
111
- | `get-calendar-view` | Get calendar view (expanded recurrences) | _(none)_ |
112
- | `get-specific-calendar-view` | Get calendar view for a specific calendar | `--calendar-id` |
113
- | `list-calendar-event-instances` | List instances of a recurring event | `--calendar-id`, `--event-id` |
114
- | `list-calendar-events-delta` | Incremental sync of events | _(none)_ |
115
- | `list-calendar-view-delta` | Incremental sync within a time window | _(none)_ |
116
-
117
- ### Contacts
118
-
119
- | Command | Description | Required params |
120
- |---------|-------------|-----------------|
121
- | `list-outlook-contacts` | List Outlook contacts | _(none)_ |
122
- | `get-outlook-contact` | Get contact by ID | `--contact-id` |
113
+ | Command | Description | Required params | Graph endpoint |
114
+ |---------|-------------|-----------------|----------------|
115
+ | `get-calendar-event` | Fetch a single calendar event by ID from the signed-in user’s default calendar. | `--event-id` | `GET /me/events/{event-id}` |
116
+ | `get-calendar-view` | List the signed-in user’s default-calendar events with recurrence expanded into individual occurrences in a date range. Both ISO date-time params are required by Graph. | `--start-date-time`, `--end-date-time` | `GET /me/calendarView?startDateTime={start-date-time}&endDateTime={end-date-time}` |
117
+ | `get-specific-calendar-event` | Fetch a single calendar event by ID from a specific (non-default) calendar. | `--calendar-id`, `--event-id` | `GET /me/calendars/{calendar-id}/events/{event-id}` |
118
+ | `get-specific-calendar-view` | List the events in a specific (non-default) calendar with recurrence expanded into individual occurrences in a date range. Both ISO date-time params are required by Graph. | `--calendar-id`, `--start-date-time`, `--end-date-time` | `GET /me/calendars/{calendar-id}/calendarView?startDateTime={start-date-time}&endDateTime={end-date-time}` |
119
+ | `list-calendar-event-instances` | List the individual occurrences of a recurring calendar event over a date range. Both ISO date-time params are required by Graph. | `--calendar-id`, `--event-id`, `--start-date-time`, `--end-date-time` | `GET /me/calendars/{calendar-id}/events/{event-id}/instances?startDateTime={start-date-time}&endDateTime={end-date-time}` |
120
+ | `list-calendar-events` | List the events in the signed-in user’s default calendar (does not expand recurrences). | _(none)_ | `GET /me/events` |
121
+ | `list-calendar-events-delta` | Get the incremental change set (added / modified / deleted events) for the signed-in user’s default calendar. Use the `@odata.deltaLink` from a previous response to resume. | _(none)_ | `GET /me/events/delta()` |
122
+ | `list-calendar-view-delta` | Get the first page of the incremental change set of expanded calendar-view occurrences over a date range. Subsequent pages: feed the returned `@odata.nextLink` to `next-page`; resume later via the `@odata.deltaLink`. | `--start-date-time`, `--end-date-time` | `GET /me/calendarView/delta()?startDateTime={start-date-time}&endDateTime={end-date-time}` |
123
+ | `list-calendars` | List the calendars in the signed-in user’s mailbox (default + secondary calendars + shared calendars). | _(none)_ | `GET /me/calendars` |
124
+ | `list-specific-calendar-events` | List the events in a specific (non-default) calendar (does not expand recurrences). | `--calendar-id` | `GET /me/calendars/{calendar-id}/events` |
123
125
 
124
126
  ### Chats
125
127
 
126
- | Command | Description | Required params |
127
- |---------|-------------|-----------------|
128
- | `list-chats` | List Teams chats | _(none)_ |
129
- | `get-chat` | Get chat by ID | `--chat-id` |
130
- | `list-chat-members` | List chat members | `--chat-id` |
131
- | `list-chat-messages` | List chat messages | `--chat-id` |
132
- | `get-chat-message` | Get chat message by ID | `--chat-id`, `--chat-message-id` |
133
- | `list-chat-message-hosted-contents` | List message hosted content | `--chat-id`, `--chat-message-id` |
134
- | `get-chat-message-hosted-content` | Get hosted content bytes | `--chat-id`, `--chat-message-id`, `--chat-message-hosted-content-id` |
135
- | `list-chat-message-replies` | List message replies | `--chat-id`, `--chat-message-id` |
136
- | `list-pinned-chat-messages` | List pinned messages | `--chat-id` |
128
+ | Command | Description | Required params | Graph endpoint |
129
+ |---------|-------------|-----------------|----------------|
130
+ | `list-chat-members` | List the members of a single Microsoft Teams chat. | `--chat-id` | `GET /chats/{chat-id}/members` |
137
131
 
138
132
  ### Teams
139
133
 
140
- | Command | Description | Required params |
141
- |---------|-------------|-----------------|
142
- | `list-joined-teams` | List joined Teams | _(none)_ |
143
- | `get-team` | Get team by ID | `--team-id` |
144
- | `list-team-channels` | List team channels | `--team-id` |
145
- | `get-team-channel` | Get channel by ID | `--team-id`, `--channel-id` |
146
- | `list-channel-messages` | List channel messages | `--team-id`, `--channel-id` |
147
- | `get-channel-message` | Get channel message by ID | `--team-id`, `--channel-id`, `--chat-message-id` |
148
- | `list-channel-message-hosted-contents` | List message hosted content | `--team-id`, `--channel-id`, `--chat-message-id` |
149
- | `get-channel-message-hosted-content` | Get hosted content bytes | `--team-id`, `--channel-id`, `--chat-message-id`, `--chat-message-hosted-content-id` |
150
- | `list-channel-message-replies` | List message replies | `--team-id`, `--channel-id`, `--chat-message-id` |
151
- | `list-channel-tabs` | List channel tabs | `--team-id`, `--channel-id` |
152
- | `list-team-members` | List team members | `--team-id` |
153
- | `get-channel-files-folder` | Get channel files folder | `--team-id`, `--channel-id` |
134
+ | Command | Description | Required params | Graph endpoint |
135
+ |---------|-------------|-----------------|----------------|
136
+ | `get-team` | Get the metadata of a single Microsoft Team (display name, settings, member-settings, owner group). | `--team-id` | `GET /teams/{team-id}` |
137
+ | `get-team-channel` | Get the metadata of a single channel inside a Microsoft Team. | `--team-id`, `--channel-id` | `GET /teams/{team-id}/channels/{channel-id}` |
138
+ | `list-joined-teams` | List the Microsoft Teams the signed-in user is a member of. | _(none)_ | `GET /me/joinedTeams` |
139
+ | `list-team-channels` | List the channels (standard, private, shared) inside a single Microsoft Team. | `--team-id` | `GET /teams/{team-id}/channels` |
140
+
141
+ ### Meta / Pagination
142
+
143
+ | Command | Description | Required params | Graph endpoint |
144
+ |---------|-------------|-----------------|----------------|
145
+ | `next-page` | Fetch the next page of a paginated Graph response. Pass the `@odata.nextLink` value returned by any list / search / delta command to walk pagination yourself. | `--url` | `GET {url}` |
154
146
 
147
+ <!-- AUTO-GENERATED-COMMANDS:END -->
155
148
  ## Install
156
149
 
157
150
  Requires Node ≥20 **or** Bun ≥1.0 on the user's machine. Works on Windows, macOS, and Linux.
@@ -185,6 +178,9 @@ ask-marcel search-sharepoint-sites
185
178
  # list SharePoint site lists
186
179
  ask-marcel list-sharepoint-site-lists --site-id contoso.sharepoint.com,1234-5678
187
180
 
181
+ # update to the latest version (auto-detects npm vs bun)
182
+ ask-marcel update
183
+
188
184
  # clear tokens
189
185
  ask-marcel logout
190
186
 
@@ -192,6 +188,8 @@ ask-marcel logout
192
188
  ask-marcel --help
193
189
  ```
194
190
 
191
+ `ask-marcel update` auto-detects whether the CLI was installed via npm or bun (based on the bin path) and reinstalls globally with the matching tool. You can still run the install manually: `npm i -g ask-marcel-office-cli@latest` or `bun add -g ask-marcel-office-cli@latest`.
192
+
195
193
  During development from a clone you can keep using `bun run src/main.ts <command>`.
196
194
 
197
195
  ## Usage (library)
@@ -240,7 +238,7 @@ Environment variables read at composition time:
240
238
 
241
239
  | Variable | Used by | Default |
242
240
  |---|---|---|
243
- | `LOG_LEVEL` | Winston logger | `info` |
241
+ | `ASKMARCEL_LOG_LEVEL` | Winston logger; all output goes to **stderr** (stdout reserved for command JSON). Namespaced so a generic `LOG_LEVEL` exported by another tool in your shell does not leak into ours. | `error` (use `info` or `debug` for troubleshooting) |
244
242
  | `HOME` / `USERPROFILE` | Default cache and browser-profile paths | _(required)_ |
245
243
  | `ASKMARCEL_BROWSER_PROFILE` | Override Playwright user-data-dir | _(none)_ |
246
244
 
@@ -249,10 +247,10 @@ Environment variables read at composition time:
249
247
  ## Quality gates (atelier four-check loop)
250
248
 
251
249
  ```bash
252
- bun test # 303 tests
250
+ bun test # full suite
253
251
  bun run lint # ESLint (0 warnings, 0 errors)
254
252
  bun run typecheck # tsc --noEmit
255
- bun run coverage # per-tier gates (100% domain + use-cases, 80% infra + composition + presenter)
253
+ bun run coverage # per-tier gates (100% on every tier: domain, use-cases, infra, composition, presenter)
256
254
  bun run mutate:changed # mutation testing on changed domain/use-case files (>90% kill threshold)
257
255
  ```
258
256