Our CLI tool allows you to interact with Oh Dear from the command line. Every Oh Dear API endpoint has a corresponding command.
AI coding assistants can also use this tool to manage your monitors, investigate downtime, and more. Learn how to set up AI with Oh Dear.

Installation #
Requires PHP 8.4+
Via Composer
composer global require ohdearapp/ohdear-cli
Make sure Composer's global bin directory is in your PATH. You can find the path by running:
composer global config bin-dir --absolute
Verify the installation:
ohdear --version
Via Docker
docker run --rm ghcr.io/ohdearapp/ohdear-cli:latest
Authentication #
First, create an API token on your API token page.
Then, log in:
ohdear login
You'll be prompted for your API token. It will be validated and stored locally at ~/.ohdear/config.json.
To log out and clear your stored credentials:
ohdear logout
If any command returns a 401 error, your token is invalid or expired. Run ohdear login again.
Available commands #
List all available commands:
ohdear list
Every command supports --help for full parameter details:
ohdear get-monitor --help
Monitors #
ohdear list-monitors
ohdear get-monitor --monitor-id=123
ohdear get-monitor-by-url --field url="https://example.com"
ohdear create-monitor --field url="https://example.com" --field team_id=1
ohdear update-monitor --monitor-id=123 --field label="My site"
ohdear delete-monitor --monitor-id=123
Checks #
ohdear get-check-summary --monitor-id=123 --check-type=uptime
ohdear enable-check --check-id=456
ohdear disable-check --check-id=456
ohdear request-check-run --check-id=456
ohdear snooze-check --check-id=456 --field minutes=60
ohdear unsnooze-check --check-id=456
Uptime and downtime #
ohdear get-uptime --monitor-id=123
ohdear get-downtime --monitor-id=123
ohdear delete-downtime --downtime-id=789
ohdear http-uptime-metrics --monitor-id=123
ohdear ping-uptime-metrics --monitor-id=123
ohdear tcp-uptime-metrics --monitor-id=123
Broken links and mixed content #
ohdear list-broken-links --monitor-id=123
ohdear add-broken-links-whitelist-url --monitor-id=123 --field url="https://example.com/known-404"
ohdear list-mixed-content --monitor-id=123
Certificate health #
ohdear get-certificate-health --monitor-id=123
ohdear list-detected-certificates --monitor-id=123
ohdear get-detected-certificate --detected-certificate-id=456
DNS monitoring #
ohdear get-dns-history --monitor-id=123
ohdear get-dns-history-item --dns-history-item-id=456
ohdear get-domain-info --monitor-id=123
Cron checks #
ohdear list-cron-checks --monitor-id=123
ohdear create-cron-check --monitor-id=123 --field name="Daily backup" --field frequency_in_minutes=1440
ohdear update-cron-check --cron-check-definition-id=456 --field grace_time_in_minutes=10
ohdear sync-cron-checks --monitor-id=123 --input='[{"name":"Backup","frequency_in_minutes":1440}]'
ohdear delete-cron-check --cron-check-definition-id=456
ohdear snooze-cron-check --cron-check-definition-id=456
ohdear unsnooze-cron-check --cron-check-definition-id=456
Maintenance periods #
ohdear list-maintenance-periods --monitor-id=123
ohdear start-maintenance --monitor-id=123
ohdear stop-maintenance --monitor-id=123
ohdear create-maintenance-period --field monitor_id=123 --field starts_at="2026-03-01 00:00:00" --field ends_at="2026-03-01 06:00:00"
ohdear update-maintenance-period --maintenance-period-id=456 --field ends_at="2026-03-01 08:00:00"
ohdear delete-maintenance-period --maintenance-period-id=456
Recurring maintenance periods #
ohdear list-recurring-maintenance-periods --monitor-id=123
ohdear create-recurring-maintenance-period --field monitor_id=123 --field day_of_week=0 --field start_time="02:00" --field end_time="04:00"
ohdear update-recurring-maintenance-period --recurring-maintenance-period-id=456 --field end_time="05:00"
ohdear delete-recurring-maintenance-period --recurring-maintenance-period-id=456
Status pages #
ohdear list-status-pages
ohdear get-status-page --status-page-id=123
ohdear create-status-page --field name="My Status Page" --field team_id=1
ohdear add-status-page-monitors --status-page-id=123 --field monitors='[456, 789]'
ohdear remove-status-page-monitor --status-page-id=123 --monitor-id=456
ohdear delete-status-page --status-page-id=123
Status page updates #
ohdear list-status-page-updates --status-page-id=123
ohdear create-status-page-update --field status_page_id=123 --field title="Investigating" --field text="Looking into it." --field severity=info
ohdear update-status-page-update --status-page-update-id=456 --field title="Resolved" --field severity=resolved
ohdear delete-status-page-update --status-page-update-id=456
Status page update templates #
ohdear list-status-page-update-templates
ohdear create-status-page-update-template --field title="Scheduled maintenance" --field text="We will be performing maintenance."
ohdear update-status-page-update-template --status-page-update-template-id=456 --field text="Updated text"
ohdear delete-status-page-update-template --status-page-update-template-id=456
Application health #
ohdear list-application-health-checks --monitor-id=123
ohdear get-application-health-check-history --monitor-id=123
ohdear snooze-application-health-check --application-health-check-id=456
ohdear unsnooze-application-health-check --application-health-check-id=456
Lighthouse reports #
ohdear list-lighthouse-reports --monitor-id=123
ohdear get-latest-lighthouse-report --monitor-id=123
ohdear get-lighthouse-report --lighthouse-report-id=456
AI responses #
ohdear list-ai-responses --monitor-id=123
ohdear get-latest-ai-response --monitor-id=123
ohdear get-ai-response --ai-response-id=456
Ports and DNS blocklist #
ohdear list-ports-history-items --monitor-id=123
ohdear get-ports-history-item --ports-history-item-id=456
ohdear list-dns-blocklist-history-items --monitor-id=123
ohdear get-dns-blocklist-history-item --dns-blocklist-history-item-id=456
Sitemap #
ohdear get-sitemap-results --monitor-id=123
ohdear list-tags
ohdear create-tag --field name="Production" --field color="#ff0000"
ohdear list-tag-groups
ohdear create-tag-group --field name="Environment" --field tag_ids='[1, 2]'
ohdear update-tag-group --tag-group-id=456 --field name="Updated name"
ohdear delete-tag-group --tag-group-id=456
Notification destinations #
Notification destinations can be managed at the team, monitor, tag, and tag group level. Each level supports list, create, update, and delete operations.
ohdear list-team-notification-destinations --team-id=1
ohdear create-team-notification-destination --team-id=1 --field type=slack --field label="Ops"
ohdear list-monitor-notification-destinations --monitor-id=123
ohdear create-monitor-notification-destination --monitor-id=123 --field type=email --field label="Alerts"
ohdear list-tag-notification-destinations --tag-id=1
ohdear list-tag-group-notification-destinations --tag-group-id=1
Account #
ohdear get-me
All commands output human readable tables by default. You can switch to JSON or YAML output for scripting:
ohdear list-monitors --json
ohdear list-monitors --yaml
ohdear list-monitors --minify
Caching #
The CLI caches the OpenAPI specification for 24 hours to avoid repeated downloads. To clear the cache:
ohdear clear-cache
AI agent skill #
The Oh Dear CLI includes a skill for AI coding assistants. Install it with:
ohdear install-skill
This allows AI agents to use the Oh Dear CLI to manage your monitors, investigate downtime, and more.