English | 中文
A command-line interface for the Flashduty platform. Manage incidents, on-call schedules, status pages, and more from your terminal.
curl -sSL https://raw.githubusercontent.com/flashcatcloud/flashduty-cli/main/install.sh | shirm https://raw.githubusercontent.com/flashcatcloud/flashduty-cli/main/install.ps1 | iexgo install github.com/flashcatcloud/flashduty-cli/cmd/flashduty@latestMake sure
$(go env GOPATH)/binis in yourPATH. Ifflashdutyis not found after install, run:export PATH="$(go env GOPATH)/bin:$PATH"
Download the latest release for your platform from GitHub Releases.
| Variable | Description | Default |
|---|---|---|
FLASHDUTY_VERSION |
Install a specific version (e.g. v0.1.2) |
latest |
FLASHDUTY_INSTALL_DIR |
Custom install directory | /usr/local/bin (shell), ~\.flashduty\bin (PowerShell) |
flashduty loginYou will be prompted for your Flashduty APP key. To obtain one, log into the Flashduty console and navigate to Account Settings > APP Key.
Alternatively, set the key via environment variable:
export FLASHDUTY_APP_KEY=your_app_key# List recent incidents
flashduty incident list
# Get incident details
flashduty incident get <incident_id>
# List team members
flashduty member list
# View channels
flashduty channel listThe CLI resolves credentials in this order (highest priority first):
--app-keyflag (hidden, for scripting)FLASHDUTY_APP_KEYenvironment variable~/.flashduty/config.yaml(written byflashduty login)
Stored at ~/.flashduty/config.yaml with 0600 permissions:
app_key: your_app_key
base_url: https://api.flashcat.cloudflashduty config show # Print current config (key masked)
flashduty config set app_key KEY # Set app key
flashduty config set base_url URL # Override API endpoint| Flag | Description |
|---|---|
--json |
Output as JSON instead of table |
--no-trunc |
Do not truncate long fields in table output |
--base-url |
Override the API base URL |
flashduty incident list [flags] # List incidents (default: last 24h)
flashduty incident get <id> [<id2>] # Get incident details (vertical view for single ID)
flashduty incident create [flags] # Create a new incident (interactive if flags missing)
flashduty incident update <id> [flags] # Update incident fields
flashduty incident ack <id> [<id2>] # Acknowledge incidents
flashduty incident close <id> [<id2>] # Close (resolve) incidents
flashduty incident timeline <id> # View incident timeline
flashduty incident alerts <id> # View incident alerts
flashduty incident similar <id> # Find similar historical incidentsList flags:
| Flag | Description | Default |
|---|---|---|
--progress |
Filter: Triggered, Processing, Closed | all |
--severity |
Filter: Critical, Warning, Info | all |
--channel |
Filter by channel ID | - |
--title |
Search by title keyword | - |
--since |
Start time (duration, date, datetime, or unix) | 24h |
--until |
End time | now |
--limit |
Max results | 20 |
--page |
Page number | 1 |
Time format examples: 5m, 1h, 24h, 168h, 2026-04-01, 2026-04-01 10:00:00, 1712000000
flashduty change list [flags] # List changes (deployments, configs)Supports --channel, --since, --until, --type, --limit, --page.
flashduty member list [flags] # List membersSupports --name, --email, --page.
flashduty team list [flags] # List teams with membersSupports --name, --page.
flashduty channel list [flags] # List collaboration spacesSupports --name.
flashduty escalation-rule list --channel <id> # By channel ID
flashduty escalation-rule list --channel-name <name> # By channel name (auto-resolved)flashduty field list [flags] # List custom field definitionsSupports --name.
flashduty statuspage list [--id <ids>] # List status pages
flashduty statuspage changes --page-id <id> --type <incident|maintenance> # List active changes
flashduty statuspage create-incident --page-id <id> --title <title> # Create status incident
flashduty statuspage create-timeline --page-id <id> --change <id> --message <msg> # Add timeline updateflashduty template get-preset --channel <channel> # Get preset template code
flashduty template validate --channel <channel> --file <path> # Validate and preview template
flashduty template variables [--category <category>] # List template variables
flashduty template functions [--type custom|sprig|all] # List template functionsSupported channels: dingtalk, dingtalk_app, feishu, feishu_app, wecom, wecom_app, slack, slack_app, telegram, teams_app, email, sms, zoom.
flashduty login # Authenticate interactively
flashduty config show # Show current configuration
flashduty config set # Set a configuration value
flashduty version # Print version information
flashduty completion # Generate shell completions (bash/zsh/fish/powershell)Table (default): Human-readable, aligned columns, long fields truncated.
ID TITLE SEVERITY PROGRESS CHANNEL CREATED
inc_abc123 DB connection timeout Critical Triggered Production 2026-04-10 10:23
inc_def456 High memory usage Warning Processing Staging 2026-04-10 09:15
Showing 2 results (page 1, total 2).
JSON (--json): Machine-parseable, full data, no truncation.
flashduty incident list --json | jq '.[].title'No truncation (--no-trunc): Table with full field content.
- Go 1.24+
- golangci-lint (auto-installed by Makefile)
make build # Build binary to bin/flashduty
make test # Run tests with race detection
make lint # Run linter
make check # Run all checks (fmt, lint, test, build)
make help # Show all available targets| Package | Purpose |
|---|---|
| flashduty-sdk | Flashduty API client |
| cobra | CLI framework |
| yaml.v3 | Config file parsing |
| x/term | Masked password input |
This project is licensed under the MIT License - see the LICENSE file for details.