Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

443 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Knowledge CLI banner

Open Knowledge

Flexible knowledge bases in Markdown that your agents can create, retrieve, maintain, validate, and publish.

🌐 Website | 📖 Documentation | 🧭 Commands | 📝 Changelog | 📐 OKF specification | ⚖️ License

License: Apache-2.0 OKF v0.1 Git-native Markdown wiki Agent-ready docs

From project to knowledge base

Your project
    │
    ▼
 okn setup ──► your agent creates Wiki/
                         │
                         ▼
                  okn validate Wiki
                         │
          ┌──────────┬──────────┬──────────┐
          ▼          ▼          ▼          ▼
       search       view        MCP     export html

Quick start

1. Install

curl -fsSL https://openknowledge.sh/install | bash

2. Create

Choose either setup path.

To use an agent that already works inside the project, copy this prompt:

Set up an Open Knowledge wiki for this workspace. If the Open Knowledge CLI is
not installed, install it with:
curl -fsSL https://openknowledge.sh/install | bash

Verify the installation with: okn version

Then run okn setup and follow the complete prompt it prints. Inspect this
workspace first. Ask me focused questions about the wiki's purpose, audience,
sources, structure, and maintenance needs before you create it. Keep the setup
open-ended instead of choosing a predefined wiki type. Create the wiki, run its
validation steps, and explain what you configured.

The agent installs the CLI when necessary. It then runs okn setup and follows the complete generated interview. The default target is Wiki.

To let the CLI launch an installed agent runtime, run:

okn setup --agent --runtime <codex|claude|opencode>

Agent mode runs the same setup interview, validates the wiki, and installs the selected runtime's project integration.

3. Validate

When the agent finishes:

okn validate Wiki
Alternative npm installation
npm install -g @openknowledge-sh/openknowledge

Both installers provide okn and openknowledge. This documentation uses okn. See Installation for supported platforms and verification details.

Optional agent integration
okn integration install Wiki --runtime codex

This optional command installs only the selected runtime. Session observation remains off unless you explicitly add --observe.

Workflows

Create, retrieve, and verify

Use setup to print an open-ended setup prompt for an agent that already works in the project. Alternatively, use okn setup --agent --runtime <runtime> to launch one. Use search to retrieve knowledge. Use validate to verify the wiki.

Work locally

Use agent to run an agent task. Use integration to install one runtime skill. Use get to read one document. Use list to inspect the content tree. Use view to browse the wiki.

Share and connect

Use mcp to serve MCP tools. Use export to publish portable output. Use connect to add a source. Use disconnect to remove a source. Use registry to inspect the registry.

Automate and operate

Use automation for jobs, insights, runtime services, and deployments.

Use advanced tools

Use scaffold for deterministic bundle creation. Other advanced tools are prompt, ast, and spec.

See the command index for all commands. Use okn <command> --help for exact command syntax.

Publish a wiki

okn export html creates a public distribution bundle in a local folder. It does not deploy the bundle or start an MCP server.

Review the knowledge base before you create this bundle. After you enable publication, Markdown is public unless it sets okf_publish: false. Add this configuration to Wiki/openknowledge.toml:

[publish]
enabled = true

Export the reviewed content:

okn export html --out ./site Wiki

The bundle includes a static viewer, llms.txt, a connect manifest, and a portable source archive. A deployed runtime can also expose filtered search and HTTP MCP projections. See HTML export and openknowledge.toml for publication filters and asset options.

Development

pnpm install --frozen-lockfile
pnpm test
pnpm build

See CLI operations for focused test, build, website, and release commands.

License and attribution

Open Knowledge is licensed under Apache-2.0.

The embedded OKF specification is Apache-2.0 material from GoogleCloudPlatform/knowledge-catalog. See THIRD_PARTY_NOTICES.md for attribution.

About

CLI tool for managing Open Knowledge Format (OKF) bundles.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages