open-knowledge-discovery
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpenKnowledge — what it is and how to install it
OpenKnowledge — 是什么以及如何安装它
OpenKnowledge (OK) is a markdown-CRDT collaboration platform. It turns a
directory of / files into a live, multi-writer knowledge base:
agents and humans edit the same documents in real time, every change is
attributed, and a browser preview renders edits as they land.
.md.mdxThis skill covers discovery, install, and opening OpenKnowledge files —
including single files that are not part of a project (see Opening a file
outside a project below). It does not carry the in-project read/write
runtime contract (the STOP rules for native file tools, the grounding and
linking rules, the MCP routing table) — that ships separately as the
project-local skill installed by (see Working inside a project
below).
ok initOpenKnowledge(简称OK)是一个基于markdown-CRDT的协作平台。它将一个包含/文件的目录转换为一个实时的多写者知识库:Agent和人类可以实时编辑同一文档,每一处更改都会被标记归属,并且浏览器预览会在更改完成后立即渲染出来。
.md.mdx本技能涵盖OpenKnowledge的发现、安装以及打开文件——包括不属于任何项目的单个文件(见下文“打开项目外的文件”)。它不包含项目内的读写运行时协议(原生文件工具的STOP规则、锚定与链接规则、MCP路由表)——这些内容会作为安装的项目本地技能单独提供(见下文“在项目内工作”)。
ok initInstall OpenKnowledge on a repository
在代码仓库中安装OpenKnowledge
Run from the repository root:
ok initbash
npx @inkeep/open-knowledge init在仓库根目录运行:
ok initbash
npx @inkeep/open-knowledge initor, after a global install:
或者,全局安装后:
npm install -g @inkeep/open-knowledge
ok init
`ok init` is the one setup verb. It:
- scaffolds a `.ok/` directory (project config — `content.dir` defaults to `.`);
- wires the OpenKnowledge MCP server into detected editors (Claude Code,
Cursor, Codex) — skip with `--no-mcp`;
- installs the **project-local runtime skill** at `.claude/skills/open-knowledge/`
and `.cursor/skills/open-knowledge/` so agents working in this repo get the
full read/write contract;
- ensures the project has a `.git/`.
Re-run `ok init` any time to refresh wiring and skills to the installed CLI
version.npm install -g @inkeep/open-knowledge
ok init
`ok init`是唯一的设置命令。它会:
- 生成`.ok/`目录(项目配置——`content.dir`默认值为`.`);
- 将OpenKnowledge MCP服务器连接到检测到的编辑器(Claude Code、Cursor、Codex)——可使用`--no-mcp`跳过此步骤;
- 在`.claude/skills/open-knowledge/`和`.cursor/skills/open-knowledge/`路径下安装**项目本地运行时技能**,以便在该仓库中工作的Agent获得完整的读写协议;
- 确保项目拥有`.git/`目录。
可随时重新运行`ok init`,将连接配置和技能更新至已安装的CLI版本。Share an OpenKnowledge project with collaborators
与协作者共享OpenKnowledge项目
An OK project travels with its repository. To share one:
- Commit the directory and the project-local
.ok/(and.claude/skills/open-knowledge/) directories along with your.cursor/skills/open-knowledge/content..md - Collaborators clone the repo and run once — that registers the MCP server on their machine and refreshes the project skill.
ok init - Start the editor + preview with (or open the project in OK Desktop).
ok start
Collaboration is real-time once two writers have the project open against the
same content directory.
OK项目随代码仓库一同迁移。共享步骤如下:
- 提交目录以及项目本地的
.ok/(和.claude/skills/open-knowledge/)目录,同时提交你的.cursor/skills/open-knowledge/内容。.md - 协作者克隆仓库后,运行一次——这会在他们的机器上注册MCP服务器并刷新项目技能。
ok init - 使用启动编辑器和预览(或在OK Desktop中打开项目)。
ok start
当两位写作者针对同一内容目录打开项目后,即可进行实时协作。
ok cowork
— Claude Chat & Cowork
ok coworkok cowork
— Claude Chat & Cowork
ok coworkok initok coworkopenknowledge.skillok initok coworkopenknowledge.skillOK Desktop
OK Desktop
OK Desktop is the standalone macOS app (). It
bundles its own CLI, opens a project as an editor + preview window, and keeps
the project's MCP wiring and skills current on every launch. Download DMGs
from the releases page.
@inkeep/open-knowledge-desktopOK Desktop是独立的macOS应用(包名为)。它内置了自己的CLI,可将项目作为编辑器+预览窗口打开,并且每次启动时都会保持项目的MCP连接配置和技能为最新状态。可从发布页面下载DMG安装包。
@inkeep/open-knowledge-desktopOpening a file outside a project
打开项目外的文件
OpenKnowledge can open a single markdown file that is not part of an OK
project — a loose / , or a file that lives inside a regular
repo/folder which was never 'd. It opens in a throwaway session (a
temp project in the OS temp dir — your repo is never touched, no is
written into it) with the same live preview you get inside a project.
.md.mdxok init.ok/Never run just to view or open a file. turns a repo
into a shared OpenKnowledge project; it is not a prerequisite for opening one
file. Opening a file needs no project, no , and no server already
running — each path below boots the session itself.
ok initok init.ok/When asked to open or preview such a file, decide by the viewing surface you
actually have — check the tool, not the host name. Only open a browser when
you genuinely have one; never pop a browser tab on a host that has none.
- You have an in-app / built-in browser (Claude Code Desktop's Browser pane, Cursor, Codex, and similar) — this
is the default: call the MCP tool with
preview_urlset to the absolute path (it finds, or boots on demand, the session and returns a fullfile), then immediately open thaturlin your in-app browser. "Open it" means navigate your browser — don't just print the URL and stop. This is also the only way to view it in a browser when the OK Desktop app is installed (urlprefers the Desktop app). Get the URL fromok openonly — never hunt for it viapreview_url/ok ps/ok status/ok uior a guessed port.ok start - No in-app browser (a pure-stdio CLI) — run
: it opens the Desktop app when installed, else a browser, and boots the session itself. Don't force a browser tab the user didn't ask for;
ok open /abs/path/to/file.mdis the right default here. Ifok openisn't on PATH,okdoes the same.npx @inkeep/open-knowledge open /abs/path/to/file.md
If the OK MCP server isn't wired into this host there is no to
call — use the path above. Don't reconstruct what does
by hand (spawning yourself, scraping ports from ).
preview_urlok openpreview_urlok mcpok psThe path must be absolute (a file outside a project has no cwd to anchor a
relative path). Re-opening the same file lands on the same session. Never
construct or guess the URL — use the one returns.
preview_urlOpenKnowledge可以打开不属于OK项目的单个markdown文件——一个独立的/文件,或者位于从未执行过的普通仓库/文件夹中的文件。它会在临时会话中打开(操作系统临时目录中的临时项目——不会触及你的仓库,也不会向其中写入目录),并提供与项目内相同的实时预览功能。
.md.mdxok init.ok/切勿仅为了查看或打开文件而运行。会将仓库转换为共享的OpenKnowledge项目;它并非打开单个文件的前提条件。打开文件无需项目、无需目录,也无需预先运行服务器——以下每种方式都会自行启动会话。
ok initok init.ok/当被要求打开或预览此类文件时,请根据实际可用的查看界面来决定操作方式——检查工具,而非主机名。仅当确实有浏览器时才打开浏览器;切勿在没有浏览器的主机上弹出浏览器标签页。
- 拥有内置浏览器(Claude Code Desktop的浏览器面板、Cursor、Codex等)——这是默认方式:调用**MCP工具**,将
preview_url设置为文件的绝对路径(它会查找或按需启动会话,并返回完整的file),然后立即在内置浏览器中打开该url。“打开它”意味着导航到该URL——不要只打印URL就停止。当安装了OK Desktop应用时,这也是在浏览器中查看文件的唯一方式(url优先使用Desktop应用)。仅从ok open获取URL——切勿通过preview_url/ok ps/ok status/ok ui或猜测端口来查找URL。ok start - 无内置浏览器(纯标准输入输出的CLI)——运行:如果已安装Desktop应用,它会打开该应用;否则会打开浏览器,并自行启动会话。切勿强制打开用户未请求的浏览器标签页;
ok open /abs/path/to/file.md是此处的正确默认选项。如果ok open不在PATH中,运行ok可实现相同功能。npx @inkeep/open-knowledge open /abs/path/to/file.md
如果OK MCP服务器未连接到当前主机,则无法调用——请使用上述方式。切勿手动重构的功能(自行启动,从中获取端口)。
preview_urlok openpreview_urlok mcpok ps路径必须是绝对路径(项目外的文件没有当前工作目录来锚定相对路径)。重新打开同一文件会进入同一会话。切勿构造或猜测URL——请使用返回的URL。
preview_urlWorking inside a project — use the project-local skill, not this one
在项目内工作——使用项目本地技能,而非本技能
Do not use this skill to perform OpenKnowledge reads or writes. The
runtime contract — STOP rules for native file tools on in-scope markdown, the
preview-attach handshake, grounding and linking rules, the MCP tool routing
table — lives in a separate project-local skill installed at
whenever runs.
.claude/skills/open-knowledge/SKILL.mdok initIf the user is editing markdown inside a project that has a directory
and this discovery skill is the only OpenKnowledge skill loaded, the
project-local skill is missing (the repo was never 'd, or the skill
directory was not committed). Advise the user to run to install it.
.ok/ok initok init请勿使用本技能执行OpenKnowledge的读写操作。运行时协议——针对范围内markdown的原生文件工具STOP规则、预览附加握手、锚定与链接规则、MCP工具路由表——存放在单独的项目本地技能中,该技能会在每次运行时安装到路径下。
ok init.claude/skills/open-knowledge/SKILL.md如果用户正在一个拥有目录的项目中编辑markdown,但仅加载了本发现技能,则说明项目本地技能缺失(仓库从未执行过,或者技能目录未被提交)。建议用户运行来安装该技能。
.ok/ok initok initLearn more
了解更多
- Repository: https://github.com/inkeep/open-knowledge
- Run for the full command list.
ok --help
- 代码仓库:https://github.com/inkeep/open-knowledge
- 运行查看完整命令列表。
ok --help