{"id":"e161c10a-008a-44c3-8fdc-a4578e2366aa","slug":"flashduty-cli","kind":"skill","name":"flashduty-cli","summary":"Flashduty CLI: the official open-source command-line tool for Flashduty incident management, on-call, alerting, status pages, monitors, RUM and AI SRE. Covers the full Flashduty API for terminals, scr","owner":"flashcatcloud","repoUrl":"https://github.com/flashcatcloud/flashduty-cli","license":"MIT","licenseTier":"permissive","trust":"community","stars":6,"match":null,"fewStars":false,"format":"skill","createdAt":"2026-04-13T06:21:59.000Z","addedAt":"2026-10-21T17:10:56.184Z","logoUrl":"https://avatars.githubusercontent.com/u/90465697?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["cloud-infra"],"tags":["ai-agents","aiops","alerting","cli","command-line-tool","devops","flashduty","golang"],"runtime":"go","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-25T16:54:16.059Z","sample":false,"url":"https://conduits.dev/tools/flashduty-cli","language":"Go","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# Flashduty CLI\n\nEnglish | [中文](README_zh.md)\n\n[![License](https://img.shields.io/github/license/flashcatcloud/flashduty-cli?style=flat-square&color=24bfa5&label=License)](LICENSE)\n[![Release](https://img.shields.io/github/v/release/flashcatcloud/flashduty-cli?style=flat-square&color=24bfa5)](https://github.com/flashcatcloud/flashduty-cli/releases)\n[![CI](https://img.shields.io/github/actions/workflow/status/flashcatcloud/flashduty-cli/ci.yml?style=flat-square&branch=main&label=CI)](https://github.com/flashcatcloud/flashduty-cli/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/flashcatcloud/flashduty-cli?style=flat-square)](https://goreportcard.com/report/github.com/flashcatcloud/flashduty-cli)\n\n**Flashduty CLI** (`flashduty`) is the official open-source command-line tool for [Flashduty](https://www.flashduty.com), the incident management and on-call platform. From a terminal, a shell script, or an AI coding agent you can triage incidents and alerts, query on-call schedules, publish status page updates, manage monitors and RUM, and drive the AI SRE.\n\n[Website](https://www.flashduty.com) · [CLI documentation](https://docs.flashduty.com/en/developer/cli) · [API reference](https://docs.flashduty.com/en/openapi/introduction) · [Console](https://console.flashcat.cloud) · [Blog: a CLI for humans and agents](https://www.flashduty.com/en/now/blog/flashduty-cli) · [Releases](https://github.com/flashcatcloud/flashduty-cli/releases)\n\n## Highlights\n\n- **The whole public API.** Every public Flashduty API operation has a command, generated from the OpenAPI spec through the [go-flashduty](https://github.com/flashcatcloud/go-flashduty) SDK. Common workflows (incidents, alerts, on-call, status pages) also get hand-tuned commands with shorter flags and readable tables.\n- **Predictable names.** An API path maps directly to a command: `POST /incident/merge` is `flashduty incident merge`, and `POST /status-page/change/create` is `flashduty status-page change-create`.\n- **Built for scripts and agents.** Output as `table`, `json`, or `toon` (compact, fewer tokens). List pages are size-bounded and say so when reduced. `--fields` projects rows to the fields you need.\n- **One binary.** macOS, Linux, and Windows on amd64 and arm64. `flashduty update` upgrades in place.\n\n## Installation\n\n### macOS / Linux\n\n```bash\ncurl -sSL https://static.flashcat.cloud/flashduty-cli/install.sh | sh\n```\n\n### Windows (PowerShell)\n\n```powershell\nirm https://static.flashcat.cloud/flashduty-cli/install.ps1 | iex\n```\n\n### Manual download\n\nDownload the archive for your platform from [GitHub Releases](https://github.com/flashcatcloud/flashduty-cli/releases), extract it, and put the binary on your `PATH`.\n\n### Installer options\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `FLASHDUTY_VERSION` | Install a specific version (e.g. `v1.5.12`) | latest |\n| `FLASHDUTY_INSTALL_DIR` | Install directory | shell: the directory of the `flashduty` already on `PATH`, else `/usr/local/bin`; PowerShell: `~\\.flashduty\\bin` |\n| `MIRROR_URL` | Release asset mirror (must be `https://`) | `https://static.flashcat.cloud/flashduty-cli` |\n\n## Quick start\n\n```bash\n# 1. Authenticate with an APP key (console: My → APP Key)\nflashduty login\nflashduty whoami\n\n# 2. Work with incidents\nflashduty incident list --since 24h --severity Critical\nflashduty incident info <incident_id>\nflashduty incident ack <incident_id>\nflashduty incident merge <target_id> --source <id1>,<id2>   # sources are closed and kept\nflashduty incident close <incident_id>\n\n# 3. Who is on call, and what changed?\nflashduty oncall who\nflashduty change list --since 2h\n\n# 4. Explore any area\nflashduty status-page --help\n```\n\nHow to create an APP key is described in the [API reference](https://docs.flashduty.com/en/openapi/introduction).\n\n## Command groups\n\nRun `flashduty <group> --help` for the commands in a group, and `flashduty <group> <command> --help` for flags and examples. The [CLI documentation](https://docs.flashduty.com/en/developer/cli) walks through the common workflows.\n\n| Area | Groups |\n|------|--------|\n| On-call | `incident`, `alert`, `alert-event`, `change`, `channel`, `route`, `oncall`, `schedule`, `calendar`, `integration`, `webhook`, `enrichment`, `field`, `template`, `insight`, `status-page` |\n| Monitors | `monit`, `monit-query`, `datasource` |\n| RUM | `rum`, `sourcemap` |\n| AI SRE | `safari`, `session`, `automation` |\n| Platform | `account`, `member`, `person`, `team`, `role`, `audit` |\n| CLI | `login`, `whoami`, `config`, `update`, `version`, `completion` |\n\n### Integration scope\n\nUse `flashduty integration …` for public integrations managed in the integration center. Use `flashduty channel integration-…` for dedicated alert integrations owned by one channel:\n\n```bash\nflashduty integration list --fields integration_id,name,plugin_type\nflashduty channel integration-list --channel-id 20001 --fields integration_id,channel_id,name,plugin_type\n```\n\nPublic integration instances require integration permissions. Dedicated reads accept Channels Read, Channels Manage, or Integrations Read and require visibility of the owning channel; dedicated writes require Channels Manage and management access to that channel. The shared `integration type-list` catalog accepts these three read permissions; scoped App Keys must allow `integration.api:read:typeList`. Choose by ownership, not by the numeric ID. Both use the management App Key, and a permission failure never switches command families. The bundled Agent Skill explains selection, discovery, and confirmed changes.\n\n### Request bodies\n\nGenerated commands expose each top-level request field as a typed flag, and take the full JSON body through `--data` (`--data -` reads stdin). Positional arguments and typed flags override the matching keys in `--data`, so nested objects and arrays go in `--data` while scalars stay readable:\n\n```bash\nflashduty status-page change-create <page_id> --type incident \\\n  --title \"API latency elevated\" --status investigating \\\n  --data '{\"updates\":[{\"status\":\"investigating\",\"description\":\"Investigating.\",\"component_changes\":[{\"component_id\":\"<component_id>\",\"status\":\"degraded\"}]}]}'\n```\n\n## Authentication and configuration\n\nCredentials are resolved in this order:\n\n1. `--app-key` flag (hidden, for scripting)\n2. `FLASHDUTY_APP_KEY` environment variable\n3. `~/.flashduty/config.yaml`, written by `flashduty login` with `0600` permissions\n\n```yaml\napp_key: your_app_key\nbase_url: https://api.flashcat.cloud\n```\n\n```bash\nflashduty config show              # Print current config (key masked)\nflashduty config set app_key KEY   # Set the APP key\nflashduty config set base_url URL  # Override the API endpoint\n```\n\n| Environment variable | Purpose |\n|----------------------|---------|\n| `FLASHDUTY_APP_KEY` | APP key |\n| `FLASHDUTY_BASE_URL` | API endpoint (default `https://api.flashcat.cloud`) |\n| `FLASHDUTY_NO_UPDATE_CHECK=1` | Disable the daily background update check |\n| `FLASHDUTY_UPDATE_BASE_URL` | Mirror used by `flashduty update` and the update check |\n\n## Global flags\n\n| Flag | Description |\n|------|-------------|\n| `--output-format` | `table` (default), `json`, or `toon` |\n| `--json` | Alias for `--output-format json` |\n| `--no-trunc` | Do not truncate long fields in table output |\n| `--fields` | Keep only these comma-separated top-level fields in `json`/`toon` output: each row of a list, or the keys of a single record |\n| `--base-url` | Override the API base URL |\n| `--version` | Print the version (same as `flashduty version`) |\n\n## Output formats\n\n- **Table** (default): aligned columns for people; long fields are truncated unless `--no-trunc` is set.\n- **JSON** (`--json`): for `jq` and scripts, e.g. `flashduty incident list --json | jq '.[].title'`.\n- **TOON** (`--output-format toon`): [Token-Oriented Object Notation](https://github.com/toon-format/toon-go). It drops the keys JSON repeats on every row, so lists cost far fewer tokens. Use it when an LLM or agent reads the output.\n\nEvery structured list page is capped at 16 KiB. A page that had to be reduced is reported on stderr, and list envelopes also carry `\"truncated\": true` in the payload. With `\"emitted_rows\": N`, only the first N rows were returned: re-request with a smaller `--limit` until the rows you hold reach `total`. Without it, every row is present but long values were clipped: narrow `--fields`.\n\nCommands that query a time range print the window they actually sent on stderr, in the local timezone, e.g. `note: window 2026-10-08T14:00:00+08:00..2026-10-09T14:00:00+08:00 (1d, ended now)`. stdout stays pure `json`/`toon`. `incident list --progress Triggered,Processing` and `alert list --active` default to the last 30 days when `--since` is not given, since open records can be older than a day.\n\nAn unknown flag or command error lists the closest valid names and the valid choices at that level.\n\n## Updating\n\n```bash\nflashduty update           # Install the latest release in place\nflashduty update --check   # Only report whether a newer release exists\n```\n\n## Development\n\nRequires Go 1.26+ (see `go.mod`). golangci-lint is installed by the Makefile.\n\n```bash\nmake build        # Build bin/flashduty\nmake test         # Run tests with the race detector\nmake check        # fmt, lint, test, build\nmake gen-cards    # Regenerate the command fences in skills/flashduty/reference\nmake check-cards  # Check those fences against the real command tree\nmake help         # All targets\n```\n\nGenerated commands live in `internal/cli/zz_generated_*.go` and are produced by `go run ./internal/cmd/cligen` from the OpenAPI spec bundled with go-flashduty. Hand-written commands live next to them. When a hand-written command takes a generated command's name, `TestCuratedCommandsCoverRequestFields` requires it to still expose every request field of that API.\n\n| Dependency | Purpose |\n|------------|---------|\n| [go-flashduty](https://github.com/flashcatcloud/go-flashduty) | Flashduty API client, generated from the OpenAPI spec |\n| [cobra](https://github.com/spf13/cobra) | Command framework |\n| [toon-go](https://github.com/toon-format/toon-go) | TOON output |\n| [yaml.v3](https://pkg.go.dev/gopkg.in/yaml.v3) | Config file |\n| [x/term](https://pkg.go.dev/golang.org/x/term) | Masked APP key input |\n\n## Related projects\n\n- [go-flashduty](https://github.com/flashcatcloud/go-flashduty): Go SDK for the Flashduty API\n- [flashduty-mcp-server](https://github.com/flashcatcloud/flashduty-mcp-server): MCP server for Flashduty\n- [terraform-provider-flashduty](https://github.com/flashcatcloud/terraform-provider-flashduty): Terraform provider for Flashduty resources\n\n## Contributing\n\nContributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request, and note our [Code of Conduct](CODE_OF_CONDUCT.md).\n\n- [Report a bug or request a feature](https://github.com/flashcatcloud/flashduty-cli/issues/new/choose)\n- [Get help and support](SUPPORT.md)\n- [Report a security vulnerability](SECURITY.md)\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n"}