OpenLore README

The project's README from github.com/aakarim/OpenLore. As one markdown file: README.md.

📜 OpenLore

Release Go Reference

Sponsored by Oiya

Serve your docs to AI agents over SSH and MCP.

Point OpenLore at a folder of Markdown and every agent on your team reads the same files, whether it's Claude Code, Codex, Cursor or a CI job. Agents use the tools they already know, like cat, grep and find. You decide who can see and change what.

Claude Code, Codex and a CI job connect to one OpenLore server, which checks each identity's access and serves the same folder of Markdown

Quick start

Install and serve a folder:

brew install --cask aakarim/tap/lore
openlore ./docs

SSH runs on port 2222. The web view and MCP share port 8080. The contents of ./docs appear at /.

Connect an agent:

# Claude Code
claude mcp add --transport http openlore http://localhost:8080/mcp

# Codex
codex mcp add openlore --url http://localhost:8080/mcp

# Anything with a shell
ssh -p 2222 localhost "grep -r 'retry' /"

Tell your agents when to use it:

ssh -p 2222 localhost agents >> AGENTS.md

Or let your agent do the whole setup:

ssh openlore.sh teach | claude

Not on Homebrew? See Installation for Linux, Windows and Go.

Why not just keep Markdown in your repo?

For one agent in one repository, do that.

OpenLore is for when several agents, repositories or people need the same knowledge, and you need to say who can read, write or publish what. Update a file once and every agent sees the new version on its next read.

There's no vector database, ingestion pipeline or SDK. Your knowledge stays as ordinary Markdown.

Guides

Features

Use Cases

How It Works

OpenLore is built on Wish for SSH transport. A connection is handled entirely against a virtual filesystem:

  1. Authenticate — connect keylessly or resolve an SSH key, certificate, passkey, or OAuth login to an identity.
  2. Compose a view — mount only the docsets and paths granted to that identity.
  3. Explore — run shell commands implemented as pure Go functions over that view, or use the equivalent MCP shell tool.
  4. Contribute safely — if writing is enabled, authorise and validate a whole-file change before committing it atomically.

OAuth clients use delegated identities, so durable write provenance distinguishes direct work by adil from work performed as adil/[email protected]. Delegates can inherit no more authority than their principal and can be narrowed by docset and capability deny lists. CIMD clients can additionally authenticate with vendor-hosted metadata and private_key_jwt; see Authenticated OAuth Clients.

The normal shell cannot invoke bash, exec, curl, or arbitrary host processes. Embedded documentation is always read-only. Explicitly trusted identities can be granted narrowly scoped asynchronous processing through the spawn capability.

Governed Writing

OpenLore is read-only by default. Writable deployments keep a single, policy-controlled write path for redirects, append, tee, patch, sed -i, file moves, publishing, and trusted external jobs.

echo "# Research" | publish /backend/findings.md
cat change.diff | patch /backend/api.md
sed -i 's/old/new/g' /backend/runbook.md

Writes are whole-object atomic swaps. Compare-and-swap protection rejects stale edits by default, docset grants constrain the target, and plugins can validate or defer a write before it commits.

See Writing and publishing for user-facing setup and Write system internals for the implementation model.

Installation

Install with Homebrew

Homebrew is supported on macOS and Linux:

brew install --cask aakarim/tap/lore

Install a Linux release

Download and install the latest x86-64 release:

curl -L https://github.com/aakarim/OpenLore/releases/latest/download/openlore_linux_amd64.tar.gz | tar xz
sudo install openlore /usr/local/bin/openlore

Arm64 archives are published as openlore_linux_arm64.tar.gz.

Install a Windows release

Download and extract the latest 64-bit Windows release from PowerShell:

Invoke-WebRequest `
  -Uri https://github.com/aakarim/OpenLore/releases/latest/download/openlore_windows_amd64.zip `
  -OutFile openlore.zip
Expand-Archive openlore.zip -DestinationPath .
.\openlore.exe version

