Microsoft Calendar CLI
for cmdhub.
Outlook calendars, events, free/busy windows, and open slots through Microsoft Graph.
cmdhub get mscal
data_object Agent Contract
Agents should start with auth/status and discovery commands, inspect schemas before composition, and treat commands marked as mutating as state-changing operations.
Output
Use human output for reading, `--json` for one object, and `--jsonl` for pipes.
Auth
Microsoft OAuth. Used for Outlook calendars, events, and availability.
Refs
Prefer list/search, then short refs or piped JSONL. Use `resolve` to inspect cached refs.
Schemas
Use `mscal schema` and `catalog.json` to inspect fields, flags, examples, and side effects.
Auth scopes
offline_accessUser.ReadCalendars.ReadWriteterminal Command Reference
Generated from source. Global flags apply to all commands.
Global Flags
--json
bool
Emit JSON machine output--jsonl
bool
Emit JSONL records for piping--output, -o
string
Compatibility output mode: json|jsonl. Prefer --json or --jsonl--view
string = summary
View mode: summary|full--profile
string = default
Config/auth profile--config
string
Config path override--quiet, -q
bool
Suppress non-essential diagnostics--debug
bool
Enable debug diagnostics--limit
int = 50
Maximum items to emit--page-size
int = 50
Requested upstream page size--cursor
string
Continuation cursor--no-paginate
bool
Fetch only one page--version, -v
bool
Print version informationmscal auth
Manage Microsoft Outlook Calendar authenticationmscal auth login
Authenticate with Microsoft Outlook Calendarmscal auth logout
Remove stored credentialsmscal auth refresh
Refresh stored tokenmscal auth status
Show auth statusmscal auth whoami
Show current calendar identitymscal calendar
Manage calendarsmscal calendar get
Get a calendarmscal calendar list
List calendarsmscal calendar search
Search calendars by summary--query
string
Search textmscal capabilities
Describe mscal capabilities, scopes, output modes, and schemasDescribe mscal capabilities, scopes, schemas, and the command contract.
The default machine output includes the full command contract so help, schemas, guidance, and conformance use the same inventory. Use –section for focused human or JSON views of scopes, schemas, or command paths.
--section
string
Focused section: scopes, schemas, or commandsmscal config
Inspect local configurationmscal config explain
Explain resolved configurationmscal doctor
Run mscal diagnosticsmscal event
Manage calendar eventsmscal event create
Create an eventCreate a timed or all-day event.
Time fields accept natural values such as “tomorrow 14:00”, relative values such as +1h, or RFC3339 timestamps such as 2026-05-30T14:00:00+02:00. Use –duration with –start for the common RFC3339 + duration + location shape. Timed events without –end or –duration default to 30 minutes.
Adding –attendee, –optional-attendee, or –room creates a Microsoft meeting and sends provider invitations. Pass –send-invites to confirm that external effect.
--all-day
bool
All-day event--attendee
stringArray = []
Required attendee email; repeat for multiple attendees--calendar
string = primary
Calendar selector--description
string
Description--duration
string
Duration--end
string
Event end--location
string
Location--optional-attendee
stringArray = []
Optional attendee email; repeat for multiple attendees--room
stringArray = []
Room email or resource attendee; repeat for multiple rooms--send-invites
bool
Confirm that attendee or room flags send Microsoft meeting invitations--start
string
Event start--title
string
Event title--yes, -y
bool
Accepted for compatibility; this command is already non-interactivemscal event delete
Delete an event--all
bool
Confirm batch event delete--calendar
string
Optional calendar selector--yes, -y
bool
Confirm destructive batch event deletemscal event get
Get an eventGet event details by local ref, provider ID, or event JSONL from stdin.
When stdin contains event JSONL items from event list/search, event get consumes the item id/provider_id plus calendar_id fields, fetches current provider details, and renders the retrieved event. The get output is already the usable detail view; a second “mscal event get e1” call is only needed if you intentionally want to re-open a new local ref.
--calendar
string
Optional calendar selectormscal event list
List events--calendar
string = primary
Calendar selector--from
string
Start time--to
string
End time; relative values such as +4h are relative to --from--today
bool
Today window--tomorrow
bool
Tomorrow window--week
bool
Week windowmscal event quick-add
Create an event from natural text--calendar
string = primary
Calendar selector--text
string
Quick-add text--yes, -y
bool
Accepted for compatibility; this command is already non-interactivemscal event search
Search eventsSearch events using Microsoft Calendar full-text query semantics.
Use plain text or tokens in –query, such as “dentist” or “project review”. Field-prefix filters such as title:review are not supported by this CLI surface.
For single-event detail, pipe JSONL search results into event get: mscal event search –query “project review” –jsonl | mscal event get
The same JSONL search stream can feed update or delete when it contains the exact event you intend to mutate: mscal event search –query “project review” –limit 1 –jsonl | mscal event update –location “Room 4” mscal event search –query “project review” –limit 1 –jsonl | mscal event delete –all –yes
--calendar
string = primary
Calendar selector--from
string
Start time--query
string
Search query--to
string
End time; relative values such as +4h are relative to --frommscal event update
Update an eventUpdate event fields.
Adding or changing attendees creates or updates a Microsoft meeting and can send provider invitations or updates. Pass –send-updates all when using attendee or room flags so the notification behavior is explicit.
--all-day
bool
All-day event--attendee
stringArray = []
Required attendee email; repeat for multiple attendees--calendar
string
Optional calendar selector--description
string
Description--duration
string
Duration--end
string
Event end--location
string
Location--optional-attendee
stringArray = []
Optional attendee email; repeat for multiple attendees--room
stringArray = []
Room email or resource attendee; repeat for multiple rooms--send-updates
string
Confirm attendee or room update notifications: all--start
string
Event start--title
string
Event title--yes, -y
bool
Accepted for compatibility; this command is already non-interactivemscal freebusy
Inspect busy windowsmscal freebusy get
Get busy windows for calendars--calendar
stringSlice = [primary]
Calendar selectors--from
string
Start time--schedule
stringSlice = []
Alias for --user; Microsoft Graph schedule email to include--to
string
End time; relative values such as +4h are relative to --from--user
stringSlice = []
User or schedule email to include; repeat or comma-separatemscal meeting-time
Find Microsoft Graph meeting-time suggestionsmscal meeting-time find
Find meeting-time suggestionsFind Microsoft Graph meeting-time suggestions for attendees and rooms.
This uses Microsoft Graph findMeetingTimes. Some personal Microsoft accounts or tenants do not support this scheduling surface; in that case mscal returns a provider-limit recovery screen and suggests free/busy or event list fallbacks.
--attendee
stringSlice = []
Required attendee email; repeat or comma-separate--duration
string = 30m
Meeting duration--from
string
Start time--room
stringSlice = []
Room email; repeat or comma-separate--to
string
End time; relative values such as +4h are relative to --frommscal profile
Manage provider profilesmscal profile create
Create an unauthenticated provider profilemscal profile delete
Delete a local provider profilemscal profile list
List provider profilesmscal profile rename
Rename a local provider profilemscal profile use
Set the default provider profilemscal resolve
Resolve a marker or short idmscal room
Discover Microsoft 365 roomsmscal room get
Get a roommscal room list
List roomsmscal room search
Search rooms--query
string
Room search textmscal schema
Emit mscal schema hints--in
bool
Show input schema--input
bool
Show input schema--out
bool
Show output schemamscal slot
Find open slotsmscal slot find
Find open slots across calendars--calendar
stringSlice = [primary]
Calendar selectors--duration
string = 30m
Minimum slot duration--from
string
Start time--to
string
End time; relative values such as +4h are relative to --frommscal version
Show mscal version informationplay_circle Live Examples
Output captured from a real workspace. Regenerate with
scripts/gen-docs.sh --update.
auth
Authenticated as kestrelphilip@outlook.com Next steps: - Calendars: mscal calendar list - Events: mscal event list --week - Capabilities: mscal capabilities
diagnostics
mscal doctor: WARN
Account: kestrelphilip@outlook.com
Checks: {id} ok, {id} warn, profiles ok, microsoft_oauth ok, token ok, scopes ok, mscal_api ok, local_timezone ok
CHECK STATUS DETAIL
{id} OK using file
{id} WARN credential backend stores local plaintext secrets
profiles OK active profile "kestrelphilip@outlook.com"
microsoft_oauth OK built-in Microsoft provider client is configured
token OK token expires at 2026-05-30T16:33:17Z
scopes OK stored token covers required Microsoft Outlook Calendar scopes
mscal_api OK calendar API reachable
local_timezone OK Local
Next steps:
- Status: mscal auth status
- Capabilities: mscal capabilitiescalendars
REF TITLE STATUS
c1 Calendar primary, writer
c2 Birthdays selected, reader
c3 South Africa holidays selected, reader
Next steps:
- Open: mscal calendar get c1
- Events: mscal event list --calendar c1 --week
- Freebusy: mscal freebusy get --calendar c1 --from {time} --to +8h
- Capabilities: mscal capabilitiesevents
No events found. Next steps: - List week: mscal event list --calendar primary --from 2026-05-30T00:00:00+02:00 --to 2026-05-31T00:00:00+02:00 - Create hold: mscal event create --calendar primary --title Hold --start +1h --duration 30m - Status: mscal auth status - Calendars: mscal calendar list
No events matched "eval". Next steps: - List week: mscal event list --calendar primary --from 2026-05-30T18:02:12+02:00 --to 2026-06-02T18:02:12+02:00 - Create hold: mscal event create --calendar primary --title Hold --start +1h --duration 30m - Status: mscal auth status - Calendars: mscal calendar list
freebusy
Status: free Busy windows Field Value --------- ----- Window Sat 30 May 18:02-Sun 31 May 02:02 Local Calendars primary No busy intervals found. Next steps: - Find slots: mscal slot find --calendar primary --from 2026-05-30T16:02:13Z --to 2026-05-31T00:02:13Z --duration 30m - Events: mscal event list --calendar primary --from 2026-05-30T16:02:13Z --to 2026-05-31T00:02:13Z - Calendars: mscal calendar list
alt_route Composition Patterns
Bridge your ecosystem with zero middleware.
mscal auth login
# Review today's calendar and inspect one event
mscal event list --today --limit 10
mscal event get e1
# Search, inspect, and resolve through short refs
mscal event search --query "project review" --limit 1 --jsonl \
| mscal event get
mscal resolve e1
# Create and clean up an event
mscal event create --title "Project review" --start "tomorrow 14:00" --duration 1h
mscal event delete e1
