# Optifeed Radar CLI

Canonical HTML documentation: https://radar.optifeed.com/cli/

Optifeed Radar is an open-source, local command-line tool for measuring brand and product visibility in AI answers. Node.js 20 or newer is required.

## Install

Run the published package:

```bash
npx optifeed-radar audit yourbrand.com
```

To develop from source:

```bash
git clone https://github.com/optifeed/optifeed-radar.git
cd optifeed-radar
npm install
npx tsx src/cli/index.ts audit yourbrand.com
```

## Commands

- `audit <domain>` — free readiness audit: robots.txt, llms.txt, structured data, metadata, and sitemap. No AI calls.
- `check <domain>` — discover the brand, generate buyer questions, ask configured engines, and estimate brand visibility.
- `shopping <domain>` — compare the user-supplied product ranking with observed AI recommendation order. Beta.
- `queries <domain>` — show or export the buyer-question pack.
- `diff <domain>` — compare the two latest saved runs. Free.
- `sources <domain>` — inspect cited domains from a saved run. Free.
- `config` — show key presence and local state location without printing secrets.

## Provider keys

Set one or more of:

- `OPENAI_API_KEY`
- `ANTHROPIC_API_KEY`
- `GOOGLE_API_KEY`
- `PERPLEXITY_API_KEY`

Keys may be exported or placed in a `.env` file in the working directory. An exported value wins over the same value in `.env`.

## Examples

```bash
npx optifeed-radar audit yourbrand.com
npx optifeed-radar check yourbrand.com --quick --max-cost 0.20 --yes
npx optifeed-radar check yourbrand.com --quick --json --yes
npx optifeed-radar check yourbrand.com --report report.html --yes
npx optifeed-radar shopping yourbrand.com --products "Product A, Product B" --yes
npx optifeed-radar diff yourbrand.com
npx optifeed-radar sources yourbrand.com
```

For a product whose name does not explain what it is, use a YAML product file with a descriptor:

```yaml
products:
  - name: Aria 2
    aliases: [Aria II]
    descriptor: quiet home espresso machine
  - name: Presto X
    descriptor: fast dual-boiler espresso machine
```

```bash
npx optifeed-radar shopping yourbrand.com --products-file products.yml --yes
```

The product order is meaningful: list the merchant's preferred product first. Radar compares that order with the order observed in AI answers. It does not import a catalog.

## Output and honesty

Use `--json` for scripts and agents. Use `--report report.html` for a self-contained human report. Scores are point-in-time estimates from sampled answers and vary between runs. Grounded answers that actually searched the web are identified separately.

Paid commands use the user's provider API credit. Start with `audit`, review the buyer questions, use `--quick`, and set `--max-cost` before an unattended run.

Repository: https://github.com/optifeed/optifeed-radar
