
OpenWiki is our open source CLI for generating and maintaining documentation for codebases. It creates a wiki for your repo, connects that wiki to your coding agent, and keeps the docs up to date as your code changes. With OpenWiki 0.2, we're making it easier for developers to categorize and structure their codebase wikis.OpenWiki 是我们推出的一款开源命令行工具,旨在为代码库生成并维护文档。它能为你的存储库创建维基(wiki),将其连接到你的编码智能体,并随着代码变更实时更新文档。在 OpenWiki 0.2 中,我们让开发者能够更轻松地对代码库维基进行分类和结构化管理。
The first OpenWiki release generated and organized Markdown documentation based on your codebase. Large codebases can require large wikis, as you might expect. When a wiki has hundreds of files, structure becomes important for discovery, updates, search, and review.OpenWiki 的首个版本能够基于代码库生成并组织 Markdown 文档。正如你所预料的,大型代码库往往需要庞大的维基文档。当维基包含数百个文件时,良好的结构对于文档的发现、更新、搜索和查阅至关重要。
OpenWiki 0.2 adds support for OKF, a proposed standard from Google Cloud for structuring knowledge wikis. This allows for us to add better structure to the generated wiki, resulting in it being easier to navigate for coding agents. With better documentation, agents won’t need to spend as much time searching, thus reducing time and tokens spent.OpenWiki 0.2 增加了对 OKF 的支持。OKF 是 Google Cloud 提出的一种用于构建知识维基的标准。这使我们能够为生成的维基添加更完善的结构,从而让编码智能体更轻松地进行导航。借助更优质的文档,智能体无需花费大量时间搜索,进而减少了时间和 Token 的消耗。
What OKF addsOKF 的优势
In OpenWiki 0.2, wikis generated or updated by OpenWiki follow the OKF format. Wiki files now include YAML front matter containing fields like title, description, tags, categories, and resource URLs.在 OpenWiki 0.2 中,由 OpenWiki 生成或更新的维基均遵循 OKF 格式。现在的维基文件包含 YAML 前置元数据(front matter),其中涵盖了标题、描述、标签、类别和资源链接等字段。
OKF defines two conventions:OKF 定义了两种约定:
index.mdsummarizes the files and subdirectories in each wiki directory.index.md:汇总每个维基目录下的文件和子目录。logs.mdtracks wiki updates over time, similar to a changelog.logs.md:跟踪维基随时间推移的更新情况,类似于变更日志(changelog)。
The changelog is especially useful for updates. Instead of needing to read the full wiki after every run, you can check logs.md to see what changed, which files were touched, and where to look if you want more detail.变更日志对于更新追踪特别有用。你无需在每次运行后阅读整个维基,只需查看 logs.md 即可了解变更内容、受影响的文件以及获取更多详情的路径。
OKF exampleOKF 示例
At its core, the OKF spec is very simple which makes it easy to integrate into OpenWiki. The YAML front matter just contains a few key fields which are easy to add:OKF 规范的核心非常简洁,这使得将其集成到 OpenWiki 中变得轻而易举。YAML 前置元数据仅包含几个易于添加的关键字段:
---
type: <Type name> # REQUIRED - identifying concept of the doc. E.g. "BigQuery Schema"
title: <Optional display name>
description: <Optional one-line summary>
resource: <Optional canonical URI for the underlying asset>
tags: [<tag>, <tag>, …] # Optional
timestamp: <ISO 8601 datetime> # Optional last-modified time
# … other producer-defined key/value pairs
---
With this YAML front matter in each of the wiki files, you can deterministically generate the index.md files for your wiki by extracting the description field from the front matter:在每个维基文件中加入这些 YAML 前置元数据后,你只需提取其中的描述(description)字段,即可确定性地为维基生成 index.md 文件:
# Section / Group Heading
* Title 1 - description of item 1
* Title 2 - description of item 2
# Another Section
* Subdirectory - description of the subdirectory
And finally, the log.md can be generated by OpenWiki at the end of a run to document its changes. Adding support for a log.md is just a matter of adding a few lines of prompting to OpenWiki instructing it to update the 最后,OpenWiki 可以在运行结束时生成 log.md 文件以记录变更。添加对 log.md 的支持只需在 OpenWiki 中增加几行提示词,指示其在更新完维基后更新
log.md file once its done updating the wiki:log.md 文件即可。
# Directory Update Log
## 2026-05-22
* **Update**: Added new BigQuery table reference for [Customer Metrics](/tables/customer-metrics.md).
* **Creation**: Established the [Dataplex Playbook](/playbooks/dataplex.md).
## 2026-05-15
* **Initialization**: Created foundational directory structure.
* **Update**: Added progressive-disclosure guidelines to the root [index](/index.md).
Better retrieval for agents提升智能体的检索能力
OpenWiki exposes your repo wiki to coding agents through files like AGENTS.md and CLAUDE.md, allowing them to search it for relevant context.OpenWiki 通过 AGENTS.md 和 CLAUDE.md 等文件将你的存储库维基呈现给编码智能体,使其能够搜索相关背景信息。
Because OKF adds structured metadata to every document, future OpenWiki tooling can support deterministic search over tags, categories, descriptions, and other fields. For example, an agent could filter on every doc in the BigQuery tables category, or every doc tagged with billing, rather than relying entirely on open-ended agentic search.由于 OKF 为每份文档添加了结构化元数据,未来的 OpenWiki 工具将支持基于标签、类别、描述及其他字段的确定性搜索。例如,智能体可以筛选“BigQuery 表”类别下的所有文档,或筛选带有“计费”标签的所有文档,而无需完全依赖开放式的智能体搜索。
Agentic search is useful, but it can be unnecessarily slow and expensive for simple lookups. Structured metadata gives OpenWiki a cleaner path toward faster retrieval tools.智能体搜索虽然有用,但对于简单的查找来说,它可能显得效率低下且成本高昂。结构化元数据为 OpenWiki 提供了一条实现更高效检索工具的清晰路径。
Working with the OKF ecosystem拥抱 OKF 生态系统
Because OKF is an open format, OpenWiki wikis can work with community-built viewers, renderers, linters, and other compatible tools instead of relying on one-off integrations. This article documents a few of these open-ecosystem projects which have recently popped up: https://www.owox.com/blog/articles/okf-ecosystem-tools.由于 OKF 是一种开放格式,OpenWiki 的维基可以与社区构建的查看器、渲染器、代码检查工具及其他兼容工具协同工作,而无需依赖一次性的集成方案。本文档记录了近期涌现的一些开放生态项目:https://www.owox.com/blog/articles/okf-ecosystem-tools。
That means OpenWiki users get a more standard wiki format today, plus a better foundation for the tooling we build next.这意味着 OpenWiki 用户不仅能获得更标准的维基格式,还为我们后续构建的工具奠定了更好的基础。
Google has published an open-source OKF wiki visualizer you can use to inspect your wiki, and view the relationships between docs. Here’s an example of what that looks like, from the OpenSWE repository:Google 发布了一款开源的 OKF 维基可视化工具,你可以用它来审视维基并查看文档间的关联。以下是来自 OpenSWE 存储库的示例效果:

Try OpenWiki 0.2试用 OpenWiki 0.2
If you already use OpenWiki, upgrading will generate and update wikis in the OKF format. If you’re new to OpenWiki, you can install it and generate a repo wiki in a few minutes.如果你已经在用 OpenWiki,升级后即可生成并更新 OKF 格式的维基。如果你是 OpenWiki 的新用户,只需几分钟即可完成安装并为你的存储库生成维基。
Check out the repo here: https://github.com/langchain-ai/openwiki点击此处查看存储库:https://github.com/langchain-ai/openwiki
And try it locally today:立即在本地试用:
npm install -g openwiki@latest openwiki --init
