Local-first 🧠memory for Hermes Agent that lives in your Obsidian vault and remembers project context. Nightly 😴 dream passes turn repeat corrections into confirmed preferences with measurable confidence. Adapters ship for Claude Code, Codex, and OpenClaw, with an MCP server for anything else.
Native Windows
Open Second Brain runs natively on Windows 10 and 11 (x64). WSL is a Linux
host and follows the Linux instructions instead; this page is for agents that
run on Windows itself - Hermes Agent's desktop app or install.ps1 build,
Claude Code's native claude.exe, opencode, Cursor and the other MCP hosts.
1. Prerequisites
Bun (>= 1.1.0), per user, no administrator rights needed:
powershell -c "irm bun.sh/install.ps1 | iex"
tar.exe ships in C:\Windows\System32 on Windows 10 1803 and later; brain
snapshots use it. zstd is optional: without it snapshots are compressed
with gzip in-process, so no gzip binary is needed either.
Git is needed only to clone the repository. Hermes Agent ships its own Git for Windows; Claude Code's hooks need Git for Windows installed (see below).
2. Get the code and publish the CLI
git clone https://github.com/itechmeat/open-second-brain $env:USERPROFILE\projects\open-second-brain
cd $env:USERPROFILE\projects\open-second-brain
bun install
bun run src\cli\main.ts install-cli
install-cli writes o2b.cmd, vault-log.cmd and o2b-hook.cmd into
%USERPROFILE%\.local\bin - small launchers, not symlinks (a symlink needs
Developer Mode or an elevated token). If that directory is not on your PATH
the command says so and names the Environment Variables dialog to add it in
(rundll32.exe sysdm.cpl,EditEnvironmentVariables opens it); open a new
terminal afterwards. Claude Code's native installer already puts it on PATH.
3. Initialize
o2b init --vault C:\Users\you\Vault --agent-name "<runtime>-<host>-agent" --timezone Europe/Belgrade
o2b brain init --vault C:\Users\you\Vault
~\Vault is accepted as well as ~/Vault.
Where things live
| What | Windows | Linux / macOS |
|---|---|---|
| Config | %LOCALAPPDATA%\open-second-brain\config.yaml |
~/.config/open-second-brain/config.yaml |
| opencode session spool | %LOCALAPPDATA%\open-second-brain\opencode\ |
~/.local/share/open-second-brain/opencode/ |
| CLI launchers | %USERPROFILE%\.local\bin\*.cmd |
~/.local/bin/* (symlinks) |
OPEN_SECOND_BRAIN_CONFIG and the XDG_*_HOME variables override these on
every platform. %LOCALAPPDATA% rather than the roaming %APPDATA%, because
what lives there is machine-bound: the vault path and the agent name, which
carries the host.
Runtimes
- Hermes Agent - install the plugin as in
hermes.md. On Windows the memory provider starts the MCP bridge asbun run <plugin>\src\cli\main.ts mcp, without a console window, and reads the config from%LOCALAPPDATA%\open-second-brain\config.yaml. - Claude Code (
claude.exe) - install the plugin as inclaudecode.md. Claude Code starts the plugin's MCP server command throughcmd.exe /d /s /c, which resolves the extensionlessscripts/o2bto itsscripts\o2b.cmdsibling via PATHEXT - no Windows-specific plugin config is needed. The lifecycle hooks are POSIX shell commands and run under Git Bash, which Claude Code finds throughgit.exeon PATH (orCLAUDE_CODE_GIT_BASH_PATH). Without Git for Windows Claude Code falls back to PowerShell, the hook commands fail to parse there and are skipped (exit 1, non-blocking) - the MCP tools still work. Install Git for Windows to get the hooks. - opencode, Cursor, Gemini CLI, Copilot CLI, kiro, Codex -
o2b install --target <name> --apply --yeswrites the MCP entry ascmd /d /c o2b mcp ..., thecmd /c <name>form several hosts document fornpxon Windows (/dskips cmd's AutoRun, whose output would corrupt the JSON-RPC stream). The entry also setsNoDefaultCurrentDirectoryInExePath=1: cmd.exe otherwise looks foro2bin the current directory before PATH, and a host runs its servers in the project it opened, so a repository could ship its owno2b.cmd. The.cmdlaunchers set the same variable for theirbunlookup. The install refuses a vault path containing& | < > ^ % " !, which cmd would split, expand or execute. - Codex runs plugin hooks through
cmd.exe, so every hook in the Codex plugin carries acommandWindowsform that calls theo2b-hook.cmdlaunchero2b install-cliputs on PATH, never one from the current directory. Git for Windows is not needed for them. Codex marks plugin hooks untrusted until you approve them in/hooks. - Grok Build gets absolute
bun.exe run <repo>\src\cli\main.tsMCP entries and hook commands. Unverified on Windows: xAI does not document which shell runs hook commands there (reports say PowerShell), and the unquoted command breaks if the Bun or repository path contains a space. Keep both paths space-free, or report a failure.
Behaviour that differs on Windows
- Files open in another process cannot be renamed or deleted on Windows.
Atomic writes and the search-index swap retry for up to two seconds when
Syncthing, OneDrive, an antivirus scan or another
o2bholds a file. o2b search reindexswaps the index by renaming it. If a long-running process keepsbrain.sqliteopen past that window (an MCP server in the middle of a query), the swap fails with a clear error and the previous index stays in place; run it again.- Cron recipes (
--cron-template) print POSIXcrontablines. On Windows, schedule the sameo2bcommand with Task Scheduler. o2b mcp's SIGTERM drain has no equivalent: Windows terminates a process without delivering a signal it can handle.
Verify
o2b doctor --vault C:\Users\you\Vault
o2b install --check