---
title: "Shoof AI CLI: AI search from your terminal and CI"
description: "The Shoof AI CLI searches, asks for AI answers, imports records, runs a resync and changes settings, synonyms and rules from a terminal, CI or an AI agent."
url: https://shoofai.com/cli/
lang: en
---

CLI

# The Shoof AI CLI

`shoof` does from a terminal what the dashboard does: search, ask, import records, run a resync, and change settings, synonyms and rules. Every command takes `--json` for scripts, CI and AI agents.

[Start free](https://app.shoofai.com/signup) [Read the docs](https://docs.shoofai.com/cli/)

Node.js 18 or later. Works on every plan.

**Start**

```
npm install -g @shoof/cli
shoof login --app my-store --key shf_adm_...

shoof search "trail shoes"
shoof ask "what is the return policy?"
shoof records import products.jsonl
shoof synonyms add sofa couch
shoof analytics --no-results
```

**CI**

```
# In CI, set SHOOF_APP and SHOOF_ADMIN_KEY instead of logging in.
# --replace runs a full resync: records not in the file are removed.
shoof records import catalog.jsonl --replace --json
```

**Reindex**

```
shoof reindex start
shoof reindex status
shoof reindex commit
```

## What the CLI does

- ### Search and ask
Check results and stream AI answers with their sources, without counting toward your analytics.
- ### Import records
A JSON array or JSON Lines, from a file or standard input, in batches of 500, waiting when asked to slow down.
- ### Run a resync
Replace every record from one file. Records that aren’t in it are removed.
- ### Settings, synonyms and rules
Read and change settings, add synonyms, and pin, boost or hide results for a query.
- ### Analytics
Top searches and searches with no results for any date range.
- ### JSON for scripts and agents
Every command takes --json, and the exit status says whether it worked.

FAQ

## Questions, answered.

[More in the docs](https://docs.shoofai.com)

What does it need?

Node.js 18 or later. To run it once without installing it, use `npx @shoof/cli`.

Which key does it use?

Your app’s admin key, saved by `shoof login` to a file only your user can read. A search key works for `search` and `ask`. In CI, set `SHOOF_APP` and `SHOOF_ADMIN_KEY` from your provider’s secrets.

Can an AI agent use it?

Yes. Every command takes `--json` and exits with 0 when it worked, 1 for an API error and 2 for a wrong command. An assistant can also connect to the [MCP server](https://shoofai.com/mcp/) .

Is it on every plan?

Yes. It uses the REST API, so it works on every plan, Free included, within the plan’s limits. See [pricing](https://shoofai.com/pricing/) .

## See the difference for yourself

Free plan, no card needed.

[Start free](https://app.shoofai.com/signup) [Read the docs](https://docs.shoofai.com)
