Generated banner for OpenContext
Generated logo for OpenContext

OpenContext

Memory server

First committed by 0xranx

Published in 0xranx/OpenContext. Publisher page

1,280 GitHub stars

What it is

CLI + MCP server for managing shared LLM context stores
— the description by 0xranx

AutoGineer overview, from the brain’s own files

OpenContext is a lightweight personal knowledge store designed to solve the problem of fragmented context across AI coding sessions. It functions as a persistent memory layer that integrates with existing coding agents like Cursor, Claude Code, and Codex. By providing a unified CLI and MCP server, it allows agents to read, write, search, and iterate on a user's global context library. The system includes a native desktop application and a local web UI for visual management, ensuring that background information, project decisions, and documentation remain accessible and actionable across different repositories and timeframes.

How it works

Memory model: Hybrid

AutoGineer overview, from the brain’s own files

OpenContext operates as a hybrid memory system. It uses a CLI tool to manage a local library of folders and documents, which are stored using SQLite and vector databases. It exposes these as an MCP server, allowing AI agents to interact with the knowledge base through standardized tools and slash commands. Users initialize the system to generate agent-specific skills and configuration files, enabling agents to automatically load, search, and persist context during development workflows.

Folders
FolderRoleFiles
.githubagent-config6
binscripts1
docsdocs8
scriptsscripts3
srcsource-code103
teststests6
cratesfolder25
src-iosfolder54
src-taurifolder26

The agent reads

Requirements

Runtimes: Node.js >=18

Databases: LanceDB, Milvus, SQLite

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Google Antigravity, Kiro, OpenCode, Amp, Roo Code, Cline, JetBrains Junie, Devin (ex-Windsurf)

Set it up

  1. This brain runs code automatically: 1 script. Review package.json before opening the folder in Claude Code. No step below turns a hook on for you.

    • package.json: [ -d .git ] && ./scripts/setup-hooks.sh || true
  2. Not scanned by AutoGineerAutoGineer could not scan everything it runs. https://www.npmjs.com/package/@aicontextlab/cli
  3. First committed by 0xranx. Published in 0xranx/OpenContext. Licence: MIT License.

Usage

AutoGineer overview, from the brain’s own files

  • Manage a global library of project context and documentation.
  • Enable AI coding agents to read and write to a persistent knowledge base.
  • Search across historical project decisions and background information.
  • Provide agents with automated context loading via MCP tools.
  • Maintain a visual interface for managing knowledge outside of the IDE.
  • Use slash commands to trigger context-aware actions within supported coding agents.
“/opencontext-context”
The agent loads the relevant background information and project decisions before starting a new task.
“oc search "authentication flow"”
The CLI returns a list of documents related to the authentication flow, allowing the user to quickly find specific technical details.
“/opencontext-iterate”
The agent persists the current findings or learned information into the OpenContext knowledge base for future use.
“oc doc create project-a/setup.md -d "Initial project setup steps"”
A new document is created in the specified folder, making it immediately available for the agent to reference in future sessions.

Documentation by 0xranx

<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="docs/images/logo-dark.png"> <source media="(prefers-color-scheme: light)" srcset="docs/images/logo-light.png"> <img alt="OpenContext Logo" src="docs/images/logo-light.png" width="350"> </picture>

<p> <strong>Give your AI assistant a persistent memory.</strong><br> Stop repeating yourself. Start building smarter. </p>

<p> <strong>Bring your own coding agent.</strong> OpenContext reuses your existing CLI (Codex/Claude/OpenCode) and adds a GUI + built-in Skills/tools — no extra agent subscription. </p>

<table> <tr> <td> <img src="docs/images/overview.png" alt="OpenContext Overview" height="260"> </td> <td> <img src="docs/images/folder-refer-git.gif" alt="OpenContext Demo" height="260"> </td> </tr> </table>

<p> <a href="https://www.npmjs.com/package/@aicontextlab/cli"><img src="https://img.shields.io/npm/v/@aicontextlab/cli.svg?style=flat-square&color=cb3837" alt="npm version"></a> <a href="https://github.com/0xranx/OpenContext/blob/main/LICENSE"><img src="https://img.shields.io/github/license/0xranx/OpenContext?style=flat-square" alt="license"></a> </p>

<p> <a href="https://0xranx.github.io/OpenContext/en/"><strong>🌐 Website</strong></a> · <a href="https://0xranx.github.io/OpenContext/en/usage/"><strong>📖 Usage Guide</strong></a> · <a href="https://github.com/0xranx/OpenContext/releases"><strong>⬇️ Download Desktop</strong></a> </p>

