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

# Quickstart

> Start Moorcheh Edge, upload documents, and search.

## 1. Start the server

```bash theme={null}
pip install moorcheh-edge
moorcheh-edge up
moorcheh-edge status
```

API base URL: `http://localhost:8080`

On first `up --with-llm`, the CLI downloads the BGE embedding model (\~210 MB, one-time) to `~/.moorcheh-edge/models` and pulls **`qwen2.5:0.5b-instruct`** (\~400 MB) for `moorcheh-edge answer`.

## 2. Upload text documents (text store)

Save `documents.json`:

```json theme={null}
{
  "documents": [
    {
      "id": "doc-1",
      "text": "Manchester United beat Chelsea 2-1 in the Premier League on Saturday."
    }
  ]
}
```

```bash theme={null}
moorcheh-edge upload-documents --documents-file documents.json
```

The CLI embeds text locally with BGE (768 dimensions) and uploads to a **text** store.

## 3. Search with plain text

```bash theme={null}
moorcheh-edge search \
  --query-text "Manchester United beat Chelsea 2-1 in the Premier League on Saturday." \
  --top-k 5
```

## 4. Answer with RAG (local LLM)

Requires Ollama and the answer model. If you started with search-only `up`, run once:

```bash theme={null}
moorcheh-edge up --with-llm -y
```

After documents are uploaded:

```bash theme={null}
moorcheh-edge answer --query "Who won the football match?" --top-k 5
```

Uses Ollama with **`qwen2.5:0.5b-instruct`**. Search-only (skip LLM setup):

```bash theme={null}
moorcheh-edge up --skip-ollama
```

## 5. Upload precomputed vectors (vector store)

To use your own embeddings instead, clear the store first (text and vector modes cannot mix):

```bash theme={null}
moorcheh-edge clear-store -y
```

Save `vectors.json`:

```json theme={null}
{
  "vectors": [
    {
      "id": "item-1",
      "vector": [0.01, -0.02, "... 1024 floats total ..."],
      "text": "Optional label shown in search results"
    }
  ]
}
```

```bash theme={null}
moorcheh-edge upload-vectors --vectors-file vectors.json
moorcheh-edge search --query-vector-json "[0.01, -0.02, ... 1024 floats ...]" --top-k 5
```

## 6. Python SDK

```python theme={null}
from moorcheh_edge import MoorchehEdge

with MoorchehEdge() as edge:
    print(edge.health())
    edge.upload_documents([
        {"id": "doc-1", "text": "Hello world"},
    ])
    for hit in edge.search_text("Hello world", top_k=5):
        print(hit["id"], hit["score"], hit.get("text"))
    result = edge.answer_text("Who won the football match?", top_k=5)
    print(result["answer"])
```

## 7. Stop (data is kept)

```bash theme={null}
moorcheh-edge down
```

Data remains in `~/.moorcheh-edge/data`.

## Next steps

<CardGroup cols={2}>
  <Card title="CLI" icon="terminal" href="/cli/introduction">
    Full `moorcheh-edge` command reference
  </Card>

  <Card title="API reference" icon="code" href="/api-references/health">
    REST endpoint documentation
  </Card>

  <Card title="Python client" icon="python" href="/python-client/getting-started">
    SDK workflow
  </Card>

  <Card title="Limits" icon="gauge" href="/limits">
    10k store cap and dimension rules
  </Card>

  <Card title="Retail Kiosk example" icon="store" href="/examples/retail-kiosk">
    PC + Arduino UNO Q in-store demo
  </Card>
</CardGroup>
