Skip to main content

1. Start the server

pip install moorcheh-client
moorcheh up          # first run: choose embedding provider (Ollama, OpenAI, or Cohere)
moorcheh status
API base URL: http://localhost:8080
To set embeddings and the answer LLM before starting: moorcheh configure. See Embedding providers. Ollama is only required if you choose it as the provider. If you change config later while the server is running, run moorcheh down then moorcheh up. Re-running configure with existing data under ~/.moorcheh/data and a different embedding model can break search for old text namespaces until you re-upload.

2. Create a namespace

moorcheh namespace-create --name docs --type text
Or in Python:
from moorcheh import MoorchehClient

with MoorchehClient("http://localhost:8080") as client:
    client.namespaces.create("docs", type="text")

3. Upload documents

Save docs-upload.json:
{
  "documents": [
    {
      "id": "doc-1",
      "text": "Hello from Moorcheh on-prem",
      "team": "ai"
    }
  ]
}
moorcheh upload-documents --namespace-name docs --documents-file docs-upload.json
moorcheh upload-job-status --namespace-name docs --job-id <job_id>
moorcheh search --query "hello moorcheh" --namespaces docs --top-k 5

Optional: Upload a file (PDF, DOCX, …)

Place a file under ~/.moorcheh/uploads, then:
moorcheh upload-file --namespace-name docs --file ~/.moorcheh/uploads/document.pdf
moorcheh file-job-status --namespace-name docs --job-id <job_id>
moorcheh search --query "experience" --namespaces docs --top-k 5
The server reads /uploads/document.pdf inside the container. See Upload file.

5. Stop (data is kept)

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

Next steps

CLI

Full moorcheh command reference

API reference

Full REST endpoint documentation

Python client

End-to-end Python workflow