> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rippletide.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use the CLI (fastest)

> Evaluate your AI agents from the terminal with automatic hallucination detection

The Rippletide CLI lets you evaluate your agent responses from the terminal with an interactive UI, real-time progress, and automatic hallucination detection.

<div
  style={{
width: '100%',
backgroundColor: 'transparent',
padding: 0,
margin: 0,
border: 'none'
}}
>
  <video
    controls
    preload="none"
    poster="/img/terminal_poster.jpg"
    style={{
  width: '100%',
  height: 'auto',
  display: 'block',
  border: 'none',
  outline: 'none',
  backgroundColor: 'transparent',
  boxShadow: 'none'
}}
    src="https://mintcdn.com/rippletide/ZLS6Wf-ni0TB3rLt/Terminal.mp4?fit=max&auto=format&n=ZLS6Wf-ni0TB3rLt&q=85&s=8eea08afb2c4353f9ddfbbdd17340254"
    title="Rippletide CLI Demo"
    data-path="Terminal.mp4"
  />
</div>

## Installation

```bash theme={null}
npm install -g rippletide
```

Or run directly without installing:

```bash theme={null}
npx rippletide
```

## Quick Start

```bash theme={null}
rippletide
```

The CLI will interactively prompt you for:

1. Your agent's endpoint URL
2. Knowledge source for test questions
3. Run evaluation and display results

## Knowledge Sources

### 1. Local Files (default)

Create a `qanda.json` file in your current directory:

```json theme={null}
[
  {
    "question": "What is your primary function?",
    "answer": "I help users with various tasks through conversation."
  }
]
```

Then run:

```bash theme={null}
rippletide eval -a http://localhost:8000
```

### 2. Pinecone Database

```bash theme={null}
rippletide eval -a http://localhost:8000 -k pinecone \
  -pu https://your-index.pinecone.io \
  -pk pcsk_xxxxx
```

### 3. PostgreSQL Database

```bash theme={null}
rippletide eval -a http://localhost:8000 -k postgresql \
  -pg "postgresql://user:password@host:port/database"
```

## Templates

Use pre-configured evaluation scenarios with the `-t` flag:

```bash theme={null}
rippletide eval -t banking_analyst
rippletide eval -t customer_service
rippletide eval -t blog_to_linkedin
```

Templates include both the endpoint configuration and Q\&A pairs, so you can test instantly without any setup.

## Command Line Options

### Basic Options

| Option                     | Description                                            | Example                              |
| -------------------------- | ------------------------------------------------------ | ------------------------------------ |
| `-t, --template <name>`    | Use a pre-configured template                          | `rippletide eval -t banking_analyst` |
| `-a, --agent <url>`        | Agent endpoint URL                                     | `rippletide eval -a localhost:8000`  |
| `-k, --knowledge <source>` | Knowledge source: `files`, `pinecone`, or `postgresql` | `rippletide eval -k pinecone`        |
| `--debug`                  | Show detailed error information                        | `rippletide eval --debug`            |
| `-h, --help`               | Show help message                                      | `rippletide --help`                  |

### Custom Endpoint Options

For agents that don't use the default request/response format, you can customize headers, the request body, and the response field:

```bash theme={null}
rippletide eval -a http://localhost:8000 \
  -H "Authorization: Bearer token123, X-API-Key: mykey" \
  -B '{"prompt": "{question}"}' \
  -rf "data.response"
```

| Option                         | Description                                                                          |
| ------------------------------ | ------------------------------------------------------------------------------------ |
| `-H, --headers <headers>`      | Custom headers, comma-separated (e.g. `"Authorization: Bearer token, X-Key: value"`) |
| `-B, --body <template>`        | Custom request body template. Use `{question}` as placeholder for the test question  |
| `-rf, --response-field <path>` | Path to the answer in the JSON response, using dot notation (e.g. `data.response`)   |

## Agent Endpoint Requirements

Your endpoint must accept POST requests and return responses in one of these formats:

```json theme={null}
// Direct string
"Your answer here"

// Or JSON with any of these fields
{
  "answer": "...",
  "response": "...",
  "message": "...",
  "text": "..."
}
```

If your endpoint uses a different format, use the `-B` and `-rf` flags above.

## Results

After evaluation, you'll receive:

* **Summary**: Total tests, passed/failed count, duration
* **Dashboard URL**: Link to view detailed results and hallucination analysis at [app.rippletide.com](https://app.rippletide.com)

## Troubleshooting

**Permission errors during installation:**

```bash theme={null}
sudo npm install -g rippletide
```

**Test agent connectivity:**

```bash theme={null}
curl -X POST http://localhost:8000 \
  -H "Content-Type: application/json" \
  -d '{"message": "test"}'
```

**Debug mode for detailed errors:**

```bash theme={null}
rippletide eval --debug
```

## Support

* GitHub: [github.com/rippletideco/starter](https://github.com/rippletideco/starter)
* Discord: [discord.gg/zUPTRH5eFv](https://discord.gg/zUPTRH5eFv)
