Skip to main content

Overview

Flashduty CLI (flashduty) is a command-line tool for managing the incident lifecycle, querying on-call schedules, publishing status page updates, and debugging notification templates from your terminal. It fits naturally into operations scripts, local troubleshooting, and AI coding-agent workflows. The tool is open source at flashcatcloud/flashduty-cli and supports macOS, Linux, and Windows.

Installation

Installs to /usr/local/bin by default. Override with the FLASHDUTY_INSTALL_DIR environment variable.

Installer options

Authentication

Log in

When prompted, paste your APP Key. To obtain one, sign in to the Flashduty console and copy your APP Key from Profile > Personal Info.

Credential resolution order

The CLI resolves credentials in the following order (highest priority first):
  1. --app-key command-line flag (hidden, for scripting)
  2. FLASHDUTY_APP_KEY environment variable
  3. Config file ~/.flashduty/config.yaml (written by flashduty login)

Config file

Stored at ~/.flashduty/config.yaml with 0600 permissions:

Config commands

Global flags

All subcommands accept these flags:

Command catalog

incident — Incident lifecycle

Common filter flags for incident list: Time format examples: 5m, 1h, 24h, 168h, 2026-04-01, 2026-04-01 10:00:00, 1712000000.

change — Change records

Supports --channel, --since, --until, --type, --limit, --page.

member — Member queries

Supports --name, --email, --page.

team — Team queries

Supports --name, --page.

channel — Channel queries

Supports --name.

escalation-rule — Escalation rule queries

field — Custom field queries

Supports --name.

statuspage — Status page management

Migrate from Atlassian Statuspage

Migration jobs run asynchronously. After kicking off a job, poll progress with migrate status:

template — Notification templates

Supported channels: dingtalk, dingtalk_app, feishu, feishu_app, wecom, wecom_app, slack, slack_app, telegram, teams_app, email, sms, zoom.

session — AI SRE sessions

Inspect AI SRE (and other Flashduty agent) sessions: session list lists the sessions visible to the caller, and session export streams a single session’s full event log for offline analysis.
Common flags for session list:
The server endpoint /safari/session/list caps each page at 100 rows; when --limit exceeds that, the CLI paginates automatically — no manual paging required. The API has no time-window filter, so --since is applied client-side against each session’s updated_at after fetching.
session export streams session events as newline-delimited JSON (NDJSON) to stdout: the first line is always a session_meta envelope, and each subsequent line is one event (user_message, llm_call, tool_call, subagent_dispatch, final_answer, agent_text, error). Exports can be large, so redirect to a file instead of printing to the terminal:

Full command coverage

Beyond the curated commands above, the CLI now provides full coverage of the Flashduty OpenAPI (~248 commands) via a spec-driven code generator, organized into top-level command groups by resource. In addition to the On-call domain (incident, change, channel, escalation-rule, field, statuspage, template, and more), it also covers:
  • AI SRE (safari): a2a-agents, mcp-servers, sessions, skills, and more
  • Alerting & noise reduction: alert, alert-event, enrichment (alert-rules, rule-sets), route
  • On-call & scheduling: calendar, schedule
  • Platform administration: account, member, person, team, role (roles-permissions), audit (audit-logs)
  • Monitoring & RUM: monit, rum, sourcemap
  • Integrations & webhooks: datasource (IM integrations), webhook (integrations)
These generated leaf commands use a resource-action naming form (e.g. flashduty safari a2a-agent-get, flashduty safari session-list); their inputs and response fields map directly to the corresponding API. Explore them level by level with flashduty <resource> --help:

Utility commands

Enable shell completion (zsh example):

Output formats

Select the output shape with --output-format (--json is an alias for --output-format json) to fit different consumers:
Human-readable, aligned columns, long fields truncated.

Agent skills

Flashduty CLI ships with 10 agent skills that teach AI coding agents — Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and 40+ others — how to operate Flashduty from your terminal. Install skills to every detected agent on your machine in one shot:
Available skills:

Common workflows

Then process the file with jq or load it into your warehouse.
Run this in CI to catch syntax or field errors as soon as a template is committed.
Full source and issue tracking live on the GitHub repository.