Editor
The OpenKnowledge editor. WYSIWYG markdown, source toggle, content blocks, link authoring, inline frontmatter, and the file sidebar.
The editor is where you read, write, and collaborate on your docs, and where AI agents land when they edit. WYSIWYG by default with a source-mode toggle, a frontmatter properties pane, real-time CRDT collaboration, and a file sidebar that organizes the project.
Open a single file
Want the editor on one loose markdown file without setting up a project? Run ok <file>:
ok notes.md # open a single file in the editor
ok ./specs/foo/SPEC.md # a file inside a project opens that project, focused on the docWhen the file is inside an existing OpenKnowledge project, this opens that project focused on the doc. When it's a loose file, it opens an ephemeral single-file session: a throwaway editor scoped to just that one file, with no project scaffolding, no agents, and no git. Your edits save straight back to the original file, and nothing is written into the file's directory — all session state lives in a temporary directory that's removed when you close the window. Opening a file you don't edit leaves it byte-for-byte unchanged.
It opens in the desktop app when it's installed, and falls back to your browser otherwise (press Ctrl-C in the terminal to end a browser session). Single-file sessions show just the file and the editor — no sidebar, tabs, or project switcher. Discover it any time with ok --help.
Document body
Open any doc from the sidebar. The body renders as WYSIWYG markdown with familiar conventions: bold / italic / headings / lists / tables / code fences / links / images. Toggle to source mode from the editor controls or with Cmd+Option+M to edit the raw markdown directly; both views are bound to the same CRDT document, so they stay in sync across users and AI agents. Switching modes keeps your place — the block you were looking at stays in view either way.
A slash command (/) opens an insert menu for headings, lists, tables, code blocks, callouts, footnotes, inline math, and the other content shapes the editor supports.
When a doc ends in a table, list, or code block, click the empty space below it to start a new paragraph there. A + appears in the gutter as you hover, showing where the line will land. On a touch device there is no hover to read, so the + stays visible whenever that space is there to use, and on a narrow screen it sits at the left edge of the text rather than out in the gutter. The space is only a click target, so nothing is written to the file until you use it, and a doc that ends in a table stays ending in a table.
A doc written before this behavior may still carry a blank line at the end that nobody typed. Open Knowledge leaves trailing blank lines alone rather than removing ones it did not write, so clear it with Auto-fix in the Problems panel, with ok lint --fix, or by hand. See markdownlint rules.
Markdown problems (hard tabs, heading increments, and the rest) are flagged inline as you write, with a Problems panel in the document panel for the whole doc or project. See Content rules.
Undo in source mode
This section is about the Markdown source pane only. The visual editor keeps its own undo history, and none of what follows changes it.
Undo in source mode covers the editing you did there. Switching to the visual editor for a look and coming straight back leaves that history intact. But if you leave source mode, by switching to the visual editor or by moving to another tab, and anything writes to the document while you are away, source-mode undo and redo start fresh when you come back. Many things count as a write, not only the obvious ones: your own edits in the visual editor, an agent, a collaborator, a change on disk, a field you change in the Properties panel, a fix applied from the Problems panel or from the visual editor, or the tail of a large paste you started in source mode that was still landing as you flipped away. Restoring an earlier version from the Timeline counts as a write too, so if you restore while you are out of source mode, undo there starts fresh when you come back. Source-mode undo history belongs to the current document session: navigating through enough other documents to evict it, or closing and reopening the app, starts it fresh even if no one rewrote the file.
No text is removed when that happens. One case is still not covered. If a rewrite lands while you are sitting in Markdown source rather than away from it, the history is left as it is, so a single undo can still take back more than you expect.
To go further back, the Timeline keeps earlier versions of the whole document. Each entry is a snapshot of the whole document. Agent edits, human edits, and file-system changes are batched into an entry once activity settles. Upstream syncs get their own entry when the sync lands. Restoring an entry brings back that version's content. Restoring is append-only, so the edits you made since then stay on the timeline and you can restore back to them.
Tables
Insert a table from the slash menu. The header row stays visible as you scroll down a long table, the first column stays pinned as you scroll sideways, and dragging a row or column handle reorders it. Cells are single-line in the stored markdown: pressing Enter inside a cell — or pasting a table whose cells hold lists or paragraphs — joins the lines with <br />, the GFM line-break idiom, so the table stays valid for everyone else opening the file. <br> tags in existing files render as real line breaks and round-trip byte-for-byte.
Mermaid diagrams
A mermaid code fence renders as a live diagram (the slash menu can insert one). On-diagram buttons pan, zoom, and reset the view; mouse-wheel zooming and drag panning are disabled so a large diagram never moves while you scroll past it.
Live HTML embeds
An html preview code fence renders its contents live in a sandboxed iframe instead of showing the source. The slash menu's /embed group inserts starters — a blank theme-aware page, a chart, stat cards, custom SVG, an interactive control — that open straight into the preview.
Underline
Cmd+U, or the Underline button in the selection bubble menu, underlines the selection. Markdown has no underline syntax of its own, so it saves as inline HTML: <u>underlined</u>. <ins>…</ins> — what Joplin and Logseq write — is read as underline too, whether it arrives on the clipboard or is already sitting in a file you open, and each file keeps the spelling it arrived with instead of being rewritten under you. Both underline in OpenKnowledge and in any renderer that passes inline HTML through. GitHub is the exception worth knowing: it renders <ins> underlined but strips <u> back to plain text, so the words survive and the underline doesn't.
Markdown Comments
Notes that stay in the file and out of what a reader sees. (For review comments attached to a passage from outside the file, and sent to an agent as a batch, see Comments.) OpenKnowledge reads two syntaxes. There's no button or shortcut for either — you type them, inline inside a paragraph or as a standalone block spanning several lines:
| Syntax | Hidden from readers in |
|---|---|
<!-- note --> | Everywhere. It's an HTML comment, so no markdown renderer ever shows it to a reader. |
%%note%% | OpenKnowledge and Obsidian, which share the convention. Everywhere else it renders as ordinary text, percent signs and all. |
So: reach for <!-- --> when the file will be read outside OpenKnowledge — pushed to GitHub, built into a docs site, opened in another editor. Reach for %%…%% when the file round-trips through Obsidian, whose own comment syntax this is. The syntax you type is the syntax that gets saved: OpenKnowledge never converts <!-- --> into %%…%% or back. Two tidyings happen on save, and only these two. A multi-line %% block takes the padded shape, with a blank line after the opening delimiter and before the closing one. And an HTML comment gets one space of inner padding, so <!--note--> saves as <!-- note -->. The %% inline form keeps its body exactly as typed, spaces included.
In the editor, comments stay visible and editable: dimmed and italic under a dashed underline, with a dashed left rail on the block form. The underline is what tells a comment apart from ordinary emphasis without relying on colour. The delimiters themselves aren't drawn, the same way the editor doesn't draw the asterisks around bold — switch to source mode to see or edit them. That means the two forms look identical in the editor: which one a given comment uses is a real decision, per the table above, and source mode is where you check it. The body stays on screen either way, which is deliberate: text you typed should never disappear from the surface you typed it into.
Two limits are worth knowing. The first applies mid-sentence only: a comment inside a line of prose whose body is nothing but a formatted word — %%**bold**%% — stays ordinary prose rather than becoming a comment, because there is no way to record whether the emphasis sat inside the comment or the comment inside the emphasis. Give it any plain text alongside (%%note **bold**%%) and it is recognized normally. The same comment alone on its own line is recognized either way, as a comment block.
The second is a budget: a paragraph, heading, or table cell can carry one comment whose body contains formatting. Write two in the same one and neither is recognized — both stay literal %%, and worse, the word between them can be claimed as a comment instead and disappear from published output. Split them across separate paragraphs, or keep one of the two bodies plain.
Readers don't see them. Wherever OpenKnowledge renders a doc to HTML rather than to the editor, both forms come out as real HTML comments, which browsers don't display. Copying a passage out of OpenKnowledge leaves the comments behind too, so an annotation can't ride along into an email or a chat message. In-app read-only views — the rendered diff, the skill viewer — do keep showing them dimmed: there the whole point is to show you everything the document contains.
Find and replace
Cmd+F opens find in the visual editor; Cmd+Option+F (Ctrl+H on Windows / Linux) adds the replace controls. Cmd+G and Shift+Cmd+G step through matches.
Links
Links work the way they do in the editors you already know:
- Type a URL, then press space or enter. A full URL (
https://…,www.…, or an email address) becomes a link when you press space or enter after it. Plain words and filenames likeAGENTS.mdare left alone, and oneCmd+Zturns a conversion back into plain text. - Paste or drag in a URL. Pasted (or dropped) on its own, it becomes a link. Pasted over selected text, it links that text instead — the text stays, the URL becomes its destination.
Cmd+Shift+Vpastes plain, with no linking. - Type
[text](url). Closing the parenthesis converts the markdown shorthand into a real link;Cmd+Zrestores the literal text. - Press
Cmd+Kwith text selected. The link popover opens with the URL field focused, pre-filled from your clipboard when it holds a URL. With the cursor inside an existing link,Cmd+Kopens that link for editing. With no selection,Cmd+Kkeeps opening the command palette, as everywhere else. To reach the command palette while text is selected, useCmd+P(Ctrl+Pon Windows / Linux), which always opens it.
Right-click menu and spell check
In the desktop app, right-clicking editable text opens a native context menu. Any editable field gets Cut / Copy / Paste / Select All; when there's a selection or a flagged word under the cursor, Search with Google joins it — plus, on macOS, Look Up (the dictionary panel).
Over the document body, the menu also carries View in Source </> — the desktop equivalent of Cmd+Option+E, opening the Markdown behind the block you right-clicked in the visual editor.
Spell checking uses the native macOS spellchecker on macOS (language follows your macOS settings) and Chromium's built-in spellchecker on Windows and Linux, so misspelled words get the familiar red underline. Right-clicking a flagged word adds the spelling section:
| Item | Behavior |
|---|---|
| Suggestions | The spellchecker's corrections, one row each; pick one to replace the word. |
| Add to Dictionary | Teaches your system dictionary the word — persistent and, on macOS, shared with your other Mac apps (Safari, Notes). |
| Disable Spell Check | Turns spell checking off app-wide. The choice persists across relaunches. |
While spell check is off, right-clicking any editable text offers Enable Spell Check, and the menu bar carries the same toggle as Edit ▸ Check Spelling While Typing (see Edit menu) — flip either to bring the squiggles back.
Surfaces with their own specialized right-click menus — asset and wiki-link chips, the file sidebar, editor tabs — keep them; the editor menu never doubles up on top. In the web build the browser's own context menu fills this role.
Ask AI
An Ask AI composer is docked at the bottom of the editor — in the desktop app and in a regular browser — whenever a doc or folder view is open. It's a slim, single-line entry field that expands as you type to accept a fuller prompt (and @-mentions); in the desktop app, Cmd+L opens and focuses it. Type an instruction — "condense this doc", "research X", "make a spec from this user story" — and press Enter to hand it to an agent. Shift+Enter inserts a newline; the field clears once the prompt is sent.
It's the primary in-editor way to hand work to an agent, and the freetext companion to the menu-driven Open with AI (whole file / folder / project). Submitting dispatches the typed prompt to your default agent, scoped to the current doc (or, in a folder view, the folder), which the agent receives as an @-mention. Until you pick something else, that default is an In app agent, so the conversation stays inside OpenKnowledge; it falls back to a Terminal CLI — preferring one detected on this machine — and then to an External app, when no higher option is available here. The agent picker beside the field overrides the default per send, listing In app agents first, then the Terminal CLIs available on this machine, then the external agent apps detected here. Whatever you pick is remembered on that machine and stays your default until you change it or turn it off in Configure agents. Success and failure use the same handoff toast as Open with AI.
The composer stays out of the way where it doesn't belong: it's hidden inside an AI editor's embedded view, while the docked terminal is open (the terminal is its own AI entry point), and when no doc or folder is open (the empty state already offers project handoff). It's also dismissible — an Ask AI badge in the status bar brings it back.
From a text selection
Select text in the WYSIWYG editor and the selection bubble menu shows a Comment button (Sparkles icon) alongside the formatting controls. Clicking it — or pressing Cmd+Shift+M — opens a composer on the selection. What you write there is a comment: it goes into the project's comment queue rather than to an agent, and you hand a batch of comments over as a separate, deliberate step from the Comments tab.
Terminal
The desktop app on macOS, Windows, and Linux has a built-in terminal with real interactive shells inside the editor window. On Windows, the terminal requires Windows 10 version 1809 (build 17763) or later, Windows 11, or Windows Server 2019 or later. On Linux, OpenKnowledge inherits Electron's supported distribution range: releases of the major distributions that both Chromium and the distribution vendor still support. Toggle it with Cmd+J on macOS or Ctrl+J on Windows and Linux, with Ctrl+` on any desktop platform (which also works from inside a focused terminal), or with View ▸ Show / Hide Terminal. It opens at the placement saved for this installation (the bottom dock by default). Right-click a bottom-dock tab and choose Move to right panel, use the matching command in the command palette or Terminal menu, or use the right-panel header button to move it back to the bottom. Moving or hiding the Terminal keeps its live shells, tabs, and scrollback intact.
The terminal is also the editor's AI-chat surface: opening it starts your remembered CLI pick, or a plain shell when you have none, and the tab strip's + button opens another tab with whatever you picked last — a CLI chat or a plain shell. Its dropdown switches that pick and opens a tab in the thing you picked, in one action. A CLI pick sticks and is shared with the Ask AI composer; the plain-shell pick is remembered for the terminal only. In-app agents run in the Agents panel, which has its own tab strip and + button; picking an agent there sticks the same way and also becomes your Ask AI default. With text selected in the editor, Cmd+J on macOS, Ctrl+J on Windows or Linux, and Ctrl+` on any desktop platform stage the passage into the active CLI's input (or open a new CLI tab when none is running) instead of toggling — they share one handler. Cmd+Shift+J on macOS or Ctrl+Shift+J on Windows or Linux always stages it into a new CLI tab; the passage sits in the input for you to add to, and nothing is submitted until you press Enter. Terminal ▸ New Terminal Window (see Terminal menu) opens a dedicated window with the same multi-session tabs, switched with Cmd+<number> on macOS or Ctrl+<number> on Windows and Linux, and shells starting at the project root.
On Windows, type wsl in any terminal tab to enter your default WSL distribution; OpenKnowledge's CLI detection and bundled ok command stay Windows-side, so install agent CLIs on Windows for them to appear in the launcher.
Rename a tab by double-clicking it or pressing F2; the name you set pins over whatever title the running program reports, and clearing it falls back to that title. Reorder tabs by dragging, or move the active tab with Cmd+Shift+← / Cmd+Shift+→ — untitled tabs keep a number that stays with their session as the strip is rearranged.
The desktop app restores the Terminal's placement, right-panel width, tab order, active tab, and tab names after a full app restart. A full quit ends the shell processes and discards their scrollback; the restored tabs start new shells. This differs from moving, hiding, or reloading the editor window, which keeps the existing live sessions.
On a narrow window, the right-side Terminal and Agents panel cannot remain open together. Opening either one closes the other and shows an in-app notice; closing the visible panel does not reopen the one that was displaced.
The shells run at full user privilege. To turn the terminal off for a project on this machine, use Settings ▸ Terminal or set terminal.enabled: false in .ok/local/config.yml (see the configuration reference); the setting is project-local, never shared via git or sync, and not agent-settable — only a human can flip it. On Windows, set terminal.shell in the same file to an absolute shell executable if you want to override automatic PowerShell and cmd.exe discovery. PowerShell, cmd.exe, and Git Bash (bash.exe) support OpenKnowledge-managed launches (agent chat tabs and fixed commands such as Resolve in terminal or Install Slidev) and dropped-file path insertion. A different existing executable remains active for plain terminal tabs and shows a capability notice; requested agent and command launches open only the plain shell without running the agent or command, and dropped-file paths are refused. Enter WSL by running wsl inside a supported shell rather than setting wsl.exe as the override.
Properties
Every doc can carry a bit of structured information at the top: a status, an owner, a tags list, a date. OpenKnowledge calls these its properties.
In the raw markdown file, these properties live in a fenced block at the very top of the file, between two --- lines. Markdown tools call that block frontmatter: it's just a small chunk of YAML, the doc's "labels." You never have to write it by hand: the Properties panel on the right of the editor shows each field as an ordinary form input (text, number, checkbox, date, or list) and saves your changes back into the file. Edit the panel or the raw block in source mode; changes propagate live either way.
A folder can describe itself (its own properties, just like a doc's) and offer templates that give new docs their starting properties. See Folders and templates for how that works.
File sidebar
The sidebar lists every file in your project on disk, including files excluded by .gitignore / .okignore, except dot-prefixed entries and tooling internals (.git/, .ok/, node_modules/). Turn on Show Hidden Files to reveal the dot-prefixed entries. Folder rows expand and collapse; file rows open in a tab on click. A file with validation problems shows a tinted row and a count badge, and clicking the badge (or tabbing to it and pressing Enter) opens that file with the Problems panel on it, see Where problems show up. The toolbar at the top of the sidebar has buttons to create files, create folders, and search. At the bottom of the sidebar, the collapsible Skills Studio dock lists your skills next to your files, so a file and a skill can be open side by side; see Skills.
Right-click context menus
Right-click anywhere in the sidebar to get a context-aware menu. Three shapes share consistent ordering so the muscle memory carries across surfaces:
| Item | Empty space | Folder row | File row |
|---|---|---|---|
| New File | yes | yes | no |
| New from template | yes | yes | no |
| New Folder | yes | yes | no |
| Reveal in Finder | yes (project root) | yes | yes |
| Open with AI ▸ | yes (project scope) | yes (folder scope) | yes (file scope) |
| Share | yes (project root) | yes | yes |
| Copy full path / Copy Path ▸ | yes (full path of project root) | yes (Full / Relative) | yes (Full / Relative) |
| Show Hidden Files | yes | yes | no |
| Expand all / Collapse all | yes (tree-scoped) | yes (subtree-scoped) | no |
| Duplicate | no | yes | yes |
| Rename | no | yes | yes |
| Hide folder / Hide this file | no | yes | yes |
| Delete | no | yes | yes |
Items that depend on the desktop app (revealing in your file manager, Delete via the OS trash) are hidden in the web build. Asset rows (images, PDFs, other non-markdown files) suppress Open with AI, Share, Duplicate, and Hide; they keep Reveal, Copy Path, Rename, and Delete.
Expand all and Collapse all only appear when they have work to do: Expand all is hidden when no folder is collapsed; Collapse all is hidden when no folder is expanded. New from template appears only when templates are available for the target folder, and Share only when the project has a GitHub remote.
Creating files and folders
Pick New File, New from template, or New Folder from any of the three menus. The sidebar shows an inline rename field at the target location; type a name and press Enter. New from template opens the template picker (the same dialog the toolbar's create buttons use) and respects the folder's templates_available cascade.
Right-click on empty space drops the new item at the project root. Right-click on a folder drops it inside that folder.
Hiding files and folders
Hide this file on a file row, or Hide folder on a folder row, appends a matching pattern to .okignore. See Ignore patterns for the full pattern syntax. The item disappears from the tree, search, and the agent's MCP tools immediately; nothing is deleted on disk.
Show Hidden Files
The sidebar always lists every file on disk under the content directory (including files excluded by .gitignore / .okignore), except synthetic system docs. A single Show Hidden Files toggle on the empty-space and folder menus controls whether dot-prefixed entries are shown. It persists per-project per-machine in .ok/local/config.yml under appearance.sidebar, and also lives in the View menu.
| Toggle | Effect |
|---|---|
| Show Hidden Files | Off by default. When on, stops the client from hiding paths that start with . (recovers allowed dotfiles like brain/.archived/note.md). Tooling internals (.git/, .ok/, node_modules/) stay hidden in every mode. |
On very large trees the disk walk is capped per level, and the sidebar shows a notice telling you the list is partial.
Deleting via Trash
Delete moves the item to the system Trash via the same shell.trashItem call VS Code and Finder use: recoverable, not destructive.
Open with AI
Open with AI ▸ dispatches the project, the folder, or the file to one of your agents — in app, in the terminal, or in an external app. The agent receives a short text prompt asking it to open the target in the OpenKnowledge web preview, then grounds the rest of the conversation via the OpenKnowledge MCP. Three scopes, three prompt shapes:
| Scope | Triggered from | Prompt template |
|---|---|---|
| Project | Empty-space menu (no doc / folder active) | Let's work on this project using OpenKnowledge. Open the OK editor in web view. |
| Folder | Folder row menu (folder view active) | Let's work on the `<folder>` folder using OpenKnowledge. Open the OK editor in web view. |
| File | File row menu (doc active) | Let's work on `<path>` using OpenKnowledge. Open the OK editor in web view. |
The trailing Open the OK editor in web view. directive is dropped when the appearance.preview.autoOpen preference is off, so the receiving agent honors the same "leave my preview alone" choice on its first turn; only the Let's work on … using OpenKnowledge. opener is sent.
To send your own freetext instruction along with the handoff, use the bottom Ask AI composer (or the empty-state create composer on a fresh project) rather than these one-click submenus.
Install detection supplies the defaults for all three sections: Terminal and External apps rows probe for the CLI or app itself, and In app rows probe for the agent's underlying CLI — and for an agent whose sign-in lives where OpenKnowledge can read it (Codex today, through the namespace it shares with the Codex CLI), an existing sign-in counts on its own even with no CLI installed. Settings → Configure agents overrides those defaults in both directions — turn off something detected, or turn on something you haven't installed yet. Terminal rows always use the desktop app's own PATH probe. For External apps the desktop app checks the OS protocol handlers locally, while the web build asks the server (GET /api/installed-agents), so that answer reflects the machine the server runs on — exact on localhost, but against a remote server (a hosted preview, SSH tunnel, remote dev) it's the server's installs that count. The In app signal is always the server's: it rides the agent catalog, not either probe. When nothing is enabled or detected, the submenu is just the Configure agents row.
See the per-integration pages for what each agent receives once dispatched.
The menu is organized into three sections, in the order the default follows. In app leads: a row for each in-app agent you've enabled or that detection turned up, which opens the conversation in OpenKnowledge's Agents panel without leaving the app. Terminal (desktop app) follows: a row for every agent CLI OpenKnowledge can launch — Claude, Codex, OpenCode, Cursor, GitHub Copilot, Pi, Antigravity, OpenClaw, and Hermes — each running its own command in OpenKnowledge's docked terminal with the same scoped prompt. On Windows, OpenKnowledge pastes that prompt without submitting it because a generic ConPTY readiness signal cannot safely identify the active input; review the prompt, then press Enter to send it. A CLI the PATH probe reports absent is hidden until you turn it on in Configure agents. External apps comes last, listing the agent apps detected on this machine — Claude Desktop, ChatGPT Desktop (Codex's desktop app is branded ChatGPT), and Cursor Desktop — plus any you turned on in Configure agents (those route to the app's installer); selecting one launches it via its deep link and hands the work out of OpenKnowledge. Because the sections can carry the same brand name, the Desktop suffix is what tells a Terminal Claude (the CLI) apart from an External apps Claude Desktop (the app) on screen; screen readers additionally get "Claude CLI" as the Terminal row's accessible name. Each section renders only when it has something to launch, so on the web build, which has no docked terminal, the Terminal section is absent, and a saved CLI pick degrades to the same order the default follows: an In app agent when one is available, otherwise an external app. A Configure agents row is always last.
The empty-state create composer on a fresh project carries the same three-way split: its In app rows pick the in-app agent the Create button uses, its Terminal rows (desktop only, disabled until the workspace resolves) launch any of those CLIs with the brief you typed, and its External apps rows hand that brief to an agent app installed here.
When Claude or Codex launches from the docked terminal, OpenKnowledge auto-approves its own MCP tools, so the agent searches, reads, and edits the knowledge base without a per-call approval prompt. Claude additionally auto-approves the ok open command. Every other CLI launches unchanged.
Five tools stay gated: delete and move (knowledge-base-wide blast radius), share_link (publishes content), install (writes executable skill scripts into the agent's own config directory), and import (acquires skill content from an external source). For Claude, everything outside OpenKnowledge still prompts too, including shell commands and non-OK file edits. The guarantee is best-effort per agent: Claude uses an explicit allow/ask list, while Codex uses its own approve mode (auto-approve except potentially-unsafe actions) and only gets it once its OpenKnowledge entry is already configured, so run ok init for Codex if it keeps asking.
Turn it off in Settings → Terminal → “Let agents use OpenKnowledge without asking” (agents.autoApproveOkTools). It applies to every project on this machine and defaults on.
Tabs and split panes
Tabs share the main editor header and shrink as the row fills, keeping every open target visible without a horizontal scrollbar. Drag a tab to reorder it. Opening a file from the sidebar uses a lightweight preview tab by default: the next single-clicked file replaces it, while double-clicking the tab title, pinning, or choosing Keep open from its context menu keeps it open. Turn previews off with Settings → Preferences → Preview tabs (editor.previewTabs).
To work side by side, drag any document, folder, or New tab to the left or right edge of the editor. The blue drop indicator shows where the new vertical pane will open. You can also right-click a tab and choose Move to new pane left or Move to new pane right; from the keyboard, focus the tab, press Shift+F10 (or the Menu key), then choose the same command. Drag the divider to resize panes. Each pane keeps its own active tab, while the document panel follows the pane you most recently focused. Moving or closing a pane's last tab removes the pane automatically.
Open tabs, pane order, sizes, and the focused pane are restored with the project after a clean restart.
Command palette
Cmd+K opens the command palette in both the desktop app and the browser, and Cmd+P (Ctrl+P on Windows / Linux) does the same from anywhere — including while text is selected in the visual editor, where Cmd+K adds a link instead. Type to jump to any file or folder, run create commands, open the graph or settings, or dispatch to an agent; recently opened entries surface first. In the desktop app it also switches projects and worktrees.
In the browser, Cmd+P is normally the print shortcut; OpenKnowledge takes it for the palette, so print from the browser's own menu instead.
Remove a recent project from the list by hovering its row and clicking the ×, or right-clicking for a Remove from recent projects menu — the same controls are on the sidebar's Switch project dropdown and in the Project Navigator. A recent whose folder was deleted or moved off disk isn't greyed out; it's cleared automatically the next time you open it, with a brief notice, instead of opening a broken window.
Every word you type has to appear somewhere in a command's name or its search terms, but the order does not matter and the words do not have to sit next to each other: branch switch and switch branch both reach Switch worktree. Commands also carry the words people search by rather than only the words in their names, so delete file reaches Move to Trash and open settings reaches Settings. Because commands are listed above file results, a query that matches both will highlight the command — arrow down to reach the file, or keep typing to narrow.
A tag: prefix searches by tag: tag: alone lists every tag, tag:fr narrows the tag list, and tag:frontend lists the docs tagged #frontend (including its hierarchy children). When semantic search is configured for the project, a By meaning pill switches the palette to meaning-based search — press Enter to run it; typing alone never fires a query.
Sidebars and window width
The editor has two sidebars: the file sidebar on the left and the document panel on the right (Outline, Links, Properties, Timeline). Both adapt to the window:
- At comfortable widths (1280px and up) both sidebars open by default.
- Between 1024px and 1279px the document panel defaults to collapsed so the editor keeps its breathing room; the file sidebar stays open.
- Below 1024px both default to collapsed so the editor canvas isn't squeezed off-screen.
- When OpenKnowledge is opened inside an AI editor's webview (Cursor, Codex, Claude Desktop), both sidebars start collapsed regardless of width; the embedded view is for reading the content you were sent, not for file management.
The defaults only apply until you toggle. OpenKnowledge remembers your most recent Show / Hide for each sidebar in your browser and survives reloads. When you come back to the same layout context (narrow window, comfortable window, or embedded view) you used last, your toggle is what you'll see. Toggling in a different context replaces that memory; only your most recent choice sticks, so a stale preference from a wide-monitor session can't quietly override what you just chose on a narrow screen.
Keyboard shortcuts (on Windows / Linux, use Ctrl in place of Cmd and Alt in place of Option; rows that already use Ctrl are unchanged):
| Shortcut | Action |
|---|---|
Cmd+T | Open a new editor tab. |
Ctrl+Tab | Move to the next editor tab. |
Ctrl+Shift+Tab | Move to the previous editor tab. |
Cmd+1 ... Cmd+8 | Jump to one of the first eight editor tabs. |
Cmd+9 | Jump to the last editor tab. |
Cmd+Shift+T | Reopen the most recently closed editor tab. |
Cmd+K | Command palette — or, with text selected in the visual editor, add a link (cursor inside a link edits it). |
Cmd+Option+S | Show / Hide the file sidebar (left). Matches Apple's standard sidebar accelerator. |
Cmd+Option+B | Show / Hide the document panel (right). Matches VS Code's Secondary Side Bar accelerator. |
Cmd+Option+M | Toggle between the visual and source editors, keeping your place. |
Cmd+Option+E | View in source — jump from the visual editor to the Markdown for the block at the cursor, centered and highlighted (visual editor only). |
Cmd+J / Ctrl+J | Show / Hide the Terminal in its current placement (macOS / Windows and Linux desktop apps). With text selected, stages the passage into the AI CLI's input instead — nothing runs until you press Enter. |
Ctrl+` | Show / Hide the Terminal too — the VS Code / Zed chord, literal Ctrl (desktop app). Works even while a terminal holds focus. With text selected it stages the passage like Cmd+J instead of toggling. |
Cmd+Shift+J / Ctrl+Shift+J | Open an additional terminal tab (macOS / Windows and Linux desktop apps). With text selected, stages the passage into the new tab's AI CLI input. |
Cmd+P | Open the command palette from anywhere — unlike Cmd+K, it opens the palette even while text is selected in the visual editor. |
Cmd+L | Open and focus the Ask AI composer (desktop app). |
Cmd+Shift+D / Ctrl+Shift+D | Start a bug report (desktop app). The screenshot it attaches is the screen exactly as it looks when you press the chord — open menus, tooltips and hover states included — plus a marker drawn where your pointer was, since a screenshot never includes the cursor. No marker appears if the pointer has not moved since the window loaded, or has since left the window. Nothing is sent until you press Send. |
Cmd+Shift+M | Comment on the selected text (visual editor). |
Cmd+Shift+Enter | Send the checked comments the open Comments tab is showing to an agent. Does nothing while that tab is closed. |
Cmd+F | Find in the visual editor. |
Cmd+Option+F | Find and replace (Ctrl+H on Windows / Linux). |
Cmd+G / Shift+Cmd+G | Next / previous find match. |
In the desktop app the sidebar and terminal toggles also live in the View menu (see below), where each label flips between Show … and Hide … based on current state.
Inside an AI editor's embedded view, the Open with AI menus, the bottom Ask AI composer, and the empty-state agent grid are hidden; you're already inside an agent, so the handoff would loop back into the same surface. OpenKnowledge's MCP tools and the document itself stay fully available; only the launchers are gone.
Application menus
The OpenKnowledge desktop app keeps its menu bar in sync with the active editor target: File menu items enable / disable based on whether a doc, folder, or nothing is currently selected. On macOS this is the system menu bar; on Windows and Linux the same menus live in the app window's title bar, with Ctrl in place of Cmd.
File menu
Alongside the project items (Recent project, New project…, Switch Project… Cmd+Shift+P, Open Folder… Cmd+O), the worktree pair (New worktree…, Switch worktree…), Set up OpenKnowledge integrations… (re-runs the first-launch integrations setup), and Close tab, the File menu surfaces the most-used sidebar affordances so they're reachable from the keyboard:
| Item | Accelerator | Behavior |
|---|---|---|
| New File | Cmd+N | Creates a new file at the project root (or under the active folder if one is selected). |
| New Folder | Cmd+Shift+N | Creates a new folder. |
| New from Template… | (none) | Opens the template picker. |
| Duplicate | Cmd+D | Duplicates the active file or folder. Disabled when nothing is selected. |
| Rename | (none) | Inline-renames the active file or folder. Disabled when nothing is selected. |
| Move to Trash | Cmd+Delete | Sends the active file or folder to the OS trash (with the same confirm modal as the sidebar). On Windows the item reads Move to Recycle Bin. Disabled when nothing is selected. |
| Reveal in Finder | (none) | Reveals the active target in your file manager. The label adapts per platform — Reveal in File Explorer on Windows, Open containing folder on Linux. Empty selection reveals the project root. |
| Open with AI ▸ | (none) | Same submenu as the sidebar, dispatched at the active scope. |
| Copy Path ▸ | (none) | Full / Relative path of the active target. |
Edit menu
Alongside the standard Undo / Redo / Cut / Copy / Paste / Select All items:
| Item | Accelerator | Behavior |
|---|---|---|
| Check Spelling While Typing | (none) | Checkbox reflecting whether spell check is on. Toggling applies app-wide and persists across relaunches — it's the same switch the editor right-click menu's Disable / Enable Spell Check rows flip (see Right-click menu and spell check). |
View menu
Before the existing Zoom and Toggle Fullscreen items, the View menu gets:
| Item | Accelerator | Bound to |
|---|---|---|
| Show / Hide Sidebar | Cmd+Option+S | Toggles the file sidebar (left). Label flips between Show and Hide based on current state, matching Finder. |
| Show / Hide Document Panel | Cmd+Option+B | Toggles the document panel (right). |
| Show / Hide Terminal | Cmd+J / Ctrl+J | Toggles the Terminal in its current placement. With editor text selected, stages the selection into the AI CLI's input instead of toggling. (Ctrl+` toggles it too, though that chord has no menu accelerator.) |
| Show Hidden Files | Cmd+Shift+. | appearance.sidebar.showHiddenFiles; same toggle as the sidebar's right-click menu. |
| Expand All | (none) | Expands every folder in the tree. Hidden when nothing is collapsed. |
| Collapse All | (none) | Collapses every folder in the tree. Hidden when nothing is expanded. |
Toggling the menu checkboxes flips the underlying config field, which propagates back to the sidebar via the standard CRDT subscription; both surfaces stay synchronized.
Terminal menu
| Item | Accelerator | Behavior |
|---|---|---|
| New Terminal | (none) | Opens a new terminal tab, revealing the Terminal in its current placement if it's hidden. |
| New Terminal Window | (none) | Opens a terminal in its own window — the same multi-session tabs, switched with Cmd+<number> on macOS or Ctrl+<number> on Windows and Linux, shells starting at the project root. |
| Move Terminal to right / bottom | (none) | Moves the live Terminal workspace to the opposite placement. The label names the destination. |
| Kill Terminal | (none) | Closes the active terminal tab and kills its shell. |
Real-time collaboration
Everything in the editor (body, frontmatter, sidebar toggles) is backed by a CRDT. You and multiple AI agents writing through MCP can edit the same doc concurrently. Per-user presence is shown in the editor header; the agent activity view (Agent activity) groups every burst of agent edits with per-burst diffs and selective undo.
For recovery + history, see Timeline and recovery.
See also
- Ignore patterns:
.okignoresyntax and Hide-from-tree mechanics - Configuration reference:
.ok/config.ymlschema includingappearance.sidebar.* - Agent activity: review and undo per-session agent edits
- Timeline and recovery: version history and restore