> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memanto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation & Setup

> Install Memanto, configure your Moorcheh API key, and verify your setup.

# Installation & Setup

Memanto requires a Moorcheh API key or run it [On-Prem](/on-prem/overview) for free. This page focuses on setup only.

For exact CLI command output and full command behavior, use the [CLI Overview](/cli/overview).

## Prerequisites

* **Python 3.10+** (for CLI and local server)
* **Node.js 18+** (for TypeScript SDK)
* **Docker** (optional, for containerized deployment)
* **Moorcheh API key** (free tier available)

<Tip>
  Want to run everything on your own hardware without a Moorcheh API key? See the [On-Prem Quickstart](/on-prem/quickstart) — same CLI, local Moorcheh server in Docker, optional fully-local Ollama for embeddings and LLM answers.
</Tip>

## Step 1: Get a Moorcheh API Key

Quick path:

1. Go to [https://moorcheh.ai](https://moorcheh.ai) and create an account.
2. Open [https://console.moorcheh.ai](https://console.moorcheh.ai).
3. Go to API Keys and create a new key.
4. Copy the key immediately (it is only shown once).

This is enough to continue installation.

For advanced topics (security practices, free tier planning, multi-environment setup, and sovereign deployment), see [Moorcheh Setup & Integration](/guides/moorcheh-integration).

## Step 2: Install Memanto

Choose your preferred method:

### Option A: CLI install (recommended)

```bash theme={null}
pip install memanto
```

Or with `uv`:

```bash theme={null}
pip install uv
uv tool install memanto
```

### Option B: TypeScript / Node.js SDK

For Node.js and TypeScript projects, use the official SDK:

```bash theme={null}
npm install @moorcheh-ai/memanto
```

**Prerequisites:** Node.js 18+ and `uvx` on PATH ([install uv](https://docs.astral.sh/uv/getting-started/installation/)).

The SDK boots a local Memanto server on demand and exposes an ergonomic `Memanto` client. See the [TypeScript SDK Reference](/sdk/typescript) for full documentation.

### Option C: Install from source

For development and customization:

```bash theme={null}
git clone https://github.com/moorcheh-ai/memanto.git
cd memanto
pip install uv
uv sync
```

### Option D: Docker

**Pull the pre-built image (recommended):**

```bash theme={null}
docker pull moorcheh/memanto:latest
docker run -p 8000:8000 -e MOORCHEH_API_KEY=your_api_key moorcheh/memanto:latest
```

The server is now available at `http://localhost:8000`.

**Or build from source:**

```bash theme={null}
git clone https://github.com/moorcheh-ai/memanto.git
cd memanto
docker build -t memanto .
docker run -p 8000:8000 -e MOORCHEH_API_KEY=your_api_key memanto
```

## Step 3: Configure API Key

Recommended interactive setup:

```bash theme={null}
# Launch interactive configuration
memanto
```

Follow the prompts:

```
Enter your Moorcheh API key: your_api_key_here
[Optional] Configure daily summary schedule? (y/n): y
What time should daily summaries run? (HH:MM in 24-hour format, UTC): 09:00
```

Configuration is stored in \~/.memanto/config.json (secure, not in git).

### Manual Configuration

If you prefer to skip the interactive setup:

```bash theme={null}
# Set environment variable
export MOORCHEH_API_KEY=your_api_key

# Or create .env file in project directory
echo "MOORCHEH_API_KEY=your_api_key" > .env
```

### Confirm Configuration Is Saved

```bash theme={null}
memanto config show
```

Expected indicators:

```
Moorcheh API Key:    ✓ Configured
Configuration Path:  ~/.memanto/config.json
```

## Step 4: Verify Setup

```bash theme={null}
# Confirm CLI is installed
memanto --version
# Confirm key + connectivity + config
memanto status
```

Optional API/server verification:

```bash theme={null}
# Start local Memanto API server
memanto serve
```

In another terminal:

```bash theme={null}
# Verify health endpoint
curl http://localhost:8000/health
```

## Troubleshooting

* Missing API key: run `memanto` again, then check `memanto config show`.
* Connection issues: verify key in `memanto config show` and check network access.
* Port in use: run `memanto serve --port 8001`.
* Unauthorized errors from API calls: ensure you are sending the correct `X-Session-Token` header.

For full troubleshooting and expected command outputs, see:

* [CLI Overview](/cli/overview)

## Next Steps

* [Quickstart: CLI](./quickstart-cli)
* [Quickstart: REST API](./quickstart-api)
* [CLI Overview](/cli/overview)
* [API Reference](/api-reference/authentication)
