Metadata-Version: 2.4
Name: moorcheh-client
Version: 0.1.6
Summary: Moorcheh Community Edition - free single-node, non-commercial semantic search, RAG, and document indexing on your own infrastructure.
License: MOORCHEH COMMUNITY EDITION LICENSE AGREEMENT
        Version 1.0
        
        Copyright (c) Edge AI Innovations Inc. All rights reserved.
        
        IMPORTANT: Read this Agreement carefully before downloading, installing, or
        executing the Moorcheh Community Edition software, including the Moorcheh server
        Docker image, client libraries, CLI, and related source code (collectively,
        the "Software").
        
        BY DOWNLOADING, INSTALLING, EXECUTING, OR USING THE SOFTWARE, YOU AGREE TO BE
        BOUND BY THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT USE THE
        SOFTWARE.
        
        1. GRANT OF LICENSE
        
        Subject to the terms of this Agreement, Edge AI Innovations Inc. ("Licensor")
        grants you a non-exclusive, non-transferable, royalty-free license to download,
        install, execute, and use the Software solely under the Permitted Use conditions
        below.
        
        2. PERMITTED USE (THE "COMMUNITY TIER")
        
        You may use the Software only if BOTH of the following conditions are met:
        
          a) Single-Node Deployment: The Software is executed on a single physical
             machine or virtual container instance, with no distributed cluster nodes
             or replication across multiple servers. For clarity, "single-node" means
             at most one (1) active production node instance (one container or one
             server process) running the Moorcheh server at any time.
        
          b) Non-Commercial Use: The Software is used strictly for personal,
             academic, research, internal testing, or other non-revenue-generating
             applications.
        
        3. RESTRICTIONS
        
        Unless you have obtained a commercial enterprise license from Moorcheh, you
        may NOT:
        
          a) Offer the Software as a managed cloud service, hosted API, or SaaS product
             to third parties.
        
          b) Deploy more than one (1) active node instance in a production environment.
        
          c) Use the Software for commercial production deployment, revenue-generating
             business operations, or on behalf of paying customers.
        
          d) Reverse engineer, decompile, or bypass any node-capping or license
             enforcement mechanisms embedded in the Software.
        
          e) Sublicense, sell, rent, lease, or otherwise transfer the Software except
             as expressly permitted by this Agreement.
        
        4. COMMERCIAL AND ENTERPRISE USE
        
        Any use exceeding the Permitted Use (including multi-node clustering,
        high-availability deployment, production deployment for business operations,
        managed hosting, or commercial SaaS usage) requires a commercial Moorcheh
        Enterprise License. Contact sales@moorcheh.ai for licensing options.
        
        5. SOURCE AVAILABILITY
        
        The Software is distributed as source-available under this Agreement. This
        license is not an Open Source Initiative (OSI)-approved license and does not
        grant unrestricted commercial or multi-node rights.
        
        6. INTELLECTUAL PROPERTY
        
        Licensor retains all right, title, and interest in and to the Software,
        including all copyrights, patents, trade secrets, trademarks, and other
        intellectual property rights. No rights are granted except as expressly set
        forth in this Agreement.
        
        7. DISCLAIMER OF WARRANTY
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. LICENSOR DOES NOT
        WARRANT THAT THE SOFTWARE WILL BE UNINTERRUPTED, ERROR-FREE, OR FREE OF
        HARMFUL COMPONENTS, OR THAT DATA WILL NOT BE LOST OR CORRUPTED.
        
        8. LIMITATION OF LIABILITY
        
        TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL LICENSOR
        OR ITS AFFILIATES, OFFICERS, DIRECTORS, EMPLOYEES, OR AGENTS BE LIABLE FOR ANY
        INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR ANY LOSS
        OF PROFITS, DATA, USE, GOODWILL, OR OTHER INTANGIBLE LOSSES, ARISING OUT OF OR
        RELATED TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF LICENSOR HAS
        BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
        
        IN NO EVENT SHALL LICENSOR'S TOTAL LIABILITY ARISING OUT OF OR RELATED TO THIS
        AGREEMENT EXCEED ONE HUNDRED U.S. DOLLARS (USD $100).
        
        9. TERMINATION
        
        This Agreement is effective until terminated. Licensor may terminate this
        Agreement immediately if you breach any term. Upon termination, you must cease
        all use of the Software and destroy all copies in your possession or control.
        
        10. GOVERNING LAW
        
        This Agreement shall be governed by and construed in accordance with the laws
        of the jurisdiction in which Edge AI Innovations Inc. is incorporated, without
        regard to conflict-of-law principles.
        
        11. CONTACT
        
        Moorcheh Community Edition licensing questions:  support@moorcheh.ai
        Product and documentation: https://docs.moorcheh.ai/on-prem
        
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Provides-Extra: web
Requires-Dist: Flask>=3.0.0; extra == "web"
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: setuptools-scm>=8.0; extra == "dev"
Dynamic: license-file

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="assets/moorcheh-logo-dark.svg">
    <img alt="Moorcheh" src="assets/moorcheh-logo-light.svg" width="280">
  </picture>
