---
title: Use Investibook from the CLI
order: 2
description: Kill alert noise in three steps from your terminal.
---

# Use Investibook from the CLI

The Investibook CLI lets you drive investigations from your terminal — or
hand your agent a stack of alerts and let it categorize and diagnose them.

## Kill alert noise in three steps

### 1. Download

Download the CLI and the skill bundle for your agent:

```bash
curl -fsSL "https://investibook-build.s3.amazonaws.com/install.sh" | bash
```

- [CLI release](https://github.com/tidbcloud/aiops/releases/tag/investibook%2Fcli%2Fv0.1)
- [SKILL.md](https://investibook-build.s3.amazonaws.com/SKILL.md)

### 2. Authenticate

Create an API key in Investibook and pass the auth info to your agent.

![CLI authentication prompt](/docs/_assets/cli-auth-step.png)

![CLI authentication details](/docs/_assets/cli-auth-detail.png)

### 3. Make the request

Tell your agent what you want — for example:

> Here's a massive alert list, please categorize workspaces and diagnose risks.

The agent categorizes alerts into workspaces:

![CLI output showing the agent grouping alerts into workspaces](/docs/_assets/cli-result-summary.png)

…and runs diagnosis per group, asking follow-up questions as needed:

![CLI output showing per-workspace diagnosis](/docs/_assets/cli-result-diagnosis.png)

## Hinting specific skills

You can tell the agent which skills to use directly:

```text
Use skill tidb-perf-diagnosis and skill clinic-api to help me understand
the hotspot issue in cluster xxxx
```

## When to use the CLI

- You have many alerts and want a single bulk pass before opening any UI.
- You prefer to keep the investigation in your terminal alongside your other
  tools.
- You're scripting periodic checks that produce investigation summaries.
