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

# CLI Reference

> All ragrails commands.

<Note>This page is generated from the Click command tree. Run `RAGRAILS_SOURCE=/path/to/ragrails uv run python scripts/generate-reference.py` from the docs repo after CLI changes.</Note>

Commands read defaults from [`.ragrails.toml`](/getting-started/configuration); flags override per run. The setup wizard is launched by running bare `ragrails` with no subcommand; there is no `ragrails setup` command.

## Setup

| Command    | Description                                        |
| ---------- | -------------------------------------------------- |
| `ragrails` | Interactive setup wizard (writes `.ragrails.toml`) |

The setup wizard prompts for vector store, embedding, LLM, and reranker defaults. If `.ragrails.toml` already exists, bare `ragrails` shows the current config and lets you `edit`, `reset`, or `exit`.

| Wizard section    | Prompts                                                                                    |
| ----------------- | ------------------------------------------------------------------------------------------ |
| Vector store      | Provider, collection, URL                                                                  |
| Embedding         | Provider, model                                                                            |
| LLM               | Provider, model, max tokens                                                                |
| Reranking         | Enable flag, provider, model                                                               |
| Advanced defaults | Chunking, batch sizes, retrieval limits, query rewrite, intent routing, history compaction |

## Commands

| Command              | Description                                                                                     |
| -------------------- | ----------------------------------------------------------------------------------------------- |
| `ragrails chat`      | Run one SDK chat turn, or start the interactive chat CLI with no query.                         |
| `ragrails chunk`     | Split extraction JSON into chunks.                                                              |
| `ragrails delete`    | Delete stored chunks by exact chunk ID.                                                         |
| `ragrails doctor`    | Inspect `.ragrails.toml`, packages, environment variables, and optional vector DB connectivity. |
| `ragrails edit`      | Re-embed and replace stored chunks by exact chunk ID.                                           |
| `ragrails embed`     | Embed chunk JSON files.                                                                         |
| `ragrails fetch`     | Fetch a REST API endpoint into extraction JSON.                                                 |
| `ragrails ingest`    | Run extraction, chunking, embedding, and storage in one command.                                |
| `ragrails parse`     | Parse local files, folders, or file URLs into extraction JSON.                                  |
| `ragrails query`     | Run query embedding and vector retrieval through the SDK pipeline.                              |
| `ragrails retrieve`  | Retrieve chunks relevant to a query.                                                            |
| `ragrails scrape`    | Scrape one or more URLs into extraction JSON.                                                   |
| `ragrails setup-url` | Install the Playwright browser runtime required for URL extraction.                             |
| `ragrails store`     | Store embedded chunk JSON files in a vector database.                                           |
