Knowlery

by Jay Jiang
5
4
3
2
1
Score: 44/100

Description

Reviews

No reviews yet.

Stats

15
stars
1,198
downloads
1
forks
53
days
14
days
14
days
73
total PRs
0
open PRs
2
closed PRs
71
merged PRs
2
total issues
1
open issues
1
closed issues
531
commits

Latest Version

15 days ago

Changelog

Every agent gets the same fixed context

  • Codex and OpenCode now receive Knowlery's instructions. Until now only Claude Code got the operating card and rules (via .claude/CLAUDE.md @ imports); Codex got nothing, and OpenCode V2 ignores the opencode.json instructions array Knowlery wrote. Knowlery now writes a vault-root AGENTS.md — the cross-vendor file read natively by Codex, OpenCode, Cursor, Gemini CLI and others — with a <!-- Knowlery managed:start/end --> block that carries your KNOWLEDGE.md, Knowlery's operating rules for the installed version, and every rule in .agents/rules/. Those harnesses cannot import files (Codex concatenates the AGENTS.md chain only; OpenCode V2 resolves neither @ references nor instructions), so the sources are copied in and the block is regenerated from them on init, rule add/remove, plugin load, and knowlery sync. Edit KNOWLEDGE.md or the rule files, never the block. Text outside the markers is preserved; a pre-existing hand-written AGENTS.md gets the block placed first and its own text after it. A new Reset AGENTS.md button in settings discards everything outside the block — the explicit way to drop pre-Knowlery instructions; sync never does that on its own. Codex caps the chain at 32 KiB; the block is ~10 KB.
  • Claude Code imports the sources instead of copying them. Claude's @ imports are hard injection, so .claude/CLAUDE.md gets its own managed block: @../KNOWLEDGE.md first (the most important part of the prompt), the operating rules inlined, then one @../.agents/rules/<file>.md import per rule (Claude has no glob import, so the list is regenerated on rule add/remove). It does not import AGENTS.md, which would put a second copy of the same text in front of Claude. An existing CLAUDE.md converges in place — the pre-1.5 @../KNOWLEDGE.md, managed @rules/*.md block, and stale @../SCHEMA.md / @../INDEX.base imports are replaced by the block; your own text stays after it. This also removes the double-loading of rules Claude had (auto-load + import).
  • One rules directory: .agents/rules/. Rules are no longer split per platform. Existing .claude/rules/*.md are copied into .agents/rules/ on the first sync (nothing is deleted). Claude Code also auto-loads .claude/rules/, so until you remove that directory Claude sees those rules twice — harmless; delete it once .agents/rules/ holds everything. Rules carrying Claude's paths: frontmatter are inlined into AGENTS.md with the scope restated as an "Applies to files matching" line.
  • Both entry files are written whichever platform is selected, and neither is written for an uninitialized vault. The platform switch in settings no longer regenerates or migrates config (there is nothing platform-specific left); it only changes CLI detection and labels.
  • Vault-level opencode.json retired. New inits no longer write it; sync removes the two Knowlery instructions entries from an existing one and deletes the file when nothing user-added remains.
  • Scaffold contract: AGENTS.md joins the frozen top-level surface as a new optional file (1.0 f5 §4.1, minor). Health check, setup-wizard copy, settings strings, and the vault-conventions skill describe the new layout.

KNOWLEDGE.md is yours; the operating rules are Knowlery's

  • Operating rules move out of KNOWLEDGE.md. KNOWLEDGE.md was written once at setup and never migrated — which meant every fix to the Obsidian CLI rules, the retrieval procedure, or the skills table reached new vaults only. Those sections now render from the template into the entry files on every sync. The KNOWLEDGE.md template shrinks to what is genuinely yours: title, intro, Vault Structure, and an "About This Knowledge Base" section to fill in — the description agents read first.
  • Existing vaults are cleaned up on upgrade. The pre-1.5 ## Operating Rules / ## Knowledge Retrieval / ## Available Skills sections in your KNOWLEDGE.md are stale (they still told agents to query INDEX.base) and would now come ahead of the current rules. Sync — and every plugin load, so it happens even without a version change — removes the three sections together with the template's own subsections (Obsidian CLI Only, Writing Conventions, Knowledge Workflows, Quick Reference). Anything you added under them as an ### of your own is kept and promoted to ## in the same position; the installed-bundles block is re-placed at the end; every other line is untouched. The original file is copied once to .knowlery/backups/KNOWLEDGE.pre-1.5.md before the first write. knowlery health warns while a vault the CLI has not synced yet still carries the sections.
  • Renaming the knowledge base no longer overwrites KNOWLEDGE.md. The settings rename used to regenerate the whole file from the template, discarding your edits; it now retitles the first heading only.
  • Installed-bundles hint fixed. The KNOWLERY:INSTALLED_BUNDLES block in KNOWLEDGE.md was hard-coded as list item "9." from a retrieval list that has had five steps since 0.6; it is now a standalone paragraph, and a leftover block is removed when no bundles are installed.

Retrieval guidance

  • Query with subject terms, not the request. A Codex session passed a request-shaped question (…方案是什么?请返回相关的最新原始记录、决策上下文…) to knowlery:query and the engine abstained on a topic the vault covers thoroughly: request words can never be covered by a page, and weighted by CJK length they sank coverage to ~15%. /ask and the operating rules now say to pass 2–6 subject terms in the user's own language and to retry once with keywords before declaring the vault silent.
  • The dot-directory boundary is on the operating card. A Codex session tried obsidian read on ~/.agents/skills/ask/SKILL.md (wrong tool, wrong path) and took the CLI's Error: … not found / exit 0 as success. The operating rules now state what the obsidian-cli skill already did: Obsidian CLI reaches only notes in the vault index; skills, rules, and config under .agents/, .claude/, .knowlery/ are read with file tools; Error: output is failure regardless of exit code; skills live at the vault-relative .agents/skills/<name>/SKILL.md.
  • INDEX.base is a human preview, not a retrieval step. Since 0.6 the deterministic engine replaced index-driven discovery; the remaining "check / read INDEX.base" instructions in /ask, /cook, /explore, /ideas and the operating card's CLI table are gone. The file itself is unchanged and still renders in Obsidian.

Fixes

  • The mcp serve smoke test no longer races the second startup line.
  • Settings: the Reset button uses the mod-warning class directly instead of the deprecated setWarning() (the replacement API needs Obsidian 1.13, above minAppVersion).

Removed

  • BYOAO legacy migration. All BYOAO vaults have moved to Knowlery; the detection/migration module, the setup wizard's migration mode, and the "formerly BYOAO" skill pointer are gone. vault-conventions now tells agents to read KNOWLEDGE.md instead of the BYOAO-era AGENTS.md.

README file from

Github

The knowledge base your agents can live in.

A local-first knowledge system for people and agents. Plain Markdown in. Traceable knowledge out.

Release npm Docs License: MIT

One plain-markdown workspace, served by three shells: an MCP server and CLI for Codex, Claude, Cursor, and Antigravity — and an Obsidian plugin as its richest human interface. Obsidian maximizes Knowlery; nothing about it requires Obsidian.

Your free-form notes stay yours. Agents get a structured, retrievable layer — entities/, concepts/, comparisons/, queries/ — compiled from your material through a reviewed pipeline, plus the skills and conduct that make them good collaborators. Retrieval is deterministic and measured, answers carry citations, and "no confident match" is an honest verdict instead of noise. The workspace format, CLI surface, and MCP contracts are frozen under semver and pinned by contract tests.

Read the official documentation: https://jayjiangct.github.io/knowlery/.

Two ways to start

With your agent (no Obsidian required)

Install the agent plugin — MCP server plus all fifteen skills — with a two-command marketplace flow:

Claude Code:  /plugin marketplace add JayJiangCT/knowlery
              /plugin install knowlery

Codex:        codex plugin marketplace add JayJiangCT/knowlery
              codex plugin add knowlery@knowlery

Start a new agent session after installation so the bundled skills and MCP tools are loaded. In Codex Desktop, open Plugins → Installed to confirm that Knowlery is enabled.

Or add one MCP config block to any client (Cursor, Claude Desktop, Antigravity, …):

{ "command": "npx", "args": ["-y", "knowlery@^1", "mcp"] }

Then everything is conversation: "set up a knowledge base called main", "remember this", "what do I know about X?", "give my KB a checkup". Per-client setup: Connect Your Agent · usage by conversation: Talk to Your Knowledge Base.

In Obsidian

Install Knowlery from Obsidian's community plugin directory (Settings → Community plugins → Browse) and run the setup wizard. You get the action-first dashboard, Knowledge health, and the bundle sharing UI — and the vault registers itself so every agent can address it by name. Full walkthrough: Start in Obsidian.

Either way it's the same plain folder: a KB born in a conversation opens in Obsidian with zero migration, and an Obsidian vault is automatically available to your agents.

Brand

Knowlery's identity is the Atlas Fold system — a K-shaped route connecting source, structure, and retrieval, drawn in graphite and paper with a single Knowledge Lime signal. The metaphor is deliberate: a map you can trust, not a mind you have to believe.

Position Local-first knowledge infrastructure — your notes remain plain Markdown; Knowlery adds structure, retrieval, and agent access without taking ownership of the source.
Character Exact, calm, and quietly alive — technical enough to earn developer trust, warm enough to feel like a place where knowledge accumulates.
Difference Structure over spectacle — no chatbot face, neural cloud, or AI glow. The visual language is navigation through a maintained body of knowledge.

The full brand system — logo construction, palette, typography, voice, and usage rules — lives in design/brand/ (open brand-guide.html in a browser). Marks, lockups, and the app icon are under design/brand/assets/.

Inspiration: LLM Wiki & BYOAO

Andrej Karpathy's "LLM Wiki"

In LLM Wiki, Andrej Karpathy describes a pattern different from one-off RAG: instead of re-deriving answers from raw notes on every question, an agent incrementally builds and maintains a persistent wiki—structured, interlinked markdown that sits between you and your sources. New material is read, distilled, and folded into entity pages, topic summaries, and cross-links; the base is kept current rather than re-scanned from scratch each time.

Knowlery operationalizes that maintenance story: the layout (KNOWLEDGE.md, SCHEMA.md, the four compiled directories), the skills (/cook, /ask, and friends), the staleness report that tells the agent exactly what to fold in next, and the health checks that keep the machinery honest — with a clear boundary (your free-form notes stay yours; the agent works the shared map).

BYOAO

BYOAO (Build Your Own AI OS) was Knowlery's predecessor: an OpenCode-oriented flow that turned Obsidian into an AI-powered "LLM Wiki" style knowledge base with global CLI install. Working on BYOAO is what made it natural to ask: what if the same ideas lived as a first-class Obsidian plugin — and, later, as a proper CLI, an MCP server, and an agent plugin too. BYOAO is archived — its role is fully superseded.

Getting started (video)

Walkthrough preview

▶ Full walkthrough (~3 min, with audio) · same file: Releases

The CLI and MCP server

One-line install (isolated prefix, PATH handled with consent — never silently):

curl -fsSL https://jayjiangct.github.io/knowlery/install.sh | sh

(Or npm i -g knowlery, or zero-install via npx -y knowlery@^1 <command>.)

knowlery init     # scaffold a workspace (works brownfield — never touches your notes)
knowlery kb add work ~/vaults/work-kb    # name it; every command and agent can address it
knowlery sync     # bring skills, rules, and the retrieval script up to date
knowlery health   # config integrity + knowledge-page counts; exit code for CI
knowlery query --kb work "<question>"    # deterministic retrieval, from any directory
knowlery query --kb '*' "<question>"     # federated search across every registered KB
knowlery stale    # compiled pages whose sources changed; notes never compiled
knowlery bundle install <zip-folder-or-url>  # install a shared knowledge bundle
knowlery bundle publish <seed>               # review-gated publish to a GitHub Release
knowlery mcp      # MCP server over stdio: 9 tools, 10 skill prompts, page resources
knowlery mcp serve --port <n> --token-file <path>   # self-hosted remote mode

Retrieval works headlessly too: node .knowlery/bin/query.mjs "<question>" (written by init/sync) searches the workspace with Obsidian closed.

The Obsidian plugin

Requirements: Obsidian desktop 1.12.2+, community plugins enabled. Claude Code or OpenCode if you want to run installed skills from the dashboard; Node.js/npm for the optional external skills registry. Knowlery is desktop-only because it uses local command-line tools and Electron desktop APIs.

During the setup wizard, Knowlery can detect whether Claude Code, OpenCode, Node.js, and the external skills CLI are available, and can optionally help install or prepare missing agent tools. These steps are opt-in; if a tool is already installed, Knowlery skips it.

Install beta builds with BRAT

BRAT is the Beta Reviewers Auto-update Tool for Obsidian. Upstream project: TfTHacker/obsidian42-brat (documentation: tfthacker.com/BRAT).

  1. Install the BRAT plugin in Obsidian.
  2. Open BRAT settings, Add Beta plugin, and use https://github.com/JayJiangCT/knowlery.
  3. Enable Knowlery under Settings → Community plugins.

Manual install

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Put those files in .obsidian/plugins/knowlery/ inside your vault.
  3. Reload Obsidian and enable Knowlery from Settings → Community plugins.

Agent chat in Obsidian (optional companions)

If you also want a full agent chat inside Obsidian (sidebar, inline edit, multi-provider), consider installing one of these in addition to Knowlery:

  • Claudian — embeds Claude Code, Codex, and related flows in the vault; file read/write and bash from a chat UI.
  • obsidian-agent-client — brings agents in via Agent Client Protocol (ACP) with multi-session and MCP support.

What Knowlery Creates

During setup and normal use, Knowlery can create or update these files and folders inside your workspace:

  • KNOWLEDGE.md
  • SCHEMA.md (knowledge taxonomy and page conventions)
  • INDEX.base
  • entities/, concepts/, comparisons/, and queries/
  • inbox/, when the MCP capture tool saves conversation notes
  • .knowlery/manifest.json
  • .agents/skills/ and .agents/rules/ (the one rules directory, for every platform)
  • AGENTS.md — the entry file for Codex, OpenCode, and other agents (no import syntax there): KNOWLEDGE.md, Knowlery's operating rules, and the rule files copied into a managed block, regenerated on sync
  • .claude/skills/ and .claude/CLAUDE.md (the entry file for Claude Code: @-imports KNOWLEDGE.md and each rule, operating rules inlined)
  • skills-lock.json
  • .knowlery/activity/, when activity logging is enabled
  • .knowlery/reports/, when Weekly summary generates an HTML report
  • .knowlery/requests/ and .knowlery/reviews/, when daily review polish is used
  • .knowlery/exports/, when Share knowledge bundle compiles a bundle (plus an optional .zip next to it)
  • Library/<bundle-id>/ and .knowlery/bundles.json, when Install knowledge bundle installs a shared bundle
  • .knowlery/bin/query.mjs, the local retrieval script (written on setup and refreshed on upgrades)
  • ~/.config/knowlery/registry.json, the global registry of named knowledge bases (outside the vault)

Knowlery may delete skill or rule files only when you use the corresponding delete or disable actions in the UI, and may delete an installed bundle's Library/<bundle-id>/ folder when you uninstall that bundle.

Permissions and Disclosures

Knowlery does not collect telemetry.

Knowlery reads and writes files inside your workspace to create and maintain the knowledge base layout, bundled skills, rules, activity summaries, review requests, and generated reports listed above. It also reads Obsidian's configured plugin directory when detecting or installing optional companion plugins.

Network access is opt-in and feature-specific. The skill browser can call the external skills registry through npx skills ... when you search for or install registry skills. Bundle install/publish/update can contact the URLs and GitHub repositories you point them at (private access delegates to your own gh login; Knowlery never asks for or stores tokens). The setup wizard can download the latest Claudian release from GitHub when you choose to install that optional companion plugin.

Knowlery can run local CLI commands such as claude, opencode, node, npx, gh, and skills when you explicitly use CLI-related features. These commands run on your computer with your user permissions. Knowlery does not send vault contents to those tools by itself; agent requests are created only from the actions you trigger.

The MCP server (knowlery mcp) runs locally over stdio and serves only the knowledge bases you registered; resource reads are allowlisted to the curated knowledge surface — free-form notes are not readable over MCP. Remote mode (knowlery mcp serve) requires an explicit port and a bearer token you generate, is read-only unless each write is individually enabled by flag, and never logs or stores the token. The agent plugin performs no install scripts: MCP provisioning is configuration plus npx.

On Obsidian 1.12.2+ with the command line interface enabled, Knowlery registers two read-only CLI commands, knowlery:query and knowlery:stale, which search and inspect vault content locally when you (or an agent you run) invoke them. The bundled .knowlery/bin/query.mjs script does the same offline with plain Node; neither makes network requests.

Some companion tools or services used with Knowlery, including Claude Code, OpenCode, registry skills, or model providers configured outside Knowlery, may require separate accounts or paid usage. Knowlery itself is free and does not process payments.

Development

npm install
npm run build          # plugin (main.js) + CLI (knowlery-cli.mjs)
npm test               # behavior + contract suites
npm run build:plugin   # regenerate the agent plugin tree (drift-guarded in CI)

Release assets include main.js, manifest.json, styles.css, and knowlery-plugin-<version>.zip. Architecture and design docs: Architecture · Design Decisions · Stability Contract.

License

MIT (see LICENSE).