Local inference client for Loreguard NPCs
Project description
Loreguard
┌────────────────────────────────────────────────────────────────────────────────┐
│ │
│ ██╗ ██████╗ ██████╗ ███████╗ ██████╗ ██╗ ██╗ █████╗ ██████╗ ██████╗ │
│ ██║ ██╔═══██╗██╔══██╗██╔════╝ ██╔════╝ ██║ ██║██╔══██╗██╔══██╗██╔══██╗ │
│ ██║ ██║ ██║██████╔╝█████╗ ██║ ███╗██║ ██║███████║██████╔╝██║ ██║ │
│ ██║ ██║ ██║██╔══██╗██╔══╝ ██║ ██║██║ ██║██╔══██║██╔══██╗██║ ██║ │
│ ███████╗╚██████╔╝██║ ██║███████╗ ╚██████╔╝╚██████╔╝██║ ██║██║ ██║██████╔╝ │
│ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ │
│ │
│ Local inference for your game NPCs │
│ loreguard.com │
│ │
└────────────────────────────────────────────────────────────────────────────────┘
AI-Powered NPCs using your own hardware (your servers or your player's hardware) Loreguard CLI connects the LLM Inference to the Loreguard NPC system.
How It Works
┌─────────────────┐ wss://api.loreguard.com ┌─────────────────┐
│ Your Game │◄────────────────────────────► │ Loreguard API │
│ (NPC Dialog) │ │ (Backend) │
└─────────────────┘ └────────┬────────┘
│
│ Routes inference
│ to your worker
▼
┌─────────────────┐
│ Loreguard CLI │◄── You run this
│ (This repo) │
└────────┬────────┘
│
│ Local inference
▼
┌─────────────────┐
│ llama.cpp │
│ (Your GPU/CPU) │
└─────────────────┘
Installation
Linux / macOS
pip install loreguard-cli
Windows
Download loreguard.exe from Releases.
Or install via pip if you have Python:
pip install loreguard-cli
From Source
git clone https://github.com/beyond-logic-labs/loreguard-cli
cd loreguard-cli
pip install -e .
Quick Start
Interactive Mode (no arguments)
loreguard
The wizard guides you through:
- Authentication - Enter your worker token
- Model Selection - Choose or download a model
- Running - Starts llama-server and connects to backend
Headless Mode (with arguments)
loreguard --token lg_worker_xxx --model /path/to/model.gguf
Or auto-download a supported model:
loreguard --token lg_worker_xxx --model-id qwen3-4b-instruct
Environment variables:
export LOREGUARD_TOKEN=lg_worker_xxx
export LOREGUARD_MODEL=/path/to/model.gguf
loreguard
Chat Mode (test NPC pipeline)
Test your NPC chat without running a local model:
loreguard --chat --token lg_worker_xxx
This connects directly to the Loreguard API to:
- List your registered NPCs
- Select one to chat with
- See verification status and latency
Supported Models
Works with any .gguf model. Tested with the following model families:
- Qwen - Recommended for best quality/speed balance
- Llama - Meta's open models
- GPT - GPT-style open models
- RNJ - Specialized models
- Violet Lotus - Community fine-tunes
Use any model with --model /path/to/model.gguf.
Use Cases
For Game Developers (Testing & Development)
Use Loreguard CLI during development to test NPC dialogs with your own hardware:
# Start the worker
loreguard-cli --token $YOUR_DEV_TOKEN --model-id qwen3-4b-instruct
# Your game connects to Loreguard API
# NPC inference requests are routed to your local worker
For Players (Coming Soon)
Note: Player distribution support is in development. Currently, players would need their own Loreguard account and token.
We're working on a Game Keys system that will allow:
- Developers to register their game and get a Game API Key
- Players to run the CLI without needing a Loreguard account
- Automatic worker provisioning scoped to each game
Interested in early access? Contact us at loreguard.com
Requirements
- RAM: 8GB minimum (16GB+ for larger models)
- GPU: Optional but recommended (NVIDIA CUDA or Apple Silicon)
- Disk: 2-6GB depending on model
- Python: 3.10+ (if installing from source)
Get Your Token
- Go to loreguard.com/developers
- Create a worker token
- Use it with
--tokenorLOREGUARD_TOKEN
Development
git clone https://github.com/beyond-logic-labs/loreguard-cli
cd loreguard-cli
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
# Run interactive wizard
python -m src.wizard
# Run headless CLI
python -m src.cli --help
# Run tests
pytest
License
MIT
Project details
Release history Release notifications | RSS feed
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 loreguard_cli-0.3.8.tar.gz.
File metadata
- Download URL: loreguard_cli-0.3.8.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f7fe4fb2920998ccbb09ce162fbb60670b5bce6faf7369f22fe5684df87766c
|
|
| MD5 |
4a246012364eff8508643ce7d5ea30f1
|
|
| BLAKE2b-256 |
7cfc5afaca4c09a31548bbae4f8e579f97b849f900451f86fa786d291641e013
|
Provenance
The following attestation bundles were made for loreguard_cli-0.3.8.tar.gz:
Publisher:
release.yml on beyond-logic-labs/loreguard-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loreguard_cli-0.3.8.tar.gz -
Subject digest:
5f7fe4fb2920998ccbb09ce162fbb60670b5bce6faf7369f22fe5684df87766c - Sigstore transparency entry: 788105676
- Sigstore integration time:
-
Permalink:
beyond-logic-labs/loreguard-cli@002b490df0ffb6a9ecf440f3b939c2285e5c1c60 -
Branch / Tag:
refs/tags/v0.3.8 - Owner: https://github.com/beyond-logic-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@002b490df0ffb6a9ecf440f3b939c2285e5c1c60 -
Trigger Event:
push
-
Statement type:
File details
Details for the file loreguard_cli-0.3.8-py3-none-any.whl.
File metadata
- Download URL: loreguard_cli-0.3.8-py3-none-any.whl
- Upload date:
- Size: 47.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01f1d9f8880912f6c81f336935ceb2015d93087c9dc26b5c80f2498bf78c8b7b
|
|
| MD5 |
ef3748c44cde46632bddf136f3b5e7ae
|
|
| BLAKE2b-256 |
f928ceb18a591ae1355d64bcd2798eddd1444a7a6682d1b5995dd4785782ddee
|
Provenance
The following attestation bundles were made for loreguard_cli-0.3.8-py3-none-any.whl:
Publisher:
release.yml on beyond-logic-labs/loreguard-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loreguard_cli-0.3.8-py3-none-any.whl -
Subject digest:
01f1d9f8880912f6c81f336935ceb2015d93087c9dc26b5c80f2498bf78c8b7b - Sigstore transparency entry: 788105679
- Sigstore integration time:
-
Permalink:
beyond-logic-labs/loreguard-cli@002b490df0ffb6a9ecf440f3b939c2285e5c1c60 -
Branch / Tag:
refs/tags/v0.3.8 - Owner: https://github.com/beyond-logic-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@002b490df0ffb6a9ecf440f3b939c2285e5c1c60 -
Trigger Event:
push
-
Statement type: