Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

MemoraX Code

memorax-ai/memorax-code | Trendshift

Never lose context. Never start over.

Beyond code, it remembers how your architecture evolves and how your engineering unfolds.

MemoraX Code website npm version npm package version Node.js 20 or newer

Join the MemoraX Code Discord community Join the MemoraX Code WeChat group

English · 简体中文

Make Every Interaction the Starting Point for the Next

Coding agents are good at the task in front of them, but a new session often starts without the architecture, failed attempts, repository rules, or working preferences established before it.

MemoraX Code gives Codex, Claude Code, WorkBuddy, DeepSeek Harness, OpenCode, and Trae a shared memory layer for that context. It can recall prior engineering knowledge, capture reusable lessons from completed work, maintain repository knowledge, and carry your procedures and preferences into future sessions.

The goal is not to remember everything. It is to bring back the small amount of memory relevant to the current task so the agent can reach useful investigation and validation sooner.

Quick Start

Prepare Node.js 20+ (Node.js 24 LTS recommended) and at least one of Codex, Claude Code, WorkBuddy, DeepSeek Harness, OpenCode, or Trae. Python 3 is required for Repo Memory operations. Each coding-agent harness retains its own runtime requirements; current DeepSeek Harness releases require Node.js ^22.19.0 || >=24.0.0. DSH may be installed globally or initialized beforehand through its official npx workflow.

Install and Connect

1. Install the Package

npm install -g @memorax/memorax-code

2. Connect a MemoraX Account (Recommended)

Create a MemoraX account or use an existing one, then run:

memorax-code setup --existing-account

[!TIP] Using MemoraX Code across devices? Find the MemoraX username and API key needed by setup in the MemoraX Code configuration file on a configured device (normally ~/.memorax-code/config.toml), then enter them locally during setup on another device. This file contains your API key—keep it private and never paste it into chats or public issues.

Or Try Without an Account (90-Day Guest Mode)

To start immediately and connect an account later, run:

memorax-code setup

To activate your guest account, first run this command directly in your local terminal:

memorax-code account --show-mark-id

After obtaining the Mark ID, create your MemoraX account. The platform does not currently support attaching a Mark ID to an account that has already been registered.

Both setup paths automatically detect supported coding agents. Restart or refresh every detected coding agent after setup.

[!IMPORTANT] Trae only: setup installs the managed Skill and Global Hooks, but Trae requires its Global Hooks switch to be enabled manually. In Trae, open Settings → Hooks → Global → Configured Hooks and enable the registered hooks once. Then start a new Trae session and send one prompt. Run memorax-code status to confirm the Trae Hook runtime changes from unverified to observed. If a coding agent performs the installation, it should explicitly remind the user to complete this Trae-only UI step. Other supported coding agents do not require it.

Installation Troubleshooting

If the initial setup does not work as expected, check these common cases:

SymptomRecommended fix
Installation fails with an unsupported Node.js versionRun node --version and upgrade to Node.js 20 or later before reinstalling MemoraX Code.
The package installed but setup did not startThis is expected. Run the appropriate setup command above from a normal interactive terminal.
Windows reports that memorax-code or memorax-cli is not recognizedFollow the Windows PATH steps below. Both commands are installed by the same package; do not install a separate memorax-cli package.
Search, retrieval, or writeback is unavailable after setupRun memorax-code status and the platform memory command (memorax-cli.cmd status in Windows PowerShell, memorax-cli status on macOS and Linux), then follow the detailed troubleshooting guide.

Windows: memorax-code or memorax-cli Is Not Found

On Windows, a global npm installation places command shims in npm's global prefix (commonly %APPDATA%\npm). If that directory is missing from PATH, or a supported coding agent was started before Node.js or MemoraX Code was installed, it may report that memorax-cli is unavailable even though the package is installed. memorax-code and memorax-cli are both included in @memorax/memorax-code; no separate CLI installation is required.

Interactive setup automatically verifies npm's global command directory and, when needed, adds it to the current setup process and the Windows user PATH. If the current shell cannot start the bare memorax-code command, use npm's actual global prefix to bootstrap setup and verify the CLI in PowerShell:

$NpmGlobalBin = (npm prefix -g).Trim()
$env:Path = "$NpmGlobalBin;$env:Path"
& (Join-Path $NpmGlobalBin "memorax-code.cmd") setup
& (Join-Path $NpmGlobalBin "memorax-cli.cmd") status

