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

# Quick Start

> Get Kremis running in under 2 minutes.

## Prerequisites

* **Rust 1.89+** (stable, edition 2024)
* Cargo (included with Rust)

## Build

```bash theme={null}
git clone https://github.com/TyKolt/kremis.git
cd kremis
cargo build --release
cargo test --workspace
```

## First Run

<Steps>
  <Step title="Initialize the database">
    ```bash theme={null}
    cargo run -p kremis -- init
    ```
  </Step>

  <Step title="Ingest sample data">
    The repository includes sample signals with 3 entities (Alice, Bob, Kremis) and their relationships.

    ```bash theme={null}
    cargo run -p kremis -- ingest -f examples/sample_signals.json -t json
    ```
  </Step>

  <Step title="Start the HTTP server">
    ```bash theme={null}
    cargo run -p kremis -- server
    ```

    The server starts on `http://localhost:8080` by default.
  </Step>

  <Step title="Query the graph">
    In a separate terminal:

    ```bash theme={null}
    # Health check
    curl http://localhost:8080/health

    # Look up entity 1 (Alice)
    curl -X POST http://localhost:8080/query \
         -H "Content-Type: application/json" \
         -d '{"type": "lookup", "entity_id": 1}'

    # Traverse from node 0, depth 3
    curl -X POST http://localhost:8080/query \
         -H "Content-Type: application/json" \
         -d '{"type": "traverse", "node_id": 0, "depth": 3}'

    # Get properties of node 0
    curl -X POST http://localhost:8080/query \
         -H "Content-Type: application/json" \
         -d '{"type": "properties", "node_id": 0}'
    ```
  </Step>
</Steps>

<Warning>
  CLI commands and the HTTP server cannot run simultaneously — redb holds an exclusive lock. Stop the server before using CLI commands like `ingest`, `status`, or `export`.
</Warning>

<Note>
  By default, API key authentication is disabled. The server logs a warning on startup. This is expected for local development. To enable authentication, set the `KREMIS_API_KEY` environment variable or add `api_key` under `[security]` in `kremis.toml` before exposing the server on a network.
</Note>

## Docker

```bash theme={null}
docker build -t kremis .

# MCP server (default) — pipe MCP stdio JSON-RPC; suitable for any MCP client
docker run -i --rm kremis

# HTTP API only — override the entrypoint
docker run -d -p 8080:8080 -v kremis-data:/data \
  --entrypoint kremis kremis server -H 0.0.0.0 -D /data/kremis.db
```

With configuration:

```bash theme={null}
docker run -d -p 8080:8080 \
  -v kremis-data:/data \
  -e KREMIS_API_KEY=your-secret \
  -e KREMIS_CORS_ORIGINS="https://example.com" \
  --entrypoint kremis kremis server -H 0.0.0.0 -D /data/kremis.db
```

Multi-stage build (\~152 MB image). Data persists in `/data` volume. Built-in healthcheck on `/health`.

## Next Steps

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/api/overview">
    Explore all HTTP endpoints
  </Card>

  <Card title="CLI Reference" icon="terminal" href="/cli/overview">
    Full command-line documentation
  </Card>

  <Card title="Core Concepts" icon="lightbulb" href="/concepts/signals">
    Understand signals, graphs, and stages
  </Card>

  <Card title="MCP Server" icon="robot" href="/mcp/overview">
    Connect AI assistants to Kremis
  </Card>
</CardGroup>
