Yijing Oracle

approvedunreviewed

by Johannes Kaindl

Cast the I Ching (Yijing) in your vault: three-coin oracle with Wilhelm hexagram texts, readings saved as notes. Local-first, no cloud.

โ†“ 693 downloadsUpdated 2d agoAGPL-3.0

Yijing Oracle

License: AGPL-3.0 Docs: CC BY-SA 4.0 Release Platform

๐Ÿ‡ฌ๐Ÿ‡ง English ยท ๐Ÿ‡ฉ๐Ÿ‡ช Deutsch

Cast the I Ching (Yijing) inside Obsidian. A three-coin oracle with the classic Richard Wilhelm hexagram texts โ€” and every reading is saved as a vault note: searchable, linkable, part of your thinking. Local-first, no cloud, no account.

Native Obsidian re-implementation of the oracle core from the Yijing web/app project. Not a port of the whole thing โ€” a focused plugin where the vault is the oracle journal.

A saved reading open as a note in Obsidian, the oracle panel beside it showing the same hexagram

Features

  • Sidebar panel โ€” ask a question (or don't), cast the coins, see the hexagram figure, changing lines and the resulting hexagram, then save.
  • Readings as notes โ€” each cast becomes a Markdown note with frontmatter (hexagram, changing_lines, resulting, question, โ€ฆ) in a folder of your choice, or inserted at the cursor of the current note.
  • Bilingual DE + EN โ€” hexagram texts and UI in German or English; follows your Obsidian language or a fixed setting.
  • Register โ€” classic (Wilhelm) or gender-neutral phrasing.
  • Two direct commands โ€” Cast into a new note and Cast at the cursor โ€” plus the panel.
  • AI interpretation (optional, local) โ€” stream a reading interpretation from a local OpenAI-compatible LLM server (LM Studio, Ollama, โ€ฆ); system prompt, endpoints and reasoning display are configurable. Off until you set an endpoint.
  • Meditation image (optional, local) โ€” generate one image per reading from the hexagram's curated motif via a local A1111-compatible image server (Draw Things, A1111, Forge, โ€ฆ). Panel preview + note embed. Off until you set an endpoint โ€” see docs/image-generation.md for setup.

Requirements

  • Obsidian 1.11.4+ (desktop or mobile).
  • Nothing else for the oracle itself โ€” the hexagram data is bundled, and casting works fully offline.
  • Optional, for AI interpretation: an OpenAI-compatible local server (e.g. LM Studio or Ollama). Endpoint and model are set in the plugin settings. CORS on the server is optional: Obsidian's renderer sends Origin: app://obsidian.md, and most local servers reject that by default. The plugin then repeats the request without streaming, so the interpretation arrives in one piece instead of word by word. To get the live stream, enable CORS (LM Studio: lms server start --cors).
  • Optional, for meditation images: an A1111-compatible image server (e.g. Draw Things with its API server enabled). See the setup guide.

Both optional features stay off until you configure an endpoint. Nothing ever leaves your machine.

Install

Community plugins (recommended)

Search for Yijing Oracle in Settings โ†’ Community plugins โ†’ Browse, then click Install and Enable.

Manual

Download main.js, manifest.json and styles.css from the latest release and place them in <vault>/.obsidian/plugins/yijing-oracle/, then enable the plugin under Settings โ†’ Community plugins.

From source

git clone https://git.jkaindl.de/jkaindl/yijing-oracle
cd yijing-oracle
npm install
npm run build   # produces main.js

Then copy main.js, manifest.json and styles.css into <vault>/.obsidian/plugins/yijing-oracle/ and reload Obsidian.

Usage

Open the panel via the sparkles ribbon icon or the Open oracle panel command. Type a question (optional) and hit Cast the coins โ€” you get the hexagram figure, its changing lines and the resulting hexagram.

From there:

  • Save writes the reading as a note (or inserts a link at your cursor, depending on the Default output setting).
  • Interpret with AI streams an interpretation into the panel, if an LLM endpoint is configured. Generate image does the same for the meditation image. When you save, the interpretation is written into the note with remote images (including reference-style ones), Mermaid diagrams that would load remote images, and dataview/dataviewjs/js-engine blocks defused (shown as plain text), so opening the note does not load anything from the web.
  • New question clears the field for the next cast.
  • Past readings are listed below the panel โ€” clicking one reconstructs the cast from its frontmatter.

The oracle panel: question field, cast button, the hexagram as six lines, and the reading preview
The panel after a cast โ€” click to enlarge

A saved reading as a note: the question, the primary hexagram with its trigrams, judgment and image, the changing line, and the resulting hexagram
Every cast becomes a note like this โ€” searchable, linkable, yours.

Two commands skip the panel entirely and cast straight away:

CommandWhat it does
Cast a reading into a new noteCasts and writes the note, no question.
Cast a reading at the cursorCasts and inserts a link in the active note.

The two optional features

The AI interpretation box in the panel with a finished reading interpretation and a collapsed reasoning trace
AI interpretation, streamed from a local model
The meditation image box in the panel showing a generated image and the scene sentence below it
Meditation image, generated locally

Configuration

Settings โ†’ Yijing Oracle, grouped into five sections:

SectionWhat's in it
GeneralReading language (or follow Obsidian), register (classic / gender-neutral), default output (new note / at cursor).
Note & storageReadings folder, filename scheme ({date} {time} {hex} {resulting} {hexpair} {question}), open-after-save.
Note contentFrontmatter on/off plus a renameable key per field, Wilhelm's footnotes, per-section callout wrapping.
AI interpretationEndpoints (each row with its own API key and optional model), model, system prompt (built-in templates or your own), the Request section (temperature and thinking level per model family).
Image generationBackend (A1111/Draw Things or ComfyUI), endpoint, style suffix, negative prompt, size, steps. See the setup guide.

On endpoints: add them one row at a time โ€” the first reachable one wins, so the order is the priority (Try this endpoint first moves a row up). That way one config covers every network (localhost at your desk, LAN IP on the go) without switching anything. Each row has its own Test connection button with a plain-language result, and its own optional API key and model.

On API keys: each row's key is kept in Obsidian's keychain (OS-encrypted, per device), not in the vault โ€” so it is never synced or backed up along with your notes, and you enter it once per row on each device. Leave it empty for local servers. A key you set up before 0.11 (one key for all rows) is copied into every row on the first start; the old keychain entry stays untouched. With the LLM Endpoint Manager installed, the endpoints and keys come from there instead.

The plugin settings from top to bottom: general, note and storage, note content, AI interpretation, image generation
The full settings page โ€” click to enlarge

How it works

Three coins per line (distribution 1:3:3:1), six lines built bottom-up, mapped to the King-Wen sequence. Changing lines yield a second, resulting hexagram. All of this is pure, tested logic (src/core/) with a parity gate proving the King-Wen table matches the bundled data โ€” the fourth canonical copy alongside the web app, build script and the native OracleKit.

Development

npm install
npm run dev      # esbuild watch โ†’ main.js
npm run gate     # lint + typecheck + test + check:pure + check:bundle

The oracle core (src/core/) never imports obsidian (enforced by check:pure) and is fully unit-tested. The src/obsidian/ layer holds the view, settings and file I/O.

Documentation

License

Source code: AGPL-3.0-or-later (see LICENSE). The Richard Wilhelm translation in the bundled data is public domain. ยฉ 2026 Johannes Kaindl.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.