On this page
On this page
CLI commands
Wiki
openclaw wiki
Inspect and maintain the memory-wiki vault. Provided by the bundled optional memory-wiki plugin. Enable it before first use:
Related: Memory Wiki plugin, Memory Overview, CLI: memory
Common commands
Agent selection
When plugins.entries.memory-wiki.config.vault.scope is agent, select the
vault with the command's --agent <id> option:
When --agent is omitted, CLI operations use the configured default agent,
matching other agent-scoped CLI families. Pass the flag to select a different
agent. Unknown agent ids fail before the vault operation starts. If no default
can be resolved, the error tells you to pass --agent <id> or configure an
agent. The option does not change the selected path when vault.scope is
global.
Gateway clients remain explicit: pass agentId on vault-backed wiki.*
requests in an agent-scoped multi-agent setup. A missing or unknown id is an
error. Agent turns, wiki tools, memory corpus supplements, and compiled prompt
digests already carry the active runtime agent context.
Commands
wiki status
Show vault mode and scope, resolved agent, health, and Obsidian CLI availability. Use this first to check whether the intended vault is initialized, bridge mode is healthy, or Obsidian integration is available.
When bridge mode is active and configured to read memory artifacts, this command queries the running Gateway so it sees the same active memory plugin context as agent/runtime memory.
wiki doctor
Run wiki health checks and report actionable fixes. Exits non-zero when unhealthy.
When bridge mode is active and configured to read memory artifacts, this command queries the running Gateway before building the report. Disabled bridge imports and bridge configs that do not read memory artifacts stay local/offline.
Typical issues:
- bridge mode enabled without public memory artifacts
- invalid or missing vault layout
- missing external Obsidian CLI when Obsidian mode is expected
wiki init
Create the wiki vault layout and starter pages, including top-level indexes and cache directories.
wiki ingest <path>
Import a local markdown or text file into the wiki sources/ folder as a source page. <path> must be a local file path; there is no URL ingest today. Rejects binary files.
Source files must be valid UTF-8. Malformed input is rejected without replacing an existing source page. Save the source as valid UTF-8 and retry the ingest.
wiki ingest, bridge/unsafe-local sync, and ChatGPT imports also reject existing source pages with malformed UTF-8 instead of rewriting their human notes. Save the affected page as valid UTF-8 and retry.
Imported source pages carry provenance frontmatter (sourceType: local-file, sourcePath, ingestedAt). Ingest always recompiles the vault afterward.
Concurrent wiki ingest and Gateway bridge imports targeting the same vault wait
for each other's source writes and compilation to finish. Ingest waits up to five
minutes for a busy vault before reporting a lock timeout.
Flags: --title <title> overrides the source title (default: derived from the filename).
wiki okf import <path>
Import an unpacked Open Knowledge Format bundle into wiki concept pages.
The importer reads every non-reserved .md concept document in the OKF directory tree, requires a non-empty type field, and treats unknown OKF type values as generic concepts. Reserved OKF index.md and log.md files are not imported as concepts.
OKF documents, including the bundle's index.md, must contain valid UTF-8.
Malformed concept documents are skipped with an unreadable-entry warning;
other valid concepts still import. Any import warning also prevents stale-page
pruning, so a damaged source cannot remove its previously imported concept.
An unreadable root index.md stops the import before concept pages are changed,
because that file determines the bundle identity. Convert the affected source
to UTF-8 and retry the import.
Imported pages are flattened under concepts/ so existing wiki compile, search, get, digest, and dashboard flows see them immediately. The original OKF concept ID, type, resource, tags, timestamp, source path, and full frontmatter are preserved in the page frontmatter. Internal OKF markdown links are rewritten to the generated wiki pages; broken or external links are left unchanged. Import always recompiles the vault afterward.
Examples:
wiki compile
Rebuild indexes, related blocks, dashboards, and the compiled query/prompt snapshot. The snapshot is persisted in OpenClaw's shared SQLite plugin state and kept in memory for synchronous prompt projection; it does not create cache files in the vault.
If render.createDashboards is enabled, compile also refreshes report pages.
Page names use the frontmatter title, then the first level-one heading outside
code blocks, then the filename. Comments inside fenced code blocks do not become
page names; inline code in a real heading remains part of its name.
wiki lint
Lint the vault and write a report covering:
- structural issues (broken links, missing/duplicate ids, missing page type or title, invalid frontmatter)
- provenance gaps (missing source ids, missing import provenance)
- contradictions (flagged contradictions, conflicting claims)
- open questions
- low-confidence pages and claims
- stale pages and claims
Run this after meaningful wiki updates.
wiki search <query>
Search wiki content. Behavior depends on config:
search.backend:sharedorlocalsearch.corpus:wiki,memory, orall--mode:auto,find-person,route-question,source-evidence, orraw-claim
Use wiki search for wiki-specific ranking and provenance. For one broad shared recall pass, prefer openclaw memory search when the active memory plugin exposes shared search.
Search modes:
find-person: aliases, handles, socials, primary IDs, and person pagesroute-question: ask-for/best-used-for hints and relationship contextsource-evidence: source pages and structured evidence fieldsraw-claim: structured claim text with claim/evidence metadata
Examples:
Text output includes Claim: and Evidence: lines when a result matches a structured claim. JSON output additionally exposes matchedClaimId, matchedClaimStatus, matchedClaimConfidence, evidenceKinds, and evidenceSourceIds for agent-side drilldown.
wiki get <lookup>
Read a wiki page by id or relative path. Compiled claim IDs are resolved first. After vault activation, an existing, visible Markdown path reads only the requested page. A fresh CLI process still validates the compiled snapshot against the vault; missing indexes or snapshots can trigger automatic compilation. Missing or invalid candidates, extensionless paths, basenames, and page IDs retain their existing lookup fallbacks and may scan the vault.
Wiki-page reads support large files and hard links. Reads refuse paths that escape the vault or pass through a symbolic link inside it.
Pagination counts real body lines, not the empty split element after a terminal
newline. A read ending on the last line reports truncated: false; intentional
blank lines are preserved.
wiki apply
Apply narrow mutations without freeform page surgery:
apply synthesis <title>: create or refresh a synthesis page with a managed summary bodyapply metadata <lookup>: update metadata on an existing page
Both accept --source-id, --contradiction, --question (each repeatable), --confidence <n> (0-1), and --status <status>. apply metadata also accepts --clear-confidence to remove a stored confidence value. This is the supported way to evolve wiki pages so managed generated blocks stay intact.
Metadata updates preserve comments and numeric spellings on untouched keys in ordinary string-keyed YAML mappings. Pages containing anchors, aliases, explicit tags, or non-string keys retain the existing value-rendering behavior instead; their parsed values remain authoritative, but source formatting is not preserved.
Refreshing a synthesis without --status preserves its existing status. New synthesis pages default to active; an explicit --status sets or replaces the value.
For apply synthesis, pass the summary with --body <text> or --body-file <path>.
Body files must be regular files containing nonempty UTF-8 text. Symlinks to
regular files are supported. FIFOs and other special files, blank files, and
invalid UTF-8 are rejected before changing the existing synthesis page.
wiki bridge import
Import public memory artifacts from the active memory plugin into bridge-backed source pages. Use this in bridge mode to pull the latest exported memory artifacts into the wiki vault.
For active bridge artifact reads, the CLI routes the import through Gateway RPC so it uses the runtime memory plugin context. If bridge imports are disabled or artifact reads are off, the command keeps the local/offline zero-import behavior. Index refresh after import is gated by ingest.autoCompile.
wiki unsafe-local import
Import from explicitly configured local paths (unsafeLocal.paths) in unsafe-local mode. Intentionally experimental and same-machine only. Index refresh after import is gated by ingest.autoCompile.
wiki chatgpt import
Import a ChatGPT export into draft wiki source pages.
--export accepts a JSON file or a directory containing conversations.json.
The path's file type determines which is used, so renamed JSON files and
directories whose names end in .json work the same way.
Imported transcript text preserves line breaks, code indentation, and internal spacing, including text parts stored as serialized JSON in the export.
| Flag | Default | Description |
|---|---|---|
--export <path> |
(required) | ChatGPT export directory or conversations.json path. |
--dry-run |
false |
Preview created/updated/skipped counts without writing pages. |
A non-dry-run import that changes any page records an import run id, printed in the summary, needed for rollback.
Malformed UTF-8 exports are rejected before the vault is initialized or imported pages are changed. If the error names an invalid export, download a fresh ChatGPT export and retry the import.
Export files and existing source pages must resolve to regular files. Named pipes and other special files are rejected without waiting for data. Replace the affected path with a regular file and retry.
Re-imports preserve handwritten Notes, including literal marker examples inside a complete Notes block. Markers inside transcript code blocks or inline code remain part of the transcript and do not prevent it from refreshing. If a Notes marker is missing, restore it before retrying; the import leaves the affected page unchanged.
wiki chatgpt rollback <run-id>
Roll back a previously applied ChatGPT import run, removing pages it created and restoring pages it overwrote. Pages changed after import are moved under the run's .openclaw-wiki/import-runs/<run-id>/recovered/ directory instead of being deleted. Recovery paths remain in the command result on retries and later alreadyRolledBack responses. Interrupted runs remain rolling_back while target recovery or derived-artifact compilation is incomplete. A persisted process-restart fence separates those phases: after it, retries rebuild indexes and compiled caches without rewriting source pages or moving later pathname writes. A later normal compile may refresh machine-managed Related blocks. This covers in-process failure and process restart after ordinary filesystem calls return, not kernel or host power-loss ordering.
wiki obsidian ...
Obsidian helper commands for vaults running in Obsidian-friendly mode: status, search, open, command, daily. These require the official obsidian CLI on PATH when obsidian.useOfficialCli is enabled.
Configuration validation rejects obsidian.useOfficialCli: true when
vault.scope is agent because obsidian.vaultName is one global setting,
not a per-agent mapping. Obsidian-friendly Markdown rendering remains
available.
Practical usage guidance
- Use
wiki search+wiki getwhen provenance and page identity matter. - Use
wiki applyinstead of hand-editing managed generated sections. - Use
wiki lintbefore trusting contradictory or low-confidence content. - Use
wiki compileafter bulk imports or source changes when you want fresh dashboards and compiled digests immediately. - Use
wiki okf importwhen a data catalog, documentation export, or agent enrichment pipeline already emits OKF markdown bundles. - Use
wiki bridge importwhen bridge mode depends on newly exported memory artifacts.
Configuration tie-ins
openclaw wiki behavior is shaped by:
plugins.entries.memory-wiki.config.vaultModeplugins.entries.memory-wiki.config.vault.scopeplugins.entries.memory-wiki.config.vault.pathplugins.entries.memory-wiki.config.search.backendplugins.entries.memory-wiki.config.search.corpusplugins.entries.memory-wiki.config.bridge.*plugins.entries.memory-wiki.config.obsidian.*plugins.entries.memory-wiki.config.ingest.autoCompileplugins.entries.memory-wiki.config.render.*plugins.entries.memory-wiki.config.context.includeCompiledDigestPrompt
See Memory Wiki plugin for the full config model.