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 --query (free-text search by name or email), --role-id, --page, --limit, --orderby, --asc.

team — Team management

team list supports --query (team name substring match), --page, --limit, --orderby (created_at/updated_at/team_name), --asc, --person-id (filter to teams the given member belongs to). team info accepts --team-id, --team-name, or --ref-id to identify the team (exactly one required). team upsert creates or updates a team:
  • --team-name (required, 1–39 characters)
  • --team-id (set to update an existing team; omit to create)
  • --description (up to 500 characters)
  • --person-ids (member ID list; replaces the entire member list — run team info first to see current members before updating)
  • --emails (email addresses to invite as members)
  • --ref-id (external reference ID for HR system integration)
team delete accepts --team-id, --team-name, or --ref-id to identify the team. This action is permanent and cannot be undone.

channel — Channel queries

Supports --name.

channel escalate-rule-list — Escalation rule queries

Escalation rule management has moved into the channel command group. Pass the channel ID as a positional argument:
Other escalation rule management commands under the channel group: escalate-rule-create, escalate-rule-update, escalate-rule-delete (all require --channel-id).

field — Custom field queries

Supports --name.

status-page — Status page management

Migrate from Atlassian Statuspage

Migration jobs run asynchronously. Poll progress with migration-status after kicking off a job:
Other available subcommands: change-delete, change-info, change-list, change-timeline-delete, change-timeline-update, change-update, subscriber-export.

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:

monit-agent — On-box host/database diagnostics

Run live diagnostics on a target host or data source through flashmonit agents, without needing a shell login on the target machine.
Both subcommands require --target-locator (internal IP, hostname, or data-source name). --target-kind is optional (host, mysql, redis, etc.) and is inferred automatically when omitted. invoke accepts a --data JSON payload listing the tools to run, up to 8 concurrently:
For SQL parameters containing quotes or commas, pass --data - and supply the body via a stdin heredoc to avoid shell-quoting issues:

monit-query — Monitoring datasource queries

Probe monitoring back-end datasources (Prometheus, VictoriaLogs, Loki, MySQL) directly, bypassing the alert-rule layer.
Common flags for diagnose: rows requires --ds-type, --ds-name, and --expr (query expression). Use --args KEY=VALUE (repeatable) for parameterized queries.

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, field, status-page, 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

flashduty update downloads and runs the platform installer, replacing the current binary with the latest release. --check only prints the available version without modifying any local files. After any non-update command runs in a terminal, if a newer version is available the CLI automatically emits an update notice banner to stderr.
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.