Install with Go

Requires Go 1.26 or later:

go install github.com/aakarim/go-openlore/cmd/openlore@latest

Build from source

git clone https://github.com/aakarim/go-openlore.git
cd go-openlore
go build -o openlore ./cmd/openlore

This normal Go build is backend-only and does not require Node. Release binaries and containers include the dashboard; see Dashboard build and distribution.

Embed docs in a binary

Place documentation in assets/lore/ and build. The resulting binary contains the docs and serves them read-only at /docs when run with no directory argument:

go build -o my-docs ./cmd/openlore

Build with the GitHub Action

Produce cross-platform binaries with your docs embedded:

- uses: aakarim/openlore@v1
  with:
    docs-dir: ./docs
    config: ./openlore.yml

See Ways to use OpenLore for direct VS Code editing, MCP stdio, MCPB desktop packaging, SSHFS, and Go library usage.

Create a customised deployment

Use the bundled setup skill to create <team>-lore, a small customer-owned repository containing openlore.yml, a thin Containerfile pinned to an official OpenLore release, and deployment artifacts. It builds a working local server and verifies HTTP, MCP, authenticated SSH, writes, and persistence before deployment:

ssh openlore.sh setup | amp

The generated repository keeps initial lore.json policy and SSH-visible files under gitignored .local/. The first deployment initialises an empty persistent volume from that state. Root openlore.yml remains the Git/IaC authority and is deployed separately to /var/lib/openlore/config/openlore.yml; it is not baked into the image. Later lore.json and filesystem edits on the server are authoritative and are never overwritten by image updates.

Additional instruction commands support the full lifecycle:

Provider deployments require HTTPS/MCP, authenticated OpenLore SSH, administrative shell access, and a persistent /var/lib/openlore volume. Where the provider supports it, deployment configures public port 22 to forward to OpenLore port 2222. Otherwise it reports the assigned port and recommends an external TCP forwarding system.

The published container contains only OpenLore. It deliberately contains no onboarding policy or server configuration. Before the service starts, the deployment must put openlore.yml and lore.json in the persistent config directory and run:

./out --config /var/lib/openlore/config/openlore.yml

This keeps configuration independently deployable: a simple deployment can copy openlore.yml onto the volume, while Kubernetes can project the same file from a ConfigMap. Use the deploy skill for Fly.io, Railway, AWS, Google Cloud, Azure, DigitalOcean, or custom infrastructure. The repository's Railpack and Fly files provide the image, persistent-volume, and port wiring; they do not seed or mutate configuration at process startup.

Railway assigns its SSH TCP proxy a public hostname and port. Standard SSH port 22 requires an external raw TCP load balancer. Fly.io can map public port 22 to OpenLore's internal port 2222 with a dedicated address. Raw SSH has no hostname or SNI routing, so one listener cannot route multiple domains on port 22.

The container workflow publishes latest from main; releases also publish VERSION, vVERSION, major, and minor image tags.

Documentation

Guide Contents
Changelog Current version, release notes, compatibility notes, and versioned docs
What is OpenLore Serve, connect, scope, govern and observe in one page
Claude Code with OpenLore Connect Claude Code over MCP and scope what it sees
Any agent with OpenLore over SSH Connect a coding agent or CI job over SSH and give it an identity
Let an agent publish into an inbox Accept contributions from an agent without letting it edit anything else
Ways to use OpenLore SSH, MCP, web, SSHFS, embedded binaries, GitHub Action, MCPB, and library usage
Editing OpenLore files Direct VS Code and SFTP editor setup without a local project mirror
Command reference Complete shell, introspection, publishing, syntax, CLI command, and flag reference
Configuration and identity openlore.yml, authentication, roles, docsets, aliases, homes, and host verification
openlore.yml reference Generated reference for every key openlore.yml accepts
HTTP inbox uploads Upload documents with bearer or HMAC credentials
Workload identity federation Authenticate CI and agents with short-lived external identity tokens
Writing and publishing Write modes, inboxes, conflict handling, approvals, and jobs
Plugins and knowledge formats Plugin installation, interfaces, OKF validation, lore validate, and lore meta
Folder rules .lore/config.yaml and lore.json rules, layering, permissions, rejection messages, and growth limits
Rules standard library Generated reference for compiled-in rule members and their parameters
Write system internals Filesystem layering, write seam, admission middleware, and async jobs
Security evaluation Threat model and security properties

