awesome cli.

Monitoring & incidents

Rootly CLI for coding agents

Incidents, alerts, services, teams, on-call shifts, deployment pulses, filtering, pagination, API-token auth, and JSON or YAML output.

Command: rootly

Open the official project ↗

This article follows the official documentation. We haven’t tested this tool for a hands-on review.

When a coding agent can run shell commands, it can use the Rootly CLI to look up incident and operations data while investigating a code or service problem. The CLI sends requests to Rootly with an API key, a secret credential that identifies and authorizes the request. Its commands cover incidents and alerts, as well as services, teams, and on-call schedules.

Rootly explains how to use the CLI in a terminal, authenticate, and choose output formats. Its documentation does not describe the CLI as a tool made specifically for agents. For an investigation that only reads Rootly data, an agent can list incidents in JSON and use the results as context. JSON is structured text that an agent or script can parse. Keep the API key in the shell environment or the CLI’s configuration file, not in the agent prompt.

Install and authenticate

The official CLI documentation explains how to install the CLI with Homebrew, Go, a binary download, or a source build. Follow the current instructions for the method you choose. The command depends on that method.

Create an API key in Rootly settings, then set it through the documented environment-variable configuration or add it to the CLI configuration file at ~/.rootly-cli/config.yaml. For example, you can set the key in a shell session without putting it in the prompt:

export ROOTLY_API_KEY="YOUR_ROOTLY_API_KEY"

YOUR_ROOTLY_API_KEY is a placeholder. Replace it with your Rootly key, and do not save the key in a file that enters version control. The command above sets the variable only in the current shell session. You can also save settings outside the agent’s instructions in a CLI configuration file.

List incidents for an investigation

Suppose an agent is investigating a service failure and needs recent Rootly incident details before proposing a code change. It can request the incident list in JSON:

rootly incidents list --format json

The command contacts Rootly and retrieves incident data without changing Rootly records. JSON gives the agent structured fields to inspect. The CLI also supports table, YAML, and Markdown output. Check the CLI command reference for the exact output flag and any incident filters before changing the command for a specific query. Use a filter only if the installed CLI’s documentation lists it.

A realistic prompt for the agent is:

Use the configured Rootly CLI to list incidents as JSON. Find incidents that appear relevant to the failing service described in the repository, and summarize their status and useful context. Do not create, update, or delete Rootly records.

The prompt states that the agent should only read data and does not reveal the credential. The agent needs shell access to the environment where the key is set. It also needs network access to reach Rootly and an API key that the account accepts.

What agents can do with the CLI

Beyond listing incidents, the CLI supports creating, reading, updating, and deleting incidents, alerts, services, and teams. It also supports on-call schedule queries and alert actions. Other commands cover deployment pulses, custom incident form fields, status-page templates, and scheduled maintenance. The Rootly CLI repository documents the project and its command coverage.

The CLI can help with scripted operations, but it also gives an agent access to commands that change Rootly data. Treat incident updates and deletions as actions separate from investigation. The CLI documentation describes confirmation prompts for destructive operations. These prompts add a safeguard, but you still need to review the target and the requested change.

Rootly also offers an MCP server for AI assistants, which exposes Rootly functions to compatible clients. The CLI suits an agent setup that already grants shell access and uses terminal commands or scripts. Rootly does not describe the CLI as a tool made specifically for coding agents. An agent that needs higher-level incident analysis must provide that reasoning itself or use a separately documented integration.

Tool details come from awesome-ai-cli.