Skip to main content
The cohaku CLI provides full access to the memory system from your terminal. Every operation available through MCP tools has a corresponding CLI command.

Installation

npm install -g @cohaku/cli

Quick Setup

cohaku init
This will:
  1. Initialize the SQLite database at ~/.config/cohaku/memory.db
  2. Auto-detect installed AI coding tools (Claude Code, Cursor, VS Code, etc.)
  3. Register the MCP server with each detected tool

Command Groups

GroupCommandsDescription
Memoryadd, search, update, delete, context, duplicates, consolidateStore and retrieve memories
Graphentity, edge, graphKnowledge graph operations
EpisodeepisodeChronological event logging
SessionsessionWork session lifecycle
GenerategenerateExport memories to editor config files

Server Commands

CommandDescription
cohaku mcpStart MCP server (stdio transport)
cohaku startStart MCP server + dashboard
cohaku serveStart HTTP API + dashboard (no MCP)

Common Options

Scope

Most commands accept a --scope / -s option:
ValueDescription
projectCurrent project only (default)
globalGlobal scope only
allBoth project and global

Memory Layers

LayerPriorityDescription
rule10Permanent constraints, always loaded first
working5Temporary session-scoped notes
long_term1Durable cross-session knowledge (default)