<p><a href="README.zh-CN.md">中文文档</a></p> </div>


The Problem

When you use an AI assistant to build things, context gets lost (across days, repos, chats). You end up re-explaining background, repeating decisions, and sometimes the assistant continues with the wrong assumptions. Most tools stop at storage and don't plug into the coding agent you already use.

The Solution

OpenContext is a lightweight personal context / knowledge store for AI assistants (Agents) and coding tools like Cursor / Claude Code / Codex. It reuses your existing coding agent CLI (Codex/Claude/OpenCode) while adding a GUI plus built-in Skills/tools, so your agent can "load history first, then act; ship, then persist".

Skills-first support: oc init generates user-level skills (Cursor/Claude Code/Codex) plus slash commands (Cursor/Claude Code), so agents can load, search, create, and iterate your context with one command.

Before OpenContextAfter OpenContext
📂 Hard to share context across repos/sessions✅ Global context library works across all projects
🤷 Your ideas can't be quickly perceived by Agent✅ Agent loads your background & decisions automatically
🔒 Existing knowledge can't be operated by Coding Agent✅ Agent can directly read/write your knowledge base

What's Included

  • oc CLI — manage a global contexts/ library (folders/docs, manifests, search)

  • MCP Server — so Cursor/Claude Code/Codex/Agents can call OpenContext as tools

  • Skills + Slash Commands — user-level skills for Cursor/Claude Code/Codex and slash commands for Cursor/Claude Code (generated by oc init)

  • Agent-ready Knowledge Layer — reuse your existing coding agent CLI (Codex/Claude/OpenCode) with built-in skills/tools and GUI

  • Desktop App — manage/search/edit contexts with a native UI

  • Web UI — browse/edit contexts locally (no install required)

Why OpenContext for Builders

OpenContext's knowledge management Agent can be the coding agent you already use (Codex/Claude/OpenCode). You don't pay for a separate agent — you bring your own CLI and get a ready-to-use experience: a GUI for context management plus built-in Skills and tools that let the agent read, search, create, and iterate on your knowledge.

Quick Start

Install CLI
npm install -g @aicontextlab/cli
Choose Your Path
PathBest ForGet Started
🖥️ Desktop AppVisual users who want a native UIDownload from Releases
⌨️ CLI + ToolsDevelopers using Cursor/Claude Code/Codex/AI agentsnpm install -g @aicontextlab/cli && oc init
🔧 CLI OnlyPower users, automationnpm install -g @aicontextlab/cli

OpenContext works with the coding agent CLI you already have — it adds a GUI plus built-in Skills/tools instead of replacing your agent.

30-Second Setup (CLI + Cursor/Claude Code/Codex)
# 1. Install
npm install -g @aicontextlab/cli

# 2. Initialize (prompts for tool setup; defaults to all)
cd your-project
oc init

# 3. Use slash commands (Cursor + Claude Code)
#    /opencontext-context  — load background before working
#    /opencontext-search   — find relevant docs
#    /opencontext-create   — create a new doc
#    /opencontext-iterate  — persist what you learned
#    Tip: non-interactive installs can use --tools cursor,claude,codex or --no-claude/--no-cursor/--no-codex
#
#    Installed by oc init:
#    - Cursor: ~/.cursor/commands
#    - Claude Code: ~/.claude/commands (or $CLAUDE_CONFIG_DIR/commands)
#    Skills (wrapped from slash commands):
#    - Cursor: ~/.cursor/skills/opencontext-*/SKILL.md
#    - Claude Code: ~/.claude/skills/opencontext-*/SKILL.md (or $CLAUDE_CONFIG_DIR/skills)
#    - Codex: ~/.codex/skills/opencontext-*/SKILL.md (or $CODEX_HOME/skills)
#
# 4. MCP config is user-level (Cursor/Claude Code/Codex)
#    - Cursor: ~/.cursor/mcp.json
#    - Claude Code: ~/.claude/mcp.json (or $CLAUDE_CONFIG_DIR/mcp.json)
#    - Codex: ~/.codex/mcp.json (or $CODEX_HOME/mcp.json)

📖 For detailed usage guide, search configuration, and FAQ, visit the Website.



FAQ (Frequently Asked Questions)

What is OpenContext?

OpenContext is a lightweight personal context / knowledge store for AI assistants and coding tools like Cursor / Claude Code / Codex. It gives your AI agent a persistent memory so you can stop repeating yourself and start building smarter.

How does OpenContext work with my existing coding agent?

OpenContext reuses your existing coding agent CLI (Codex/Claude/OpenCode) while adding a GUI plus built-in Skills/tools. You don't pay for a separate agent subscription — you bring your own CLI and get a ready-to-use experience.