</p>

<p align="center">
  <strong>Moorcheh Community Edition: Free for single-node and non-commercial deployments.</strong>
</p>

<p align="center">
  The Information-Theoretic Search Engine for RAG & Agentic Memory - self-hosted on your infrastructure.
</p>

<p align="center">
  <img alt="License: Moorcheh Community (Free Single-Node)" src="https://img.shields.io/badge/License-Moorcheh%20Community%20(Free%20Single--Node)-blue">
</p>

<p align="center">
  <a href="https://pypi.org/project/moorcheh-client/">PyPI</a> ·
  <a href="https://docs.moorcheh.ai/on-prem">Documentation</a> ·
  <a href="CONTRIBUTING.md">Contributing</a> ·
  <a href="LICENSE">Community License</a>
</p>

> **Licensing:** Moorcheh Community Edition is **source-available** and **free** for non-commercial and single-node self-hosted deployments (at most one active server node). If you need multi-node high availability, enterprise features, or commercial SaaS usage, see [Moorcheh Enterprise](https://moorcheh.ai) or contact [sales@moorcheh.ai](mailto:sales@moorcheh.ai).

---

## Install

```bash
pip install moorcheh-client
```

**Requirements:** Python 3.10+, [Docker](https://www.docker.com/), and an embedding provider (Ollama, OpenAI, or Cohere).

## Quick start

```bash
moorcheh up          # first run prompts for embedding/LLM config
moorcheh status      # health + quota
```

API: `http://localhost:8080` · Data: `~/.moorcheh/data`

The [`moorcheh/server`](https://hub.docker.com/r/moorcheh/server) Docker image is governed by the same [Community Edition license](LICENSE). The license file should be included at `/LICENSE` inside the server image and linked from the Docker Hub repository description.

```python
from moorcheh import MoorchehClient

client = MoorchehClient("http://localhost:8080")

client.namespaces.create("docs", type="text")
job = client.documents.upload("docs", documents=[
    {"id": "doc-1", "text": "Hello from Moorcheh on-prem"},
])
# poll job["job_id"] until completed, then search or answer

results = client.similarity_search.query(
    namespaces=["docs"],
    query="Hello",
    top_k=5,
)

answer = client.answer.generate(
    namespace="docs",
    query="What is in my documents?",
)
```

```bash
moorcheh down        # stops containers; data is kept
```

## CLI

Common commands: `moorcheh up`, `moorcheh down`, `moorcheh status`, `moorcheh namespace-create`, `moorcheh upload-documents`, `moorcheh search`, `moorcheh answer`.

Run `moorcheh --help` or see [docs.moorcheh.ai/on-prem](https://docs.moorcheh.ai/on-prem) for the full CLI and API reference.

## Project layout

| Path | Purpose |
|------|---------|
| `moorcheh/client/` | Python SDK |
| `moorcheh/cli/` | CLI and Docker runtime |

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).

## License

[Moorcheh Community Edition License Agreement](LICENSE) - free for single-node, non-commercial use. Not an OSI-approved open-source license. Enterprise licensing: [sales@moorcheh.ai](mailto:sales@moorcheh.ai).