In Windows PowerShell, use memorax-cli.cmd for all MemoraX memory commands, including status, search, and add. Do not invoke memorax-cli.ps1 or change PowerShell execution policy; restrictive policies may block npm's PowerShell shim even though the .cmd shim works normally.

The first two lines repair PATH for the current PowerShell process. If setup reports that it could not update the persistent Windows user PATH, add the global prefix once:

$NpmGlobalBin = (npm prefix -g).Trim()
$UserPath = [Environment]::GetEnvironmentVariable("Path", "User")
$UserEntries = @($UserPath -split ";" | Where-Object { $_ })
$NormalizedNpmGlobalBin = $NpmGlobalBin.TrimEnd("\")

if (-not ($UserEntries | Where-Object {
    $_.Trim().TrimEnd("\") -ieq $NormalizedNpmGlobalBin
})) {
    [Environment]::SetEnvironmentVariable(
        "Path",
        (($UserEntries + $NpmGlobalBin) -join ";"),
        "User"
    )
}

Open a new terminal after setup or the fallback changes the persistent PATH. Fully exit and restart an affected coding agent only if it was already running during installation or still cannot find memorax-cli; reinstalling the package is not required.

See Configuration for supported settings and Troubleshooting for detailed diagnostics.

Try Cross-Session Memory

Clone the example repository from the product website, then open Codex, Claude Code, WorkBuddy, DeepSeek Harness, OpenCode, or Trae in the project directory:

git clone https://github.com/SWE-agent/test-repo.git
cd test-repo

Invoke the Skill as $memorax-code in Codex or /memorax-code in Claude Code or DeepSeek Harness. In OpenCode, WorkBuddy, or Trae, ask the agent to use the memorax-code skill by name. The prompts below use its product name and work in all supported clients.

Send these prompts in order in the same session:

  1. Use the MemoraX Code skill to build Repo Memory, retrieving only the latest 3 issues, pull requests, and commits.
  2. Review the recent Repo Memory issue: the zeroth number was once calculated incorrectly. Avoid repeating the same problem now.
  3. Use the MemoraX Code skill to remember the engineering lesson from this coding task.

Close the current conversation, start a new session in the same repository, and send:

Use the MemoraX Code skill to recall the earlier engineering lesson and suggest what to check.

The agent should retrieve the saved lesson and use it to make suggestions for the current repository.

[!TIP] The prompts above are only for quick verification. In normal use, you do not need to invoke the MemoraX Code skill to add memory manually. It writes relevant memory in the background and guides agents to search when useful. Local activity and status are retained as content-controlled trace and reconciliation records under MEMORAX_CODE_HOME.

Four Clear Memory Boundaries

MemoryThe question it answersExamples
Coding MemoryWhat engineering lessons should carry into the next task?Verified fixes, failed approaches, design rationale, pitfalls, and regression checks
Repo MemoryWhat should an agent know about this repository?Architecture maps, module ownership, entry points, and commit/PR/MR/issue evidence
Personal MemoryHow should the agent communicate and collaborate with you?User Profile preferences such as language, tone, explanation depth, and result format
Procedure MemoryHow should this kind of task be carried out?Reusable steps, checklists, prerequisites, exceptions, and validation gates

Personal Memory and Procedure Memory stay in the current repository under .repo_memory/. When saved content already exists, MemoraX Code compares its meaning before writing: an equivalent request makes no change; a durable refinement or conflict updates the matching entry and removes the superseded wording; an invalid scope is corrected, or the entry is deleted only when it is wholly obsolete. An explicit forget request deletes only the named preference, procedure topic, section, or step and leaves unrelated memory unchanged. One-time task instructions do not change saved memory, and the Agent asks before writing when the durable intent or target is unclear.

Product Capabilities

CapabilityWhat it does
Background memory writebackExtracts reusable knowledge from completed turns and writes it to Coding Memory in the background.
Preference continuityRecords User Profile preferences and injects them into future tasks on a configured cadence.
Procedure reuseRecords reusable task procedures and reminds future agents to apply them.
Background Repo Memory maintenanceAutomatically organizes repository structure, entry points, and history evidence in supported headless-capable clients, then updates them according to policy to reduce repeated searching and summarization. Trae can use the Skill for Repo Memory, but does not currently expose a headless worker for automatic maintenance.
Active memory controlLets you search and add memory through the bundled MemoraX Code skill or the CLI.
Client integrationIntegrates with Codex, Claude Code, WorkBuddy, DeepSeek Harness, OpenCode, and Trae to trigger memory retrieval, reminders, and writeback. Automatic quota reminders are currently available in Codex, Claude Code, WorkBuddy, OpenCode, and Trae.
Local observabilityUses content-controlled local trace and reconciliation records to inspect activity counts, retrieval, and writeback status.

Your Memory, Your Control

MemoraX is required for cloud-backed memory. Completing setup activates MemoraX search/add and the generated configuration's automatic writeback; there is no second writeback confirmation. Automatic retrieval remains off until explicitly enabled.

Local trace capture is enabled by default for supported clients. Depending on client capabilities, retained traces under MEMORAX_CODE_HOME may contain prompts, responses, recalled memory, reminder text, and local paths. Use the local trace settings to switch to metadata-only capture or disable a client's trace.

Guest quota reminders may display the complete Mark ID. Treat reminder text and retained traces containing it as sensitive.

Active memory operations send their query or selected content to MemoraX. Automatic writeback sends selected user instructions and the matching final Agent response from trusted workspace turns for extraction and storage. It does not upload the complete retained client trace artifact or local trace path.

Sign in to MemoraX Console at any time to view, edit, or delete saved memories. MemoraX Cloud does not receive model-provider credentials or local Backend tokens.

Read Configuration for all settings and Security for network, local-data, and retention boundaries.

Update

For a global npm installation:

memorax-code update

A completed setup enables the managed Backend to schedule non-blocking update checks for as long as it remains running; the cadence does not depend on a new client session. Stable installations follow npm latest; prerelease installations follow preview. A successful check is reused for eight hours, while a failed check or reconciliation is retried after 15 minutes. When the published target changes, MemoraX Code installs that exact version and preserves every explicit true or false choice in [clients]. If the release adds support for a client whose key is absent from an older configuration and that client is detected locally, automatic reconciliation enables it by default. An explicit false remains disabled.

For Codex, update reconciliation verifies the current MemoraX Code marketplace identity and the exact new or changed Hook hashes, then trusts those Hooks silently. An identity change or failed Hook check fails closed instead of granting broader trust. The standalone memorax-code codex-plugin trust-hooks diagnostic command keeps its explicit review behavior.

Set MEMORAX_CODE_AUTO_UPDATE=false before starting or restarting the managed Backend to disable background checks. Client startup Hooks only ensure that the Backend is available; they do not own the update cadence. The manual command above remains available and follows the installed release channel while preserving configuration. Restart or refresh a client when a release changes integration assets that the running client has already loaded.

On Windows, the managed WorkBuddy plugin installs to %USERPROFILE%\.workbuddy by default. WORKBUDDY_HOME remains an explicit override. Its status remains hook-runtime=unverified until WorkBuddy executes the installed Hook at least once.

Windows Upgrade Note

If you are upgrading MemoraX Code v0.1.3-v0.1.6 to v0.1.7 on Windows, run:

memorax-code stop
memorax-code update --latest
memorax-code

This one-time step is not required for later upgrades.

Uninstall

Run the product lifecycle before removing the npm package:

memorax-code uninstall

This removes managed integrations and the global package while retaining MEMORAX_CODE_HOME (default ~/.memorax-code), Claude plugin data, provider configuration, and memories stored in MemoraX. Remove retained local or cloud data separately only after reviewing what you still need.

Documentation

Develop and Contribute

Issues and pull requests are welcome. Read CONTRIBUTING.md before making a change, and never include API keys, raw transcripts, private memory, or local trace artifacts in a public report.

License

MemoraX Code is available under the MIT License.

关于 About

A memory plugin for AI coding that turns engineering experience, repository knowledge, and your way of working into memory that remains useful in future tasks.
ai-agentsclaude-codecodexcoding-memorydeveloper-toolsmemoraxtypescript

语言 Languages

JavaScript74.9%
TypeScript19.4%
Python3.9%
Shell1.7%
Makefile0.1%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
366
Total Commits
峰值: 130次/周
Less
More

核心贡献者 Contributors