Security

See SECURITY.md for the full security evaluation.

License

Apache License 2.0 — Copyright © 2026 Adil Karim

OpenLore bundles third-party open-source components. Their licences and required notices are listed in assets/legal/THIRD_PARTY_NOTICES.md, with full licence texts in assets/legal/licenses/. These are embedded in the binary and served by the running service at /legal.

OpenLore (aakarim/OpenLore)

Searching Database…

这是什么?OpenLore 是一个自托管的、面向智能体的知识服务器:把它指向一个 Markdown 文件夹,团队里的每个智能体(Claude Code、Codex、Cursor、CI 任务)都通过 SSH 和 MCP 读取同一批文件,并且能控制谁可以看什么、改什么。
这是我要导入的库,还是要运行的服务器?它是你运行的服务器:在 2222 端口通过 SSH、在 8080 端口通过 MCP/web 对外提供一个 Markdown 文件夹,而不是 SDK、向量库或数据摄取管道。
怎么让 OpenLore 跑起来并把智能体接上去?可以通过 macOS/Linux 的 Homebrew、可下载的 Linux/Windows 发行包、go install 或从源码构建来安装,然后让它指向一个文档文件夹,并通过 SSH 或 MCP 连接智能体;自带的 setup 技能还能让智能体代劳全部配置。
用它需要数据库或 SDK 吗?不需要——知识以普通 Markdown 文件的形式保存,不需要向量数据库、摄取管道或 SDK;从源码构建只需要 Go 1.26+,否则预编译二进制可直接独立运行。
连上 OpenLore 的智能体能运行 bash、curl 这类任意 shell 命令吗?不能——暴露给智能体的 shell 是一个纯内存中的 Go 解释器,不是真正的操作系统 shell,因此正常会话中不存在 shell 逃逸、任意进程执行或顺带的网络访问。
这是给单个开发者用的,还是给跑多个智能体的团队用的?它是为多智能体或多人的场景设计的;单个智能体在单个仓库里工作,直接把 Markdown 放进 git 就行,而 OpenLore 适合多个智能体、多个仓库或多个人需要同一套受治理知识的场合。
OpenLore 怎么控制谁能读或写哪些文档?访问按身份划分:每个人或每个智能体都会按 docset 获得基于角色的只读、发布或读写权限,外加路径别名和私有主目录,全部通过 RBAC 强制执行。
让智能体回写知识库安全吗?可写部署会把每次修改都收口到单一的策略控制路径:写入是整文件原子替换,用 compare-and-swap 防止覆盖过期的编辑,提交前还可选择由插件校验;默认情况下 OpenLore 是只读的。
OKF 是什么,OpenLore 怎么用它?OKF(Open Knowledge Format,开放知识格式)是 Google 打包知识包的开放标准;OpenLore 可以在写入路径附近按 OKF 规范校验 docset 和 Agent Skills。
智能体或人可以用哪些方式连接?同一个虚拟文件系统通过 SSH、SFTP/SSHFS(可直接用 VS Code 编辑)、MCP 和网页视图暴露,你可以选择最适合客户端的接口。
我能把文档打包成单个自包含的二进制发布吗?可以——把 Markdown 放到 assets/lore/ 下再构建;得到的二进制会内嵌这些文档,并在 /docs 路径以只读方式提供服务,不需要外部文件夹。
Creator
aakarim
Size
5 MB
Stars
1.4K
Age
3mo
Commits · 90 Days