> ## 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.

# CLI overview

> moorcheh command-line interface for starting the runtime and calling the API.

## Install

```bash theme={null}
pip install moorcheh-client
```

The `moorcheh` command is installed with the package.

## Command groups

| Group          | Commands                                                                                | Purpose                               |
| -------------- | --------------------------------------------------------------------------------------- | ------------------------------------- |
| **Runtime**    | `configure`, `up`, `down`, `status`                                                     | Embedding setup and Docker containers |
| **Namespaces** | `namespace-create`, `namespace-list`, `namespace-delete`, `namespace-delete-job-status` | Namespace lifecycle                   |
| **Data**       | `upload-documents`, `upload-vectors`, `upload-job-status`                               | Ingest JSON documents/vectors         |
| **Files**      | `upload-file`, `list-files`, `file-get`, `delete-file`, `file-job-status`               | Upload from `~/.moorcheh/uploads`     |
| **Items**      | `items-get`, `items-delete`                                                             | Read or remove items by id            |
| **Search**     | `search`                                                                                | Semantic search                       |
| **AI**         | `answer`                                                                                | RAG / direct LLM                      |

## Typical workflow

```bash theme={null}
moorcheh configure   # optional; first moorcheh up can prompt
moorcheh up
moorcheh status
moorcheh namespace-create --name docs --type text
moorcheh upload-documents --namespace-name docs --documents-file docs.json
moorcheh upload-job-status --namespace-name docs --job-id <job_id>
moorcheh search --query "your question" --namespaces docs --top-k 5
moorcheh down
```

## Output

API commands print **JSON** to stdout. `status` also prints a one-line quota summary before the JSON.

Errors print to stderr and exit with code `1`.

## Data directory

`moorcheh up` stores index data at `~/.moorcheh/data` and mounts `~/.moorcheh/uploads` as `/uploads` in the server. `moorcheh down` stops containers but does not delete your data or uploaded files.

## Shared flag: `--base-url`

Most API commands accept:

```bash theme={null}
--base-url http://localhost:8080
```

Use a different port if you started the server with `moorcheh up --server-port 8081`.

## Help

```bash theme={null}
moorcheh --help
moorcheh up --help
moorcheh search --help
```
