Skip to main content

1. Start the server

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:
{
  "documents": [
    {
      "id": "doc-1",
      "text": "Manchester United beat Chelsea 2-1 in the Premier League on Saturday."
    }
  ]
}
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

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:
moorcheh-edge up --with-llm -y
After documents are uploaded:
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):
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):
moorcheh-edge clear-store -y
Save vectors.json:
{
  "vectors": [
    {
      "id": "item-1",
      "vector": [0.01, -0.02, "... 1024 floats total ..."],
      "text": "Optional label shown in search results"
    }
  ]
}
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

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)

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

Next steps

CLI

Full moorcheh-edge command reference

API reference

REST endpoint documentation

Python client

SDK workflow

Limits

10k store cap and dimension rules

Retail Kiosk example

PC + Arduino UNO Q in-store demo