Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

460 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.2 Git-native Markdown wiki Agent-ready docs

From project to knowledge base

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

Quick start

1. Install

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

2. Create

Run the interactive setup wizard:

okn setup

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

Set up Open Knowledge for this workspace. Check the CLI with `okn version`.
If it is missing, install it from https://openknowledge.sh/install and verify
the installation. Then run `okn setup --prompt` and follow its complete task.
Ask me before product-level decisions. Finish with the printed `okn validate`
and `okn setup complete` commands.

The generated task is the source of truth for the setup workflow. The default target is Wiki.

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

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

Agent mode runs the same generated task. It validates and activates the wiki through okn setup complete.

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.

Workflows

Create, retrieve, and verify

Use setup for interactive onboarding. Use okn setup --prompt for an existing agent. Use okn setup --agent <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 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