Skip to content

Install

Terminal window
npm install -g cogni-code
cogni-code install

Detects every installed harness (Claude Code, Codex CLI, OpenCode) and wires them all. Memory is shared across harnesses — install into several and they all see the same graph.

For a custom storage location: cogni-code install --graph-root /path/to/memory

Permission denied (EACCES)?

Use a local install instead of global:

Terminal window
npm install cogni-code && npx cogni-code install

All commands work the same — just prefix with npx.

Updates are automatic — npm update -g cogni-code updates all hooks instantly (they call the cogni-code CLI, not absolute file paths).

Terminal window
cogni-code install --docker

Sets up the Docker daemon that runs the scribe/librarian/dreamer pipeline automatically. Requires Docker Desktop or Podman. Auto-detects the worker provider (codex, claude, opencode, or api) or specify with --worker codex.

If your environment has no Docker or Podman — a NanoClaw container, a sandbox, a CI runner — the api worker runs the full pipeline via direct HTTP calls. No CLI agent binary, no subprocess:

Terminal window
cogni-code install --docker --worker api

The api worker respects the standard Anthropic env-var surface, so it routes through whatever credential infrastructure your agent already uses:

Env var Auth method Use case
ANTHROPIC_API_KEY x-api-key header Direct API key (bills per-token)
ANTHROPIC_AUTH_TOKEN + ANTHROPIC_BASE_URL Authorization: Bearer Credential proxy (e.g. OneCLI Agent Vault in NanoClaw) — routes to your subscription, no API billing

It auto-activates when credentials are present and no CLI harness is detected. You can also start the daemon directly without Docker:

Terminal window
node "$(npm root -g)/cogni-code/dist/graph-memory/pipeline/daemon.js"
Terminal window
git clone https://github.com/ConnorCallahan01/cogni-code.git
cd cogni-code/graph-memory-plugin
npm install && npm run build
./bin/install.sh # Claude Code
./bin/install-codex.sh # Codex CLI
./bin/install-opencode.sh # OpenCode

Then start a session and run:

/memory-onboard

The onboard wizard walks you through runtime mode and seeds your first memory nodes. If you installed via npm, the graph is already initialized — onboarding is optional.


Installing as an agent? See the agent install guide — a flat, executable runbook designed for AI agents given a URL and told to install.