What are the core components?
ComponentFunction
oc CLIManage global contexts/ library (folders/docs, manifests, search)
MCP ServerCursor/Claude Code/Codex/Agents call OpenContext as tools
Skills + Slash CommandsUser-level skills for Cursor/Claude Code/Codex + slash commands for Cursor/Claude Code
Desktop AppManage/search/edit contexts with a native UI
Web UIBrowse/edit contexts locally (no install required)
What coding agents are supported?
AgentConfig Location
Cursor~/.cursor/mcp.json
Claude Code~/.claude/mcp.json
Codex~/.codex/mcp.json
OpenCode~/.config/opencode/
What are the key benefits?
Before OpenContextAfter OpenContext
📂 Hard to share context across repos/sessions✅ Global context library works across all projects
🤷 Your ideas can't be quickly perceived by Agent✅ Agent loads your background & decisions automatically
🔒 Existing knowledge can't be operated by Coding Agent✅ Agent can directly read/write your knowledge base
Is OpenContext free and open source?

Yes! OpenContext is free and open source. Check the repository for license details.

How do I get started?
npm install -g @aicontextlab/cli
oc init

This generates user-level skills and slash commands for your coding agent.

Where can I get help?

CLI Commands (Quick Reference)

Run oc <cmd> --help for details.

CommandWhat it does
oc initInitialize OpenContext + user-level tool integrations
oc folder lsList folders
oc folder create <path> -d "desc"Create a folder
oc doc create <folder> <name>.md -d "desc"Create a document
oc doc ls <folder>List documents
oc context manifest <folder>Generate file list for AI to read
oc search "query"Search documents
oc mcpStart MCP server for MCP clients
oc uiStart local Web UI

📖 Full command reference available on the Website.


Development

# Clone & install
git clone https://github.com/0xranx/OpenContext.git
cd OpenContext && npm install

# Desktop app
npm run tauri:dev    # development
npm run tauri:build  # production build

# Web UI
npm run ui:dev       # development
npm run ui:build     # production build

License

MIT © OpenContext

244 files · 238 not served here

Advantages

  • Provides a global context library that works across all projects and sessions. evidence: README.md
  • Allows agents to directly read and write to the user's knowledge base. evidence: README.md
  • Integrates with existing coding agent CLIs without requiring new agent subscriptions. evidence: README.md

Limitations

Security

Risk level: Low risk

This brain runs

Agent instructions that run or fetch something (16)

  • AGENTS.md: `npm install` installs dependencies.
  • AGENTS.md: `npm run ui:dev` starts the Vite UI dev server;
  • AGENTS.md: `npm run ui:build` builds UI assets.
  • AGENTS.md: `npm run tauri:dev` runs the desktop app;
  • AGENTS.md: `npm run tauri:build` builds production binaries.
  • AGENTS.md: `npm run mcp` starts the MCP server;
  • AGENTS.md: `npm run api:dev` runs the local API server.
  • AGENTS.md: `npm run test` runs core/search/native Node tests;
  • AGENTS.md: `npm run test:all` adds integration + Rust tests.
  • AGENTS.md: Git hooks run `cargo fmt --check` via `scripts/pre-commit` (installed by `npm run prepare`).
  • AGENTS.md: Node tests use `node --test` and live in `tests/**` or `src/ui/tests/`.
  • AGENTS.md: Rust tests live under `crates/opencontext-core` and run with `cargo test`.
  • AGENTS.md: PRs should include a concise description, testing notes (commands run), and UI screenshots/GIFs when UI changes occur.
  • AGENTS.md: Windows builds must run on Windows or via CI (`npm run tauri:build:win`).
  • AGENTS.md: If you are not sure which docs to read, run `oc search "<query>" --format json` to narrow down candidates.
  • AGENTS.md: Then run `oc context manifest <folder> --limit 10` (or `oc context manifest .

Package scripts (1)

  • package.json (prepare): [ -d .git ] && ./scripts/setup-hooks.sh || true
  • Low risk: scripts-present (scripts/setup-hooks.sh)

Attribution and licence

First committed by
GitHub avatar of 0xranx0xranx
Declared authors
  • AIContextLab (declared in package.json)
Publisher
GTLIN (Community)
Source
0xranx/OpenContext · commit 0649e71
Licence
MIT License (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
0xranx, wormuz, meichuanyi

AutoGineer is not affiliated with or endorsed by 0xranx.

Install from source

238 of its files are not served here, so there is no ZIP. 0xranx/OpenContext at 0649e71