Morgen calendar & tasks API CLI — unified access to calendars, events, tasks, and tags across connected providers
Printed by @nickscarabosio (Nick Scarabosio).
Quick Start
1. Install
See Install above.
2. Set Up Credentials
Get your API key from your API provider's developer portal. The key typically looks like a long alphanumeric string.
export MORGEN_API_KEY="<paste-your-key>"
You can also persist this in your config file at ~/.config/morgen/config.toml.
3. Verify Setup
morgen-pp-cli doctor
This checks your configuration and credentials.
4. Try Your First Command
morgen-pp-cli calendars list
Unique Features
These capabilities aren't available in any other tool for this API.
Cross-source synthesis
-
agenda — Unified chronological day view merging calendar events and due tasks across all connected accounts.
Reach for this to see everything on a day in one call instead of querying events per calendar and tasks separately.
morgen-pp-cli agenda --date 2026-06-16
Usage
Run morgen-pp-cli --help for the full command reference and flag list.
Commands
calendars
List calendars and update Morgen-specific calendar metadata
morgen-pp-cli calendars list - List calendars across all connected accounts
morgen-pp-cli calendars update - Update Morgen-specific metadata for a calendar (busy, color, name overrides)
events
List, create, update, and delete calendar events
morgen-pp-cli events create - Create an event in a calendar
morgen-pp-cli events delete - Delete an event. Use --series-update-mode for recurring events.
morgen-pp-cli events list - List events from one or more calendars in a time window
morgen-pp-cli events update - Update an event (patch). Use --series-update-mode for recurring events.
integrations
View connected accounts and available providers (read-only; connect/disconnect happens in the Morgen app)
morgen-pp-cli integrations accounts - List connected calendar/task accounts
morgen-pp-cli integrations providers - List available integration providers (Google, Microsoft 365, iCloud, Todoist, etc.)
tags
Manage tags
morgen-pp-cli tags create - Create a tag
morgen-pp-cli tags delete - Delete a tag
morgen-pp-cli tags get - Get a single tag by ID
morgen-pp-cli tags list - List tags
morgen-pp-cli tags update - Update a tag
tasks
Manage tasks across connected task providers
morgen-pp-cli tasks close - Mark a task complete
morgen-pp-cli tasks create - Create a task
morgen-pp-cli tasks delete - Delete a task
morgen-pp-cli tasks get - Get a single task by ID
morgen-pp-cli tasks list - List tasks
morgen-pp-cli tasks move - Reorder or re-parent a task
morgen-pp-cli tasks reopen - Reopen a completed task
morgen-pp-cli tasks update - Update a task (patch)
Output Formats
# Human-readable table (default in terminal, JSON when piped)
morgen-pp-cli calendars list
# JSON for scripting and agents
morgen-pp-cli calendars list --json
# Filter to specific fields
morgen-pp-cli calendars list --json --select id,name,status
# Dry run — show the request without sending
morgen-pp-cli calendars list --dry-run
# Agent mode — JSON + compact + no prompts in one flag
morgen-pp-cli calendars list --agent
Agent Usage
This CLI is designed for AI agent consumption:
- Non-interactive - never prompts, every input is a flag
- Pipeable -
--json output to stdout, errors to stderr
- Filterable -
--select id,name returns only fields you need
- Previewable -
--dry-run shows the request without sending
- Explicit retries - add
--idempotent to create retries when a no-op success is acceptable
- Confirmable -
--yes for explicit confirmation of destructive actions
- Piped input - write commands can accept structured input when their help lists
--stdin
- Offline-friendly - sync/search commands can use the local SQLite store when available
- Agent-safe by default - no colors or formatting unless
--human-friendly is set
Exit codes: 0 success, 2 usage error, 3 not found, 4 auth error, 5 API error, 7 rate limited, 10 config error.
Health Check
morgen-pp-cli doctor
Verifies configuration, credentials, and connectivity to the API.
Configuration
Config file: ~/.config/morgen/config.toml
Static request headers can be configured under headers; per-command header overrides take precedence.
Environment variables:
| Name | Kind | Required | Description |
|---|
MORGEN_API_KEY | per_call | Yes | Set to your API credential. |
Troubleshooting
Authentication errors (exit code 4)
- Run
morgen-pp-cli doctor to check credentials
- Verify the environment variable is set:
echo $MORGEN_API_KEY
Not found errors (exit code 3)
- Check the resource ID is correct
- Run the
list command to see available items
Generated by CLI Printing Press