Skip to content

Repository files navigation

OpenViking Memory for Codex

A standalone Codex plugin that connects Codex hooks and MCP tools to an OpenViking server while keeping Codex on its own configuration and actor peer.

中文说明

Why this fork

The upstream examples share most memory logic across agent harnesses. This fork packages the Codex integration as an independently installable marketplace plugin and uses an existing ~/.openviking/ovcli.conf.codex as its source of truth for both hooks and MCP, even when generic OpenViking credential variables are present (unless OPENVIKING_CREDENTIAL_SOURCE=env is explicitly selected). If that default file is absent, hooks and MCP share generic environment auto- precedence instead of resolving different backends. Its default actor_peer_id is always codex; it does not derive identity from the current repository path.

It registers hooks for startup/resume, prompt recall, incremental capture, pre/post compaction, session end, subagent lifecycle, virtual-URI protection, and skill experience recall. The native OpenViking MCP server remains available through a credential-aware stdio proxy.

Requirements

  • Codex CLI with plugin and hook support
  • Node.js 20 or newer
  • OpenViking v0.4.16 or newer. This plugin also includes the two official post-v0.4.16 Codex compatibility changes for the current-user home alias (tilde URI) and recall-compressor Base URL.
  • An ovcli.conf that can reach that server

Install

git clone https://github.com/gamesme/openviking-codex-plugin.git
cd openviking-codex-plugin
./scripts/install.sh

If the official openviking-memory@openviking plugin is already installed, use ./scripts/install.sh --replace-official so only one plugin owns the openviking-memory MCP server name.

The installer can copy connection fields from ~/.openviking/ovcli.conf and writes ~/.openviking/ovcli.conf.codex with mode 0600. It never prints the API key. Run node plugins/openviking-memory-codex/scripts/setup.mjs later to edit the connection interactively.

Restart Codex after installation. Use /hooks to inspect loaded hooks and ask Codex to call OpenViking health to verify the live connection.

Development

npm run check
./scripts/install.sh --dry-run --replace-official

See UPSTREAM.md for provenance and plugin design for lifecycle details.

About

Codex-native OpenViking memory plugin with dedicated peer identity and lifecycle hooks

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages