Python client and SDK for moorcheh-edge — on-device vector search
Project description
moorcheh-edge
Python package and CLI for running moorcheh-edge locally and calling its API.
- CLI:
moorcheh-edge - Package:
moorcheh-edge - Python import:
moorcheh_edge
Requires Docker (Docker Desktop or Docker Engine).
Install
pip install moorcheh-edge
Quick start
Start the local edge runtime. Default up starts Docker + warm BGE embedding only (no Ollama download).
On first run this automatically:
- pulls the moorcheh-edge Docker image and starts the search server
- starts a background embedding daemon that keeps BGE loaded in RAM (stopped by
moorcheh-edge down) - downloads BGE-base-en-v1.5 (~210 MB) for text search/upload
Ollama / AI answer is opt-in — not downloaded by default.
moorcheh-edge up
Interactive prompts (embedding yes/no, AI answer yes/no, keep LLM in RAM yes/no) appear in a terminal. Use -y to skip prompts and accept defaults.
moorcheh-edge up -y
Enable AI answer (install Ollama + pull model; loads on first answer, not kept in RAM):
moorcheh-edge up --with-llm
Enable AI answer and keep LLM warm in RAM (~1.1 GB, default 24h):
moorcheh-edge up --with-llm --warm-llm
Skip Moorcheh embedding (your own vectors only):
moorcheh-edge up --skip-embedding
Docker only (no embed, no LLM):
moorcheh-edge up --skip-embedding -y
Default API:
http://localhost:8080
Default data directory:
~/.moorcheh-edge/data
Check health/status:
moorcheh-edge status
Stop the runtime:
moorcheh-edge down
Commands
moorcheh-edge up/down/statusmoorcheh-edge upload-documents— embed text locally (768-dim text store)moorcheh-edge upload-vectors— upload pre-computed vectors (vector store)moorcheh-edge search—--query-textor--query-vector-jsonmoorcheh-edge answer— RAG via serverPOST /answer(embeds locally, LLM on server)moorcheh-edge voice setup— full voice install (packages, Whisper, Piper, ALSA config)moorcheh-edge voice listen— record mic → Whisper → print textmoorcheh-edge voice speak --text "..."— Piper TTS (or espeak-ng) → speakermoorcheh-edge voice ask— push-to-talk kiosk: record → RAG answer → speakmoorcheh-edge delete— delete items by idmoorcheh-edge clear-store— wipe all items and reset dimension/mode (prompts for confirmation; use-yto skip)
All API commands accept --base-url, for example:
moorcheh-edge status --base-url http://localhost:8081
Use --skip-embedding on up to skip BGE entirely (no download, no warm daemon).
Use --with-llm to install Ollama and pull the answer model (~808 MB).
Use --warm-llm with --with-llm to preload the LLM into RAM (default keep-alive 24h).
Answer uses local Ollama with fixed model llama3.2:1b-instruct-q4_K_M on the host; the Docker server reaches it at http://host.docker.internal:11434/v1.
Voice (UNO Q kiosk)
One command installs system packages, Whisper STT, Piper TTS, models, and auto-configures ALSA (no env vars needed):
moorcheh-edge up --server-image moorcheh-edge:uno-q
moorcheh-edge voice setup
moorcheh-edge voice check
moorcheh-edge voice ask --kiosk-mode
Offline pipeline: ALSA → Whisper tiny.en → RAG answer → Piper TTS (fallback espeak-ng).
Audio device defaults are saved to ~/.moorcheh-edge/voice/audio.json. Optional overrides: MOORCHEH_AUDIO_CAPTURE, MOORCHEH_AUDIO_PLAYBACK.
Notes
- Answer / RAG: client embeds the question, server searches + builds prompt + calls LLM
- One flat store per container (no namespaces)
- Text mode: client embeds with BGE (768 dimensions); set on first upload
- Vector mode: client sends pre-computed vectors; dimension locked on first upload (128–1536)
- Cannot mix text and vector modes in the same store
- Global item cap: 10,000
- Model cache:
~/.moorcheh-edge/models
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file moorcheh_edge-0.2.0.tar.gz.
File metadata
- Download URL: moorcheh_edge-0.2.0.tar.gz
- Upload date:
- Size: 49.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ef1ce64d50d18fde4e54281d89861340cd0b45622870b667eafbe12bc028155
|
|
| MD5 |
458478d406d6c88efaa8bac3c668242f
|
|
| BLAKE2b-256 |
29123bcb841cc0ce390b7d20de8776aec434b034124a2892d793d1e866b15638
|
File details
Details for the file moorcheh_edge-0.2.0-py3-none-any.whl.
File metadata
- Download URL: moorcheh_edge-0.2.0-py3-none-any.whl
- Upload date:
- Size: 55.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21d576f275da1022b7e5bde9a3c4bf5443aff33568877b908d3660181f67b584
|
|
| MD5 |
c18dd56746f4f1900a1e1e4bed7a72de
|
|
| BLAKE2b-256 |
d741bae5a54b47e00b3a2ef683634324815d504121a036e52de8ac086c64e70b
|