Skip to content

IAmBgWithCid/lorekeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🪶 Lorekeeper

An AI writing assistant that knows your world — grammar, style, and lore-aware suggestions for fiction writers.

Lorekeeper is an Obsidian plugin backed by a local Python engine. As you write, it watches for pauses, retrieves relevant context from your vault using RAG, and sends your current sentence to a local LLM for grammar and style suggestions — aware of your characters, your world, and your voice.


✨ Features

  • Lore-aware suggestions — knows your characters, factions, and world bible
  • Style & pacing feedback — not just grammar, but voice consistency
  • Character name correction — typed Kaeltas? It knows you meant Kaelthas
  • Session-scoped memory — indexes your vault on startup, updates on file change, releases on close
  • Fully local — Ollama + a Python sidecar, nothing leaves your machine
  • Configurable debounce — tune how long it waits after you stop typing

🏗️ Architecture

Obsidian Plugin (TypeScript)
        │
        │  HTTP (localhost)
        ▼
Lorekeeper Engine (Python / PyInstaller)
        │
        ├── RAG Pipeline (sentence-transformers + vector store)
        │       └── Your Vault (chunks, embeddings, timestamps)
        │
        └── Ollama (local LLM)
  • The plugin handles typing detection, debounce, and displaying suggestions
  • The engine handles vault indexing, context retrieval, and LLM calls
  • They communicate over a local HTTP API

🚀 Getting Started

⚠️ Work in progress — not yet available on the Obsidian community plugin store.

Requirements

  • Obsidian (desktop only)
  • Ollama with a model pulled (e.g. qwen2.5:9b)
  • Lorekeeper Engine exe (download link coming soon)

Installation

  1. Download the Lorekeeper Engine exe from Releases
  2. Clone this repo into your vault's .obsidian/plugins/lorekeeper/ folder
  3. Enable the plugin in Obsidian → Settings → Community Plugins
  4. Go to Lorekeeper settings and set the path to the engine exe

📁 Project Structure

lorekeeper/
├── plugin/         # TypeScript — Obsidian plugin
│   └── src/
│       ├── main.ts
│       └── settings.ts
└── engine/         # Python — RAG pipeline + Ollama sidecar

🗺️ Roadmap

  • Plugin skeleton with debounce typing detection
  • Settings system (engine path, debounce delay)
  • Python FastAPI engine with basic Ollama call
  • Vault indexing with session-scoped RAG
  • Inline suggestion display in editor
  • Character name fuzzy matching
  • First public release

🛠️ Development

# Plugin
cd plugin
npm install
npm run dev   # watches for changes, rebuilds automatically

# Engine
cd engine
pip install -r requirements.txt
python main.py

📜 License

MIT

About

A obsidian plugin to fix your grammar when you are typing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors