Skip to content
Back to skills

Mogcli

ASecurity

Microsoft Ops Gadget — CLI for Microsoft 365 (Mail, Calendar, Drive, Contacts, Tasks, Word, PowerPoint, Excel, OneNote).

  • 21 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 7, 2026
documentationgobashdocumentation

Works with

  • cli

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill mogcli --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mogcli?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mogcli
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-mogcli/badge)](https://www.skillsdirectory.com/skills/modbender-mogcli)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mog
description: Microsoft Ops Gadget — CLI for Microsoft 365 (Mail, Calendar, Drive, Contacts, Tasks, Word, PowerPoint, Excel, OneNote).
---

# mog — Microsoft Ops Gadget

CLI for Microsoft 365: Mail, Calendar, OneDrive, Contacts, Tasks, Word, PowerPoint, Excel, OneNote.

The Microsoft counterpart to `gog` (Google Ops Gadget). Same patterns, different cloud.

## Quick Reference

For comprehensive usage, run:
```bash
mog --ai-help
```

This outputs the full dashdash-compliant documentation including:
- Setup/Prerequisites
- All commands and options
- Date/time formats
- Examples (positive and negative)
- Troubleshooting
- Slug system explanation
- gog compatibility notes

## Modules

| Module | Commands |
|--------|----------|
| **mail** | search, get, send, folders, drafts, attachment |
| **calendar** | list, create, get, update, delete, calendars, respond, freebusy, acl |
| **drive** | ls, search, download, upload, mkdir, move, rename, copy, rm |
| **contacts** | list, search, get, create, update, delete, directory |
| **tasks** | lists, list, add, done, undo, delete, clear |
| **word** | list, export, copy |
| **ppt** | list, export, copy |
| **excel** | list, get, update, append, create, metadata, tables, add-sheet, clear, copy, export |
| **onenote** | notebooks, sections, pages, get, create-notebook, create-section, create-page, delete, search |

## Quick Start

```bash
# Mail
mog mail search "from:someone" --max 10
mog mail send --to a@b.com --subject "Hi" --body "Hello"
mog mail send --to a@b.com --subject "Report" --body-file report.md
mog mail send --to a@b.com --subject "Newsletter" --body-html "<h1>Hello</h1>"
cat draft.txt | mog mail send --to a@b.com --subject "Hi" --body-file -

# Calendar
mog calendar list
mog calendar create --summary "Meeting" --from 2025-01-15T10:00:00 --to 2025-01-15T11:00:00
mog calendar freebusy alice@example.com bob@example.com

# Drive
mog drive ls
mog drive upload ./file.pdf
mog drive download <slug> --out ./file.pdf

# Tasks
mog tasks list
mog tasks add "Buy milk" --due tomorrow
mog tasks clear

# Contacts
mog contacts list
mog contacts directory "john"

# Excel
mog excel list
mog excel get <id> Sheet1 A1:D10
mog excel update <id> Sheet1 A1:B2 val1 val2 val3 val4
mog excel append <id> TableName col1 col2 col3

# OneNote
mog onenote notebooks
mog onenote search "meeting notes"
```

## Slugs

mog generates 8-character slugs for Microsoft's long GUIDs:
- `a3f2c891` instead of `AQMkADAwATMzAGZmAS04MDViLTRiNzgt...`
- All commands accept slugs or full IDs
- Use `--verbose` to see full IDs

## Aliases

- `mog cal` → `mog calendar`
- `mog todo` → `mog tasks`

## Credential Storage

OAuth tokens stored in config directory (0600 permissions):

| Platform | Location |
|----------|----------|
| **macOS** | `~/.config/mog/` |
| **Linux** | `~/.config/mog/` |
| **Windows** | `%USERPROFILE%\.config\mog\` |

Files:
- `tokens.json` - OAuth tokens (encrypted at rest by OS)
- `settings.json` - Client ID
- `slugs.json` - Slug cache

## See Also

- `mog --ai-help` - Full documentation
- `mog <command> --help` - Command-specific help

Files in this skill

  • CHANGELOG.md1.7 KB
  • README.md10.6 KB
  • SKILL.md3.2 KB
  • Taskfile.yml2.9 KB
  • cmd/mog/main.go850 B
  • internal/cli/ai_help.go7.2 KB
  • internal/cli/auth.go3.9 KB
  • internal/cli/auth_test.go3.3 KB
  • internal/cli/calendar.go14.5 KB
  • internal/cli/calendar_test.go19.7 KB
  • internal/cli/contacts.go8.1 KB
  • internal/cli/contacts_test.go12.5 KB
  • internal/cli/drive.go9.7 KB
  • internal/cli/drive_test.go15.7 KB
  • internal/cli/excel.go17.7 KB
  • internal/cli/excel_test.go22.1 KB
  • internal/cli/integration/integration_test.go10.7 KB
  • internal/cli/mail.go15 KB
  • internal/cli/mail_test.go22.9 KB
  • internal/cli/onenote.go8.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.