Generated banner for XMemo: Memory OS for AI Agents
Generated logo for XMemo: Memory OS for AI Agents

XMemo: Memory OS for AI Agents

Memory serverOfficial XMemo project

Created by Yonro

Published in yonro/memory-os-cli. Publisher page

13 GitHub stars

What it is

Official XMemo client: CLI, MCP setup and stdio server for XMemo, the user-owned Memory OS for AI agents.
— the description by Yonro

AutoGineer overview, from the brain’s own files

XMemo is a memory operating layer designed to provide AI agents with persistent, governed, and portable memory. It enables agents to maintain session continuity, track project-scoped facts, and manage durable decisions across different AI tools. By acting as a unified control plane, XMemo allows users to manage memory configurations, agent behavior profiles, and skill installations through a consistent CLI. It supports multiple access surfaces, including the Model Context Protocol (MCP), a native REST API, and direct integrations with agent platforms like OpenClaw and Hermes, ensuring that memory remains user-owned and accessible across various AI environments.

How it works

Memory model: Not stated

AutoGineer overview, from the brain’s own files

The system functions as a memory server that connects AI clients to a persistent storage layer. Users interact with it primarily through the xmemo CLI, which handles authentication, diagnostics, and the installation of MCP servers or native plugins. The CLI uses a declarative registry to configure different AI clients, ensuring that memory settings are applied consistently. It supports both hosted Streamable HTTP MCP endpoints and local stdio MCP servers, allowing agents to read and write memory records, recall project context, and manage agent identity and provenance without embedding sensitive credentials directly into project files.

Folders
FolderRoleFiles
.githubagent-config7
binscripts2
docsdocs7
packagessource-code2
scriptsscripts7
skillsagent-instructions36
srcsource-code73
testtests61

Requirements

Runtimes: Node.js >=20.0.0

API keys (by name): MEMORY_OS_MCP_TOKEN, NPM_TOKEN, XMEMO_TOKEN

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: 4 scripts. Review README.md, skills/install.ps1, skills/install.sh before opening the folder in Claude Code. No step below turns a hook on for you.

    • README.md: # $env:XMEMO_SKILL_AGENT="claude-code"; irm https://xmemo.dev/skill/install.ps1 | iex
    • README.md: # $env:XMEMO_SKILL_AGENT="codex"; irm https://xmemo.dev/skill/install.ps1 | iex
    • skills/install.ps1: pwsh skills/install.ps1
    • skills/install.sh: sh skills/install.sh
  2. The author documents 2 ways to start XMemo. Choose one; AutoGineer does not pick a default.

  3. Option 1 of 2Add XMemo to .mcp.json:

    {
      "mcpServers": {
        "XMemo": {
          "type": "http",
          "url": "https://xmemo.dev/mcp"
        }
      }
    }
    
  4. Or add it with the Claude Code CLI:

    claude mcp add --transport http XMemo https://xmemo.dev/mcp
  5. Your data is sent to xmemo.dev.

  6. Option 2 of 2Add XMemo to .mcp.json:

    {
      "mcpServers": {
        "XMemo": {
          "command": "npx",
          "args": [
            "-y",
            "@xmemo/[email protected]",
            "xmemo-mcp"
          ]
        }
      }
    }
    
  7. Or add it with the Claude Code CLI:

    claude mcp add XMemo -- npx -y @xmemo/[email protected] xmemo-mcp
  8. AutoGineer scanned exactly what this command runs: @xmemo/[email protected], fetched by its integrity digest and pinned to the version AutoGineer scanned, with no third-party dependency.

  9. Add client to .mcp.json:

    {
      "mcpServers": {
        "client": {
          "command": "npx",
          "args": [
            "-y",
            "@xmemo/[email protected]"
          ]
        }
      }
    }
    
  10. Or add it with the Claude Code CLI:

    claude mcp add client -- npx -y @xmemo/[email protected]
  11. AutoGineer scanned exactly what this command runs: @xmemo/[email protected], fetched by its integrity digest and pinned to the version AutoGineer scanned, with no third-party dependency.

  12. The author documents 2 ways to start xmemo. Choose one; AutoGineer does not pick a default.

  13. Option 1 of 2Add xmemo to .mcp.json:

    {
      "mcpServers": {
        "xmemo": {
          "type": "http",
          "url": "https://xmemo.dev/mcp"
        }
      }
    }
    
  14. Or add it with the Claude Code CLI:

    claude mcp add --transport http xmemo https://xmemo.dev/mcp
  15. Your data is sent to xmemo.dev.

  16. Option 2 of 2Add xmemo to .mcp.json:

    {
      "mcpServers": {
        "xmemo": {
          "command": "npx",
          "args": [
            "-y",
            "@xmemo/[email protected]",
            "mcp",
            "serve"
          ],
          "env": {
            "XMEMO_KEY": "${XMEMO_KEY}",
            "XMEMO_URL": "${XMEMO_URL}"
          }
        }
      }
    }
    
  17. Or add it with the Claude Code CLI:

    claude mcp add xmemo -e XMEMO_KEY="${XMEMO_KEY}" -e XMEMO_URL="${XMEMO_URL}" -- npx -y @xmemo/[email protected] mcp serve
  18. AutoGineer scanned exactly what this command runs: @xmemo/[email protected], fetched by its integrity digest and pinned to the version AutoGineer scanned, with no third-party dependency.

  19. Created by Yonro. Published in yonro/memory-os-cli. Licence: MIT License.

Usage

AutoGineer overview, from the brain’s own files

  • Centralized management of AI agent memory configurations
  • Enabling persistent context across different AI agent sessions
  • Automating the setup of MCP servers for various AI tools
  • Tracking project-specific TODOs and decisions
  • Managing agent identity and provenance attribution
  • Installing and updating agent skills and behavior profiles
“xmemo setup cursor”
Configures the Cursor editor to use XMemo for persistent memory and behavior steering.
“xmemo skill install --client openclaw”
Installs the verified XMemo skill into the OpenClaw agent environment.
“xmemo mcp serve”
Starts the local stdio MCP server to provide memory tools to a connected AI agent.
“xmemo doctor”
Runs a diagnostic check to verify the health and configuration of the XMemo installation.

Documentation by Yonro

XMemo: Memory OS for AI Agents

Image: XMemo logo

Image: CI Image: npm version Image: Skill version Image: Node.js version Image: MIT license Image: MCP compatible Image: MCP Badge Image: Glama quality score

XMemo is a user-owned Memory OS for AI agents: persistent memory, project context and session continuity with agent identity, provenance and governed access, shared across AI clients through MCP, the CLI and a public REST API surface.

English · 简体中文 | Documentation · Hosted MCP

Quick start · What this repo contains · Beyond MCP · Integrations · Connection modes · Plugins · Commands · Versioning · Security


What this repository contains

  • @xmemo/client: the official xmemo CLI for setup, diagnostics, behavior profiles, and memory commands.

  • MCP distribution: hosted Streamable HTTP configuration (https://xmemo.dev/mcp) and the local xmemo-mcp stdio server.

  • XMemo Skill & native integrations: skills/xmemo for agent platforms and the native plugin index (src/plugins/index.json).

  • Marketplace and registry metadata: canonical descriptors for MCP Registry (server.json), LobeHub (lhm.plugin.json), and AI agents (context7.json).

The hosted service implementation is private.

Beyond MCP

MCP is one access surface of XMemo, not the product boundary. XMemo provides a persistent, governed memory operating layer across AI tools and agents:

Preview: Cloud Skills; Dream (off by default); Teams (Business plan not yet available). Knowledge Bases are available where enabled for the account.

XMemo CLI

@xmemo/client is the official control plane for connecting AI tools to XMemo. It makes setup repeatable, keeps credentials out of project files, and gives every supported client a consistent path to durable, user-owned memory.

The package is deliberately small: the CLI runtime, safe client configuration, behavior profiles, XMemo skills, and marketplace metadata. Server code, databases, deployment files, logs, and internal operations remain outside the npm distribution.

Architecture

Image: XMemo CLI architecture

Package@xmemo/client
Primary commandxmemo (alias: client)
Local MCP commandxmemo-mcp
Hosted MCPhttps://xmemo.dev/mcp
RuntimeNode.js 20 or later
LicenseMIT

Why XMemo CLI

  • One control plane — login, diagnostics, configuration, profiles, updates, and smoke checks share one predictable interface.

  • Private by design — generated project configuration references a credential; it never embeds the credential value.

  • Native where it matters — OpenClaw and Hermes use dedicated memory integrations instead of duplicating the same capability through MCP.

  • Portable everywhere else — hosted Streamable HTTP MCP and local stdio cover modern editors, terminals, and agent runtimes.

  • Safe automation — supported setup and removal paths offer preview, dry-run, or explicit confirmation before making changes.

  • Small supply-chain surface — the npm package is governed by an explicit file allowlist and release provenance.

Quick start

Guided onboarding (xmemo init)

For an interactive first-run experience across account authentication, detected clients, agent behavior instructions, MCP server setup, skills, and plugins, run:

npm install -g @xmemo/client
xmemo init

Flags and options:

  • xmemo init --dry-run: View the full onboarding plan without performing network calls or disk writes.

  • xmemo init --yes: Automatically accept and apply all onboarding steps without interactive prompts.

  • xmemo init --json: Emit structured JSON for the plan or result envelope.

  • xmemo init --client <id>...: Restrict onboarding to specific clients (e.g., cursor, codex, claude-code).

  • xmemo start: Alias for xmemo init with quick-start walkthrough steps.

Global installation exposes xmemo as the primary command, and also provides client and memory-os as aliases.

Manual step-by-step setup
xmemo account login
xmemo doctor
xmemo setup codex
xmemo status

Replace codex with your client. Preview a configuration before writing it:

xmemo setup cursor --dry-run
Running with npx

You can also run any CLI command directly without a global install via npx @xmemo/client <command>:

# Check version or health
npx @xmemo/client --version
npx @xmemo/client doctor

# Guided onboarding without global install
npx @xmemo/client init

# Install skill or run MCP stdio server
npx @xmemo/client skill install
npx @xmemo/client mcp serve

Image: XMemo CLI setup workflow

TIP
Start with xmemo init (or xmemo account login, xmemo doctor, and xmemo setup <client>). Hand-edit MCP configuration only when a client has no verified setup path.

How the commands fit together

The XMemo CLI architecture is built on four core design principles:

1. Unified Resource Grammar (xmemo <resource> <action>)

Every integration component is a first-class resource with predictable lifecycle actions:

ResourceScopeActionsExamples
mcpMCP server connection configurationinstall, remove, statusxmemo mcp install codex, xmemo mcp status
pluginHost-native extension packagesinstall, remove, status, list, infoxmemo plugin install gemini-cli, xmemo plugin list
skillAgent skill scripts & documentationinstall, remove, status, updatexmemo skill install --client openclaw
profileMarkdown behavior steering instructionsinstall, remove, status, showxmemo profile install cursor
  • Composite commands: xmemo setup [<client>...], xmemo uninstall [<client>...], and xmemo status [<client>] orchestrate these resources in a single step according to the client's declarative profile.

  • Backward-compatible aliases: Familiar commands such as xmemo mcp add (alias for mcp install), xmemo profile uninstall (alias for profile remove), and xmemo skill uninstall (alias for skill remove) remain fully functional and print a helpful one-line hint in interactive terminals.

2. Unified Target Resolver

When no client is explicitly passed, the CLI uses a deterministic three-tier precedence resolution model:

  1. Explicit flag or argument: --client <id>, positional client argument, or --all.

  2. Calling agent environment: Automatically identifies the calling agent runtime when running inside an agent session (e.g., CLAUDECODE / CLAUDE_CODE_ENTRYPOINT maps to claude-code, and CODEX_THREAD_ID / CODEX_SESSION_ID maps to codex).

  3. Detected installed clients: Inspects local configuration paths and markers. If exactly one matching client is found, it is automatically selected; if multiple clients are found in interactive mode, an interactive picker is presented. The CLI never silently writes configuration to arbitrary unverified paths.

3. Plan, Confirm Once, Apply (PlanRunner)

Mutating commands follow a strict, atomic execution pattern:

  1. Build Plan: Assemble an ordered sequence of actions across resources (e.g. plugin install followed by skill configuration).

  2. Preview: Print the entire plan (including modified paths, commands, and unified diffs) to the terminal.

  3. Confirm Once: Prompt [y/N] exactly once for the entire sequence. Re-running with --yes or -y bypasses the prompt; --dry-run displays the preview without mutation.

  4. Apply Sequentially: Steps run in dependency order, stopping immediately upon first failure. Re-running an already configured client detects that all components are up to date and reports Nothing to do.

4. Declarative Client Registry

All client configurations, recipes, and capabilities are declared centrally in src/clients/registry.js. Command implementations are purely generic orchestrators with zero hardcoded client ID strings. Platforms can also be added dynamically at runtime via registerClient().

Supported integrations

ClientRecommended commandConnection
Codexxmemo setup codexHosted MCP + behavior profile
Cursorxmemo setup cursorHosted MCP + Bearer Token + behavior profile
Copilot CLIxmemo setup copilotLocal authenticated proxy
Gemini CLIxmemo setup geminiHosted MCP + OAuth
Antigravityxmemo setup antigravityHosted MCP + OAuth
OpenClawxmemo setup openclawNative memory plugin + Skill
Hermesxmemo setup hermesNative memory provider
Kiroxmemo setup kiroNative HTTP OAuth; --auth key for API Key
Grokxmemo setup grokHosted MCP
Other MCP clientsxmemo mcp config --client genericGenerated template

The client registry also covers Devin Desktop (formerly Windsurf), Cline, Continue, Claude Desktop, Claude Code, Kimi Code, Muse Code, Zed, JetBrains, OpenCode, Qwen, Trae, and compatible MCP hosts. Run xmemo mcp list for the current machine-readable catalog.

For VS Code users looking for the dedicated editor extension, see the yonro/xmemo-vscode repository. For Cursor users looking for the dedicated plugin, see the yonro/xmemo-cursor-plugin repository. For Claude users looking for the dedicated plugin, see the yonro/xmemo-claude-plugin repository.

Connection modes

Hosted MCP

The recommended universal path is the XMemo Streamable HTTP endpoint:

https://xmemo.dev/mcp

OAuth-capable clients complete authentication in the browser. Other clients reference XMEMO_KEY without copying its value into repository files.

Generic configuration shape:

{
  "mcpServers": {
    "XMemo": {
      "type": "streamable-http",
      "url": "https://xmemo.dev/mcp",
      "headers": {
        "Authorization": "Bearer ${XMEMO_KEY}"
      }
    }
  }
}

Client configuration keys differ; prefer xmemo setup <client> over copying this generic example directly.

Local stdio MCP

xmemo-mcp is the dedicated stdio entry point for marketplaces and clients that launch a local process. Safe discovery exposes 20 tools, three prompts, and two documentation resources without a token. Tool execution still requires authentication.

After a global installation:

xmemo-mcp

Install-free MCP configuration:

{
  "mcpServers": {
    "XMemo": {
      "command": "npx",
      "args": [
        "-y",
        "--package",
        "@xmemo/client@latest",
        "xmemo-mcp"
      ]
    }
  }
}

xmemo mcp serve is equivalent when the CLI is already installed.

Native integrations

OpenClaw and Hermes have dedicated memory providers. Their default setup avoids installing a second, duplicate XMemo tool surface:

  • OpenClaw: installs the pinned plugin clawhub:@xmemo/[email protected] without --force by default. Re-running setup gracefully detects existing installations; use --force to reinstall or overwrite.

  • Hermes: installs the pinned provider package hermes-xmemo==1.1.3 via pip install without -U.

  • Every install command prints the exact command before executing. Use --dry-run to preview actions without installing.

# Native OpenClaw plugin (clawhub:@xmemo/[email protected]) + XMemo Skill
xmemo setup openclaw

# Native Hermes memory provider (hermes-xmemo==1.1.3)
xmemo setup hermes

Add hosted MCP only when an explicit fallback is desired:

xmemo setup openclaw --with-mcp
xmemo setup hermes --with-mcp

Use --mcp-only to skip the native integration and install only the hosted MCP fallback.

XMemo Skill install

The CLI installs the verified XMemo Skill locally into agent skill folders or a target directory:

  • Installs into client skill directories:

    • Claude Code: ~/.claude/skills/xmemo-memory (global) or .claude/skills/xmemo-memory (project with --project)

    • Codex: ~/.codex/skills/xmemo-memory

    • OpenClaw: ~/.openclaw/skills/xmemo-memory

    • All other 21 clients remain null until officially documented.

  • Defaults to the pinned @xmemo/[email protected] release from npm and verifies tarball integrity (sha512 SRI) before extraction.

  • Override version with --version <semver> or explicitly opt into the latest release via --version latest.

  • For air-gapped or offline installations, install from a local directory or packed tarball with --from <dir|tgz> (optional --integrity <sha512>).

  • Manage client skills with skill status, skill update, and skill remove.

  • Preview actions without writing files using --dry-run.

  • Safety & Consent:

    • Interactive install prompts [y/N] before writing (Enter, EOF, or empty input cancels) unless --yes is specified.

    • Existing installs refuse overwrite without --force; when --force is used, a backup is created in ~/.xmemo/backups/skills/<client>/ (outside the agent skills directory).

    • skill remove only removes verified XMemo skill directories, refusing foreign folders, and reports the preserved backup location.

# Install to agent skill folder (Claude Code global, Codex, or OpenClaw)
xmemo skill install --client claude-code
xmemo skill install --client codex
xmemo skill install --client openclaw

# Install OpenClaw skill globally (shared ~/.openclaw/skills)
xmemo skill install --client openclaw --global

# Install to project-level skill folder (Claude Code project: .claude/skills/xmemo-memory)
xmemo skill install --client claude-code --project

# Install for all detected supported clients
xmemo skill install --all

# Automatically resolve detected client(s) (or specify --client <id>)
xmemo skill install

# Install into a custom directory path
xmemo skill install --dir ./custom-skill-dir

# Non-interactive install (skips [y/N] prompt)
xmemo skill install --client codex --yes

# Replace existing installation (creates backup in ~/.xmemo/backups/skills/<client>/)
xmemo skill install --client codex --force --yes

# Update alias (equivalent to skill install --force)
xmemo skill update --client codex --yes

# Inspect installation status across clients
xmemo skill status
xmemo skill status --client codex
xmemo skill status --all --json

# Remove installed skill from an agent folder (refuses non-XMemo folders)
xmemo skill remove --client codex --yes
xmemo skill remove --client claude-code --project --yes

# Dry run preview
xmemo skill install --client codex --dry-run
Standalone curl & PowerShell installers

For environments without Node.js or @xmemo/client, XMemo provides standalone HTTPS installers at https://xmemo.dev/skill/install (POSIX sh) and https://xmemo.dev/skill/install.ps1 (PowerShell).

The installer is agent-aware and automatically resolves the correct target directory for your active agent:

# Claude Code: installs to ~/.claude/skills/xmemo-memory
curl -fsSL https://xmemo.dev/skill/install | XMEMO_SKILL_AGENT=claude-code sh

# Codex: installs to ${CODEX_HOME:-$HOME/.codex}/skills/xmemo-memory
curl -fsSL https://xmemo.dev/skill/install | XMEMO_SKILL_AGENT=codex sh

# OpenClaw: install via OpenClaw CLI
openclaw skills install @xmemo/xmemo --version 1.1.48

# Windows (PowerShell):
# $env:XMEMO_SKILL_AGENT="claude-code"; irm https://xmemo.dev/skill/install.ps1 | iex
# $env:XMEMO_SKILL_AGENT="codex"; irm https://xmemo.dev/skill/install.ps1 | iex

TIP
Prompt for your AI Agent (copy and paste directly into Claude Code, Codex, or another agent):

Install the standalone XMemo Skill into your skills directory: run the installer from https://xmemo.dev/skill/install (on Windows, https://xmemo.dev/skill/install.ps1) with XMEMO_SKILL_DIR set to your skills directory plus /xmemo-memory. Run the doctor command it prints to verify the installation, then reload your skills and follow the Skill's first-run steps. Follow your normal safety checks and do not use elevated privileges.

Target resolution precedence (first match wins):

  1. XMEMO_SKILL_DIR: Installs to the specified directory.

  2. XMEMO_SKILL_AGENT=claude-code|codex: Installs to the explicit agent's skills directory (openclaw redirects to openclaw skills install xmemo).

  3. Auto-detection: Automatically detects Claude Code (CLAUDECODE=1) or Codex (CODEX_THREAD_ID, CODEX_SESSION_ID, or CODEX_HOME).

  4. Home directory discovery: If only ~/.claude or only ~/.codex exists in HOME, selects that agent.

  5. Fallback: Installs to ./xmemo-skill with a warning on stderr explaining that AI agents will not automatically load the skill from this directory.

Safety & Replacement:

  • Refuses to overwrite existing installations unless XMEMO_SKILL_FORCE=1 is provided.

  • When replacing, moves the previous installation to ~/.xmemo/backups/skills/<agent>/<name>-<timestamp> (safely outside agent skill search paths).

  • After installation, prints the absolute install path, the verification doctor command (node <path>/scripts/xmemo-skill.mjs doctor --anonymous), and a prompt to reload your agent.

Agent plugins

The CLI provides a curated, static index of verified agent plugins shipped directly in @xmemo/client. Each entry contains a pinned version, release tag, and exact Git commit SHA resolved at release time.

ℹ️ Strict Separation Rule: xmemo plugin installs agent plugins only (e.g. @xmemo/openclaw-memory). Skills are installed exclusively via xmemo skill install (e.g. @xmemo/xmemo).

Plugin IDPlatform / AgentKindStatusIntegration
openclawOpenClawnative-cliStableopenclaw plugins install clawhub:@xmemo/[email protected] (auto-prompts update if already installed)
hermesHermes Agentnative-cliStablehermes plugins install xmemo (fallback: python -m pip install hermes-xmemo==1.1.3)
claude-codeClaude Codegit-dirPreviewPinned Git clone verified against commit 5d0d280 (defaults to ~/.xmemo/plugins/claude-code)
cursorCursormarketplacePreviewCursor Marketplace plugin
gemini-cliGemini CLInative-cliPreviewgemini extensions install https://github.com/yonro/xmemo-gemini-cli --ref 39e25b185b5157490d1683e4ca8c5c5fb1312a88
kiroKiromanualPreviewSteering rules & Power integration
vscodeVS CodemanualPreviewVS Code extension manual steps (pending marketplace publication)
deepseek-dshDeepSeek DSHnative-cliPreviewdsh plugin --profile <name> add dsh-xmemo (requires --profile)
chatgpt-codexChatGPT / CodexmarketplacePreviewChatGPT & Codex extension
cindyCindymanualPreviewNative agent memory integration
codexCodexmcpPreviewDedicated MCP configuration (xmemo setup codex)

Commands:

# List available plugins (excluding legacy entries)
xmemo plugin list

# Include legacy plugins
xmemo plugin list --all

# View plugin details and verification metadata
xmemo plugin info <id>

# Preview install plan without executing
xmemo plugin install <id> --dry-run

# Install with explicit confirmation (prompts [y/N] by default)
xmemo plugin install <id>

# Non-interactive install
xmemo plugin install <id> --yes

# Specify profile for deepseek-dsh
xmemo plugin install deepseek-dsh --profile default --yes

# Specify custom target directory for git-dir plugins
xmemo plugin install claude-code --yes --dir ~/.custom-plugins/claude-code

# Open plugin documentation or marketplace in browser
xmemo plugin install <id> --open

# Check installation status
xmemo plugin status [<id>]

Security & Consent:

  • Only verified plugin IDs from the static index are accepted; arbitrary URLs and unknown IDs are rejected with exit code 2.

  • Interactive install always displays the execution plan and requires explicit consent ([y/N], defaulting to Cancel on empty input or EOF).

  • --dry-run guarantees zero disk writes and zero spawned processes.

  • Marketplace and manual plugins display exact step-by-step instructions from the plugin repository during plugin install <id> (pass --open to open docs in browser).

  • Git directory plugins (claude-code) clone into a stable per-user location (~/.xmemo/plugins/<id>), support --dir <path> override, verify the checked-out HEAD commit byte-for-byte, and output the exact load command (claude --plugin-dir <dir>). On commit mismatch, the directory is immediately removed.

  • Plugin child processes run in an isolated environment with authentication tokens (XMEMO_KEY, MEMORY_OS_MCP_TOKEN, XMEMO_TOKEN) scrubbed from argv and env.

Account and authentication

Account commands

Manage local authentication, stored credentials, and tokens through the account command family:

# Browser device login
xmemo account login

# Check active authentication state
xmemo account status

# Optional remote verification
xmemo account status --verify

# Check or store token credentials
xmemo account token status
printf '%s\n' 'your-token' | xmemo account token add --from-stdin --allow-plaintext

# Logout: remove locally stored XMemo credentials owned by the CLI
xmemo account logout

# Non-interactive logout
xmemo account logout --yes
Safe account logout (xmemo account logout)
  • Target removal: Removes only the user-scoped credential file owned by the CLI (~/.config/xmemo/credentials.json or OS config root).

  • Explicit confirmation: Displays the target credential path and prompts Proceed with logout? [y/N] (defaulting to No) unless --yes is specified.

  • Client & Agent Isolation: Preserves all client MCP configuration files (Cursor, Claude, VS Code, etc.) and agent-managed OAuth sessions.

  • Privacy: Never displays or leaks token values in stdout, stderr, or JSON envelopes.

  • Scripting: Requires --yes when --json is specified to prevent accidental headless logout.

Legacy authentication aliases

The legacy commands remain fully supported as backward-compatible aliases:

  • xmemo login (alias for xmemo account login)

  • xmemo auth status (alias for xmemo account status)

  • xmemo auth-status (alias for xmemo account status)

  • xmemo token <status|add|set> (alias for xmemo account token <status|add|set>)

In interactive human mode, legacy aliases emit a one-line deprecation hint to stderr. When run with --json or --help, the deprecation hint is suppressed.

Existing token import

Pipe an existing token through stdin so it does not appear in command history:

printf '%s\n' 'your-token' | xmemo account token add --from-stdin --allow-plaintext
xmemo account token status --verify

PowerShell:

$xmemoToken = Read-Host "XMemo token"
$xmemoToken | xmemo account token add --from-stdin --allow-plaintext
Remove-Variable xmemoToken

For CI and managed workstations, expose XMEMO_KEY through the platform's secret manager. Do not commit it to .env, MCP configuration, logs, issue reports, or chat transcripts.

Universal --json output

Every command and subcommand supports --json for predictable scripting:

  • On success: Outputs valid JSON on stdout with exit code 0.

  • On error: Outputs a structured JSON error envelope { schemaVersion, ok: false, command, data: null, error: { code, message, ... } } on stdout with a non-zero exit code (e.g. exit code 2 for usage/input errors, 1 for internal/network errors).

Command reference

<details> <summary><strong>1. Get started</strong></summary>

xmemo init [--client <id>...] [--yes] [--dry-run] [--json]

# Backward-compatible alias
xmemo start [--json]

</details>

<details> <summary><strong>2. Connect agents</strong></summary>

# High-level client configuration
xmemo setup <client> [--url <url>] [--no-profile] [--json] [--force]
xmemo setup <client> --dry-run
xmemo setup --all [--write] [--profile] [--force]

# Direct MCP server configuration
xmemo mcp serve
xmemo mcp list
xmemo mcp config --client <client-id> [--base-url <url>] [--json]
xmemo mcp add <client-id> [--write] [--config <path>]
xmemo mcp proxy [--port 8765] [--base-url <url>]

# Workspace behavior profiles
xmemo profile install <client-id> [--target <path>] [--dry-run]
xmemo profile show <client-id> [--target <path>] [--json]
xmemo profile status <client-id> [--target <path>] [--json]
xmemo profile uninstall <client-id> [--target <path>] [--yes]

</details>

<details> <summary><strong>3. Skill</strong></summary>

# Install verified pinned skill into agent skill folders
xmemo skill install [--client <id>|--all] [--project] [--dir <path>] [--dry-run] [--yes] [--force] [--json]

# Inspect installation status across clients
xmemo skill status [--client <id>|--all] [--json]

# Remove installed skill from an agent folder (refuses non-XMemo folders)
xmemo skill remove --client <id> [--project] [--yes] [--json]

# Update skill installation (creates backup in ~/.xmemo/backups/skills/<client>/)
xmemo skill update [--client <id>|--all] [--yes] [--json]

</details>

<details> <summary><strong>4. Plugins</strong></summary>

xmemo plugin list [--all] [--json]
xmemo plugin info <id> [--json]
xmemo plugin install <id> [--dry-run] [--yes] [--open] [--dir <path>] [--json]
xmemo plugin status [<id>] [--all] [--json]

</details>

<details> <summary><strong>5. Memory</strong></summary>

xmemo memory add --content "Remember this" --path notes/example --json
xmemo memory search "example" --json
xmemo memory read <id> --json
xmemo memory list [--path-prefix <prefix>] [--project <name>] [--query <text>] [--type <type>] [--all] [--limit <n>] [--offset <n>] --json
xmemo memory delete <id> [--reason <text>] [--yes] --json
xmemo memory restore <id> [--yes] --json
xmemo memory import --file memories.jsonl [--dry-run] [--idempotency-key <key>] [--yes] --json
xmemo memory ledger-delete --id <transaction-uuid> --yes --json
xmemo context recall "resume this task" --include-knowledge --json
xmemo state save --current-task "ship the client" --next-action "run tests" --json
xmemo state restore --json
xmemo restart snapshot --json
xmemo restart restore --snapshot-id <snapshot-id> --json

xmemo knowledge add --base <base-id> --file ./guide.pdf --title "Guide" --json
xmemo knowledge search "setup" --base <base-id> --json
xmemo knowledge read <item-id> --json > knowledge-view.json
xmemo knowledge update <item-id> --text "Updated" --from knowledge-view.json --publish --yes --json

xmemo dream preview --wait --json
xmemo dream show <run-id> --json > dream-view.json
xmemo dream apply <run-id> --item <candidate-id> --from dream-view.json --yes --json

xmemo cloud-skill list --json
xmemo cloud-skill add --file ./SKILL.md --json
xmemo cloud-skill show <skill-id> --json > skill-view.json
xmemo cloud-skill update <skill-id> --from skill-view.json --file ./SKILL.md --json
xmemo cloud-skill run <skill-id> --input ./args.json --from skill-view.json --yes --json

All direct service commands support a single machine-readable JSON envelope. Knowledge update, Dream apply, and Cloud Skill run use the readReceipt from a saved read/show result so the CLI never silently substitutes a newer revision. Set XMEMO_KNOWLEDGE_BASE_ID for a non-interactive default knowledge base. For a long knowledge item, continue the same fixed revision with xmemo knowledge read <item-id> --from knowledge-view.json --offset <n>. Run xmemo doctor --services --json for read-only Knowledge, Dream, and Cloud Skill diagnostics; it deliberately does not claim write or production readiness.

Cloud Skill add/update already target the safe create-only and content-CAS contracts. They fail with SERVER_CONTRACT_REQUIRED on older services and do not fall back to legacy upsert routes. Binary Knowledge item updates similarly require a new version of the same server Document; use --document and --document-version after that version has been uploaded.

The normal login scopes remain unchanged. Request additional service scopes explicitly when needed, for example:

xmemo login --scopes memory:read,memory:write,memory:restore,knowledge:read,knowledge:write

</details>

<details> <summary><strong>6. Account</strong></summary>

xmemo account login [--base-url <url>] [--allow-plaintext] [--json]
xmemo account logout [--yes] [--json]
xmemo account status [--verify] [--base-url <url>] [--json]
xmemo account token status [--verify] [--json]
xmemo account token add --from-stdin --allow-plaintext [--json]
xmemo account token set --from-stdin [--allow-plaintext] [--json]

# Backward-compatible aliases (emit one-line deprecation note on stderr in human mode)
xmemo login
xmemo auth status
xmemo auth-status
xmemo token status
xmemo token add --from-stdin --allow-plaintext

</details>

<details> <summary><strong>7. Maintenance</strong></summary>

# Diagnostics and environment validation
xmemo doctor [--services [memory,dream,knowledge,cloud-skill]] [--base-url <url>] [--json]
xmemo doctor --discovery [--base-url <url>] [--json]
xmemo doctor --client <client-id> [--config <path>] [--smoke] [--auth oauth|key] [--fix] [--json]

# Probes, updates, and environment
xmemo status [--url <url>] [--json]
xmemo update [--dry-run] [--json]
xmemo env [--example] [--shell bash|powershell|cmd] [--json]
xmemo privacy [--json]
xmemo --version [--json]

# Safe removal (only XMemo-owned entries and profiles are removed)
xmemo uninstall <client> --dry-run
xmemo uninstall <client> --yes
xmemo uninstall --all --dry-run
xmemo uninstall --all --yes --profiles

# Backward-compatible aliases (emit one-line deprecation note on stderr in human mode)
xmemo smoke --client codex
xmemo discovery show

</details>

Run xmemo help or xmemo <command> --help for complete, version-matched options.

Client notes

<details> <summary><strong>Codex and Cursor</strong></summary>

xmemo setup codex
xmemo doctor --client codex --smoke

xmemo setup cursor

Both setup paths write a user-scoped MCP entry and can install a marker-scoped memory behavior profile. Use --no-profile to configure MCP only. Cursor's public marketplace plugin remains OAuth-first and contains no bearer-token configuration.

</details>

<details> <summary><strong>Gemini CLI and Antigravity</strong></summary>

xmemo setup gemini
xmemo setup antigravity

These clients use hosted MCP OAuth. Their generated configuration carries no token value; restart the client and complete the browser login on first use.

</details>

<details> <summary><strong>OpenClaw</strong></summary>

xmemo login
xmemo setup openclaw
openclaw xmemo status

The setup command installs or updates @xmemo/openclaw-memory, installs the XMemo Skill, reuses the shared XMemo credential, and checks plugin status.

</details>

<details> <summary><strong>Hermes</strong></summary>

xmemo login
xmemo setup hermes

The setup command installs or updates hermes-xmemo, configures the native provider, and synchronizes the user-scoped XMemo credential with Hermes.

</details>

<details> <summary><strong>Copilot CLI</strong></summary>

xmemo login
xmemo setup copilot
xmemo mcp proxy

Copilot CLI receives a local proxy entry. The proxy reads the credential from user-scoped storage, adds identity metadata, and forwards requests to hosted MCP without writing secrets into Copilot configuration.

</details>

Security by default

ControlDefault behavior
TelemetryNo CLI analytics or usage telemetry
Credential outputToken values are never printed
Project filesGenerated configuration references secrets; it does not embed them
Discoverydoctor, discovery show, and public capability discovery send no token
IdentityOne stable, non-secret agent-instance ID is stored outside git
WritesSetup supports preview/dry-run; broad removal requires confirmation
Local credential storageInteractive login asks first; non-interactive writes require --allow-plaintext; stored tokens are unencrypted
Package contentsAn npm files allowlist excludes tests, operations, logs, and server code

Credential precedence and compatibility aliases are documented by:

xmemo env example --shell bash
xmemo privacy

For private or self-hosted deployments, set XMEMO_URL or pass --url <service-url>. MEMORY_OS_URL remains a compatibility alias.

Package boundary

Published to npm:

bin/
docs/assets/
src/
README.md
LICENSE

Not published:

.github/
docs/analysis/
docs/architecture/
docs/design/
test/
coverage/
server code
database migrations
deployment files
logs and local state

Development

npm install
npm run release:check
npm run lint
npm test
npm run pack:dry-run

Before proposing a release, run the complete package gate:

npm run prepublishOnly

The local stdio server can be inspected directly:

node bin/mcp-stdio.js

Versioning

This repository distributes two independent products with decoupled version tracks:

  • CLI (@xmemo/client): Published to npm.

    • Version source: package.json.

    • Tag convention: cli-v* (legacy tags through version 0.4.181 used v0.4.xxx).

    • View versions on npm (@xmemo/client).

  • Skill (xmemo): Published to ClawHub and distributed via xmemo.dev.

    • Version source: skills/xmemo/scripts/xmemo-skill.mjs (SKILL_VERSION).

    • Tag convention: skill-v*.

    • View versions on ClawHub (xmemo). GitHub Releases for skill releases explicitly carry the Latest release badge to support automated installer and server fallback downloads.

Release model

Normal releases are produced by GitHub Actions from the exact tagged commit, not from a mutable branch checkout or a developer workstation:

develop → CLI version sync → test → cli-v tag → GitHub Actions → npm publish --provenance

The CLI package and hosted MCP service intentionally have separate version streams:

  • CLI/npm version: package.json, package-lock.json, and the npm package entry in server.json.

  • Hosted MCP/Registry version: the top-level server.json.version and lhm.plugin.json. This version follows the deployed XMemo service.

node scripts/check-release-version.mjs verifies both contracts. A cli-vX.Y.Z tag must equal the CLI/npm version and publishes only npm. The MCP Registry is published separately with the Publish MCP Registry metadata workflow using mcp-vX.Y.Z, which must equal the hosted MCP/Registry version. The separate npm publish workflow is manual recovery only, so creating a GitHub Release cannot publish twice. CLI npm publishing uses OIDC trusted publishing (environment: npm, id-token: write); static NPM_TOKEN is no longer used. Manual recovery via .github/workflows/publish.yml requires its own trusted publisher entry on npmjs.com.

Documentation and support

Canonical service documentation lives at docs.xmemo.dev. This repository documents the client; the pages below document the hosted service it connects to.

Quickstartdocs.xmemo.dev/docs/quickstart
MCP overview and per-client setupdocs.xmemo.dev/docs/mcp/overview
Tool reference (remember, recall, search, …)docs.xmemo.dev/docs/tools/remember
REST APIdocs.xmemo.dev/docs/api/authentication
Troubleshootingdocs.xmemo.dev/docs/troubleshooting
Machine-readable indexxmemo.dev/llms.txt

License

MIT © 2025–2026 Yonro

README_CN.md

XMemo: Memory OS for AI Agents

Image: XMemo logo

Image: CI Image: npm version Image: Skill version Image: Node.js version Image: MIT license Image: MCP compatible Image: MCP Badge Image: Glama quality score

XMemo 是专为 AI 智能体打造的用户私有记忆操作系统(User-owned Memory OS):提供跨会话持久记忆、项目上下文与工作状态连续性,具备智能体身份归属、数据溯源与细粒度访问治理,通过 MCP、CLI 以及公开 REST API 接口供各类 AI 客户端共享。

English · 简体中文 | 完整文档 · 托管版 MCP

快速开始 · 本仓库包含内容 · 超越-mcp · 集成列表 · 连接模式 · 插件系统 · 命令大全 · 版本说明 · 安全与隐私


本仓库包含内容

  • @xmemo/client:官方 xmemo CLI 工具,提供初始化配置、环境诊断、智能体行为规范与记忆交互命令。

  • MCP 分发:托管版 Streamable HTTP 配置(https://xmemo.dev/mcp)与本地 xmemo-mcp stdio 服务端。

  • XMemo Skill 与原生集成:面向智能体平台的 skills/xmemo 技能包与原生插件索引(src/plugins/index.json)。

  • 市场与注册表元数据:MCP Registry(server.json)、LobeHub(lhm.plugin.json)与上下文规则(context7.json)的规范化描述符。

XMemo 云端托管服务的具体实现属于私有代码库,不在此公开分发。

超越 MCP

MCP 是 XMemo 的一种接入界面,而非产品的边界。XMemo 在多种工具与运行时之间提供持久、可跨智能体共享的核心能力:

预览功能:云端技能 (Cloud Skills);Dream 记忆整理(默认关闭);团队空间 (Teams)(商业版计划尚未推出)。知识库 (Knowledge Bases) 在账户开通时可用。

XMemo CLI

@xmemo/client 是将各类 AI 工具连接到 XMemo 的官方控制面。它让配置具备可重现性,防止敏感凭据硬编码进项目文件,并为所有受支持的客户端提供统一、持久且用户私有的记忆接入路径。

本 npm 包体积极其精简:仅包含 CLI 运行时、安全的客户端配置生成器、行为规范配置(Profiles)、XMemo Skill 以及市场分发元数据。服务端代码、数据库、部署脚本、运行时日志和内部运维模块均排除在 npm 分发包之外。

架构概览

Image: XMemo CLI 架构图

NPM 包名@xmemo/client
主命令xmemo(别名:client)
本地 MCP 命令xmemo-mcp
托管版 MCPhttps://xmemo.dev/mcp
运行环境Node.js 20 或更高版本
开源协议MIT

为什么选择 XMemo CLI

  • 统一控制面 — 登录、诊断、配置、Profile 管理、更新与冒烟测试均共享一致且直观的操作界面。

  • 默认注重隐私 — 生成的项目配置仅引用凭据名称(如环境变量),绝不会明文内嵌凭据密钥。

  • 关键场景原生接入 — OpenClaw 与 Hermes 采用专有记忆提供者插件,避免通过 MCP 带来冗余工具层。

  • 通用环境便携连接 — 托管 Streamable HTTP MCP 与本地 stdio 模式覆盖主流现代编辑器、终端与自主智能体运行时。

  • 安全自动化机制 — 支持的配置与卸载命令均提供预览(preview)、预检(dry-run)或二次确认。

  • 精简的供应链表面 — npm 发行包受严格的文件白名单与发布溯源(provenance)管控。

快速开始

引导式初次运行 (xmemo init)

首次使用时,推荐直接运行交互式向导,统一完成账号登录、客户端检测、智能体行为指令配置、MCP 服务器配置、Skill 安装以及各平台插件安装:

npm install -g @xmemo/client
xmemo init

常用选项:

  • xmemo init --dry-run: 仅生成并展示完整的初始化计划,不发出外部网络请求也不写入任何磁盘文件。

  • xmemo init --yes: 自动确认并执行所有建议步骤(无需每次单独交互确认)。

  • xmemo init --json: 输出机器可读的结构化 JSON 格式计划或执行结果信封。

  • xmemo init --client <id>...: 仅对指定的客户端进行检测与配置(如 cursor、codex、claude-code)。

  • xmemo start: xmemo init 的等价别名,结尾包含快速上手指导。

全局安装后主要使用 xmemo 命令,同时也提供 client 与 memory-os 作为等价别名。

分步手动配置
xmemo account login
xmemo doctor
xmemo setup codex
xmemo status

将 codex 替换为你正在使用的客户端。在实际写入配置前可先通过预览检查变更:

xmemo setup cursor --dry-run
使用 npx 即时执行

无需全局安装,亦可直接使用 npx @xmemo/client <command> 执行任意 CLI 命令:

# 查看版本或执行健康检查
npx @xmemo/client --version
npx @xmemo/client doctor

# 即时启动引导向导
npx @xmemo/client init

# 安装 Skill 或启动 MCP stdio 服务
npx @xmemo/client skill install
npx @xmemo/client mcp serve

Image: XMemo CLI 配置工作流

TIP
推荐的标准接入方式为运行 xmemo init(或按 xmemo account login → xmemo doctor → xmemo setup <client> 分步执行)。 仅在客户端暂无官方自动化适配方案时,才建议手动修改 MCP 配置文件。

命令模型与架构设计

XMemo CLI 采用一致性与健壮性导向的四层核心架构设计:

1. 统一资源语法 (xmemo <resource> <action>)

每个集成组件均作为一等公民资源管理,具有直观一致的生命周期操作:

资源类别说明可用操作命令示例
mcpMCP 服务器连接配置install, remove, statusxmemo mcp install codex, xmemo mcp status
plugin智能体宿主原生扩展插件install, remove, status, list, infoxmemo plugin install gemini-cli, xmemo plugin list
skill智能体技能脚本与操作指引install, remove, status, updatexmemo skill install --client openclaw
profileMarkdown 格式智能体行为约束规范install, remove, status, showxmemo profile install cursor
  • 组合编排命令:xmemo setup [<client>...]、xmemo uninstall [<client>...] 与 xmemo status [<client>] 会根据各客户端的声明式能力配置,一键组合编排上述底层资源。

  • 向后兼容别名:旧习惯命令如 xmemo mcp add(指向 mcp install)、xmemo profile uninstall(指向 profile remove)、xmemo skill uninstall(指向 skill remove)完全保留,并在交互式终端模式下输出友好的一行 stderr 引导提示。

2. 统一目标解析器 (Target Resolver)

在未显式传递客户端参数时,CLI 按严格的三级优先级自动解析目标:

  1. 显式参数:--client <id>、位置参数或 --all。

  2. 调用智能体环境探测:在智能体工作流执行环境中自动识别(如 CLAUDECODE / CLAUDE_CODE_ENTRYPOINT 对应 claude-code,CODEX_THREAD_ID / CODEX_SESSION_ID 对应 codex)。

  3. 本地安装检测:扫描本地配置文件与标记路径。若检测到恰好 1 个受支持客户端则自动选定;若检测到多个则在交互模式下提供选单。CLI 绝不会静默向未经验证的任意路径写入配置。

3. 规划、单次确认、按序执行 (PlanRunner)

变更操作遵循确定性的原子规划执行引擎:

  1. 生成执行计划:跨资源按序组装操作步骤(例如先安装插件后部署技能)。

  2. 预览计划:在终端打印完整执行步骤(包含变更文件路径、执行命令及 Unified Diff)。

  3. 单次确认:全流程仅提示一次 [y/N] 确认;支持 --yes 免交互应用与 --dry-run 预览试跑。

  4. 顺序执行与幂等保障:按依赖顺序应用各个步骤,遇到首个错误立即停止。对已配置完成的客户端重复执行会自动检测已是最新状态并提示 Nothing to do。

4. 声明式客户端注册表

所有 25 个客户端的配置结构、安装配方与能力均集中声明于 src/clients/registry.js。命令业务层完全通用化,零客户端 ID 硬编码。支持通过 registerClient() 在运行时动态扩展新平台支持。

支持的客户端集成

客户端推荐配置命令连接方式
Codexxmemo setup codex托管 MCP + 行为规范 Profile
Cursorxmemo setup cursor托管 MCP + Bearer Token + 行为规范 Profile
Copilot CLIxmemo setup copilot本地认证代理 (Local authenticated proxy)
Gemini CLIxmemo setup gemini托管 MCP + OAuth
Antigravityxmemo setup antigravity托管 MCP + OAuth
OpenClawxmemo setup openclaw原生记忆插件 + 配套 Skill
Hermesxmemo setup hermes原生记忆提供者
Kiroxmemo setup kiro原生 HTTP OAuth;--auth key 切换为 API Key
Grokxmemo setup grok托管 MCP
其他 MCP 客户端xmemo mcp config --client generic通用配置模板生成

客户端注册表同时还支持 Devin Desktop (formerly Windsurf)、Cline、Continue、Claude Desktop、Claude Code、Kimi Code、Muse Code、Zed、JetBrains、OpenCode、Qwen、Trae 等众多兼容 MCP 宿主。运行 xmemo mcp list 可获取当前完整的机器可读目录。

VS Code 用户如需专用编辑器扩展插件,请参阅 yonro/xmemo-vscode 仓库。 Cursor 用户如需专用编辑器插件,请参阅 yonro/xmemo-cursor-plugin 仓库。 Claude 用户如需专用插件,请参阅 yonro/xmemo-claude-plugin 仓库。

连接模式

托管版 MCP

推荐且通用的接入方式是使用 XMemo Streamable HTTP 端点:

https://xmemo.dev/mcp

具备 OAuth 能力的客户端可在浏览器中直接完成认证。其他客户端引用环境变量 XMEMO_KEY,无需将密钥复制到代码仓库文件中。

通用配置结构示例:

{
  "mcpServers": {
    "XMemo": {
      "type": "streamable-http",
      "url": "https://xmemo.dev/mcp",
      "headers": {
        "Authorization": "Bearer ${XMEMO_KEY}"
      }
    }
  }
}

各客户端配置文件的层级与键名有所不同;优先建议使用 xmemo setup <client> 命令进行自动注入。

本地 stdio MCP

xmemo-mcp 是专为插件市场和需要拉起本地子进程的宿主准备的 stdio 入口。即使未输入 Token,安全的轻量探测也会公开 20 个工具、3 个提示词(prompts)与 2 个文档资源(resources)。但工具的实际执行必须进行身份认证。

全局安装后直接调用:

xmemo-mcp

免全局安装的 npx 配置示例:

{
  "mcpServers": {
    "XMemo": {
      "command": "npx",
      "args": [
        "-y",
        "--package",
        "@xmemo/client@latest",
        "xmemo-mcp"
      ]
    }
  }
}

CLI 全局安装后,xmemo mcp serve 效果与上述相同。

原生集成模式

OpenClaw 和 Hermes 拥有定制的原生记忆提供者插件。默认配置会自动避开创建重复的 MCP 工具外挂层:

  • OpenClaw: 默认安装版本锁定的插件 clawhub:@xmemo/[email protected],不携带 --force 参数。重复执行时会自动检测已安装状态;如需重新安装或覆盖,请显式传入 --force。

  • Hermes: 默认通过 pip install 安装版本锁定的提供者包 hermes-xmemo==1.1.3,不携带 -U 参数。

  • 所有安装命令在执行前都会打印出确切运行的命令与包规约;使用 --dry-run 预览将要执行的操作而不实际运行。

# 原生 OpenClaw 插件 (clawhub:@xmemo/[email protected]) + XMemo Skill
xmemo setup openclaw

# 原生 Hermes 记忆提供者 (hermes-xmemo==1.1.3)
xmemo setup hermes

仅在确需备用回退路径时,才添加托管 MCP:

xmemo setup openclaw --with-mcp
xmemo setup hermes --with-mcp

传入 --mcp-only 则跳过原生插件安装,仅配置托管 MCP。

XMemo Skill 本地安装

CLI 支持将经过官方完整性校验的 XMemo Skill 安装至各智能体专属技能目录或指定目录:

  • 支持安装至客户端技能目录:

    • Claude Code: ~/.claude/skills/xmemo-memory (全局) 或 .claude/skills/xmemo-memory (传入 --project 时基于项目目录)

    • Codex: ~/.codex/skills/xmemo-memory

    • OpenClaw: ~/.openclaw/skills/xmemo-memory

    • 其余 21 款客户端在官方文档明确前均设为 null

  • 默认安装 npm 上锁定的 @xmemo/[email protected] 版本,并在解压前严格校验 tarball 完整性哈希(sha512 SRI)。

  • 可通过 --version <semver> 指定特定版本,或显式传入 --version latest 获取最新版本。

  • 在离线或内网隔离环境中,可通过 --from <dir|tgz> 从本地目录或打好的 tarball 进行离线安装(支持 --integrity <sha512>)。

  • 支持通过 skill status 查看安装状态,通过 skill update 快捷更新,通过 skill remove 干净移除。

  • 传入 --dry-run 预览安装计划而不写入任何文件。

  • 安全与授权保障:

    • 交互模式下默认展示写入目标并提示 [y/N](回车、EOF 或空输入默认取消),除非显式指定 --yes。

    • 目标目录已存在时默认拒绝覆盖;指定 --force 覆盖前会自动在 ~/.xmemo/backups/skills/<client>/ 保留备份(独立于智能体技能目录,避免重复加载)。

    • skill remove 仅允许删除经过校验的 XMemo Skill 目录,严禁误删其他外部目录,并提示已保留的备份路径。

# 安装至智能体技能目录 (Claude Code 全局、Codex 或 OpenClaw)
xmemo skill install --client claude-code
xmemo skill install --client codex
xmemo skill install --client openclaw

# 全局安装 OpenClaw 技能(共享至 ~/.openclaw/skills)
xmemo skill install --client openclaw --global

# 安装至项目级技能目录 (Claude Code: .claude/skills/xmemo-memory)
xmemo skill install --client claude-code --project

# 一键为所有已检测到的受支持智能体安装
xmemo skill install --all

# 自动解析检测到的受支持智能体并安装(或通过 --client <id> 指定)
xmemo skill install

# 安装至指定的自定义目录
xmemo skill install --dir ./custom-skill-dir

# 非交互式直接执行(跳过 [y/N] 确认提示)
xmemo skill install --client codex --yes

# 覆盖已有安装(自动在 ~/.xmemo/backups/skills/<client>/ 创建备份)
xmemo skill install --client codex --force --yes

# 快捷更新别名(等价于 skill install --force)
xmemo skill update --client codex --yes

# 查看各客户端技能安装状态与版本
xmemo skill status
xmemo skill status --client codex
xmemo skill status --all --json

# 安全卸载移除技能(拒绝删除非 XMemo 目录)
xmemo skill remove --client codex --yes
xmemo skill remove --client claude-code --project --yes

# Dry run 预览
xmemo skill install --client codex --dry-run
独立 curl 与 PowerShell 安装脚本

对于尚未安装 Node.js 或 @xmemo/client 的轻量运行环境,XMemo 提供了开箱即用的独立 HTTPS 安装脚本:https://xmemo.dev/skill/install (POSIX sh) 与 https://xmemo.dev/skill/install.ps1 (PowerShell)。

安装脚本具备智能体感知能力,能够自动根据调用环境将技能安装到对应智能体的目录中:

# Claude Code: 安装至 ~/.claude/skills/xmemo-memory
curl -fsSL https://xmemo.dev/skill/install | XMEMO_SKILL_AGENT=claude-code sh

# Codex: 安装至 ${CODEX_HOME:-$HOME/.codex}/skills/xmemo-memory
curl -fsSL https://xmemo.dev/skill/install | XMEMO_SKILL_AGENT=codex sh

# OpenClaw: 建议通过 OpenClaw 官方 CLI 安装
openclaw skills install @xmemo/xmemo --version 1.1.48

# Windows (PowerShell):
# $env:XMEMO_SKILL_AGENT="claude-code"; irm https://xmemo.dev/skill/install.ps1 | iex
# $env:XMEMO_SKILL_AGENT="codex"; irm https://xmemo.dev/skill/install.ps1 | iex

TIP
面向 AI 智能体的安装 Prompt(可直接复制并发送给 Claude Code、Codex 或其他智能体):

请将独立版 XMemo Skill 安装到你的 skills 目录:从 https://xmemo.dev/skill/install(Windows 下为 https://xmemo.dev/skill/install.ps1)运行安装程序,并将 XMEMO_SKILL_DIR 设置为你的 skills 目录加上 /xmemo-memory。运行其输出的 doctor 命令验证安装,然后重新加载你的 skills 并按照 Skill 的首次运行步骤操作。请遵守常规安全检查,不要使用提升权限。

目标解析优先级(命中首项生效):

  1. XMEMO_SKILL_DIR:安装至指定的显式目录。

  2. XMEMO_SKILL_AGENT=claude-code|codex:显式指定智能体安装目标(openclaw 会输出指引并提示运行 openclaw skills install xmemo)。

  3. 环境自动感知:自动检测当前会话环境环境变量(Claude Code: CLAUDECODE=1;Codex: CODEX_THREAD_ID、CODEX_SESSION_ID 或 CODEX_HOME)。

  4. 单智能体目录推断:若 HOME 目录下仅存在 ~/.claude 或仅存在 ~/.codex,则自动安装至对应智能体。

  5. 安全兜底:安装至当前目录 ./xmemo-skill,并在标准错误流输出告警,提醒用户智能体不会从任意工作区自动载入该技能。

安全覆盖与备份机制:

  • 目标目录已存在时默认拒绝覆盖,除非传入 XMEMO_SKILL_FORCE=1。

  • 覆盖安装时,旧目录会自动移动至 ~/.xmemo/backups/skills/<agent>/<name>-<timestamp> 进行归档备份(严禁备份在智能体技能搜索目录内,避免被误载)。

  • 安装完成后自动输出绝对安装路径、健康诊断命令 (node <path>/scripts/xmemo-skill.mjs doctor --anonymous) 以及重启智能体的生效提示。

智能体插件

CLI 随 @xmemo/client 内置了经过官方验证的静态插件索引,每个插件条目均明确固定了发布版本、Release Tag 以及发布时刻解析的准确 Git Commit SHA。

ℹ️ 严格职责分离原则:xmemo plugin 仅安装智能体插件(例如 @xmemo/openclaw-memory)。技能仅由 xmemo skill install 负责安装(例如 @xmemo/xmemo)。

插件 ID平台 / 智能体类型 (Kind)状态安装方式
openclawOpenClawnative-cliStableopenclaw plugins install clawhub:@xmemo/[email protected] (已安装时自动引导 update 更新)
hermesHermes Agentnative-cliStablehermes plugins install xmemo (兜底: python -m pip install hermes-xmemo==1.1.3)
claude-codeClaude Codegit-dirPreviewPinned Git clone 校验 commit 5d0d280 (默认安装至 ~/.xmemo/plugins/claude-code)
cursorCursormarketplacePreviewCursor 插件市场安装
gemini-cliGemini CLInative-cliPreviewgemini extensions install https://github.com/yonro/xmemo-gemini-cli --ref 39e25b185b5157490d1683e4ca8c5c5fb1312a88
kiroKiromanualPreviewSteering 规则与 Power 配置
vscodeVS CodemanualPreviewVS Code 手动安装指引(等待市场上架)
deepseek-dshDeepSeek DSHnative-cliPreviewdsh plugin --profile <name> add dsh-xmemo (必须指定 --profile)
chatgpt-codexChatGPT / CodexmarketplacePreviewChatGPT & Codex 扩展
cindyCindymanualPreview原生智能体记忆接入
codexCodexmcpPreview专属 MCP 配置 (xmemo setup codex)

插件命令:

# 列出可用插件(默认隐藏 legacy 归档插件)
xmemo plugin list

# 包含已归档的历史插件
xmemo plugin list --all

# 查看插件详情与验证元数据
xmemo plugin info <id>

# 预览安装计划(不执行任何操作)
xmemo plugin install <id> --dry-run

# 交互式确认安装(默认提示 [y/N],回车或中断默认取消)
xmemo plugin install <id>

# 免交互确认直接安装
xmemo plugin install <id> --yes

# 为 deepseek-dsh 指定目标 Profile
xmemo plugin install deepseek-dsh --profile default --yes

# 指定自定义目录安装 git-dir 插件
xmemo plugin install claude-code --yes --dir ~/.custom-plugins/claude-code

# 在浏览器中打开插件主页或文档
xmemo plugin install <id> --open

# 检查各插件安装状态
xmemo plugin status [<id>]

安全与授权原则:

  • 仅接受静态索引中登记的插件 ID;坚决拒绝任意外部 URL 或未经验证的插件名称(返回非零退出码 2)。

  • 交互式安装默认打印执行计划并要求用户显式确认([y/N],空输入、回车或 EOF 均默认为取消)。

  • --dry-run 承诺不产生任何文件写入或子进程调用。

  • 市场与手动插件在执行 plugin install <id> 时展示来自上游仓库的精确分步操作指南(支持 --open 浏览器直达)。

  • Git 目录插件(claude-code)默认安装至稳定用户目录(~/.xmemo/plugins/<id>),支持 --dir <path> 自定义目录覆盖;克隆后必须通过 git rev-parse HEAD 逐字节比对 Commit SHA,验证通过后打印确切的加载命令(claude --plugin-dir <dir>);若哈希不匹配,立即安全删除克隆目录并报错中止。

  • 任何由 CLI 启动的外部插件子进程,均严格过滤并移除敏感凭据环境变量(XMEMO_KEY、MEMORY_OS_MCP_TOKEN、XMEMO_TOKEN),防止凭据外泄。

账号与身份认证

账号命令族(account)

通过 account 统一管理本地认证状态、凭据文件与令牌:

# 浏览器设备授权登录
xmemo account login

# 检查当前登录与认证状态
xmemo account status

# 远程验证凭据可用性
xmemo account status --verify

# 检查或配置 Token 凭据
xmemo account token status
printf '%s\n' 'your-token' | xmemo account token add --from-stdin --allow-plaintext

# 退出登录:移除 CLI 本地存储的 XMemo 凭据
xmemo account logout

# 非交互式安全退出
xmemo account logout --yes
安全退出登录机制(xmemo account logout)
  • 精准清理: 仅删除 CLI 所有的用户级凭据文件(~/.config/xmemo/credentials.json 或 OS 配置目录)。

  • 确认保护: 优先打印将要删除的文件路径,交互模式下提示 Proceed with logout? [y/N](默认取消),除非附带 --yes。

  • 环境隔离: 绝不改动任何客户端 MCP 配置文件(Cursor、Claude、VS Code 等)及智能体托管的 OAuth 会话。

  • 隐私保护: 任何模式下绝不输出 Token 明文。

  • 自动化支持: 在 --json 模式下强制要求 --yes,防止无人值守脚本误触发。

历史兼容别名

原有的认证命令作为向后兼容别名继续保留:

  • xmemo login(等价于 xmemo account login)

  • xmemo auth status(等价于 xmemo account status)

  • xmemo auth-status(等价于 xmemo account status)

  • xmemo token <status|add|set>(等价于 xmemo account token <status|add|set>)

在人类交互终端下,别名会在 stderr 打印一行弃用提示。使用 --json 或 --help 时会自动静默。

注入已有 Token

通过标准输入(stdin)传入现有 Token,避免留下 Shell 历史命令记录:

printf '%s\n' 'your-token' | xmemo account token add --from-stdin --allow-plaintext
xmemo account token status --verify

PowerShell 交互方式:

$xmemoToken = Read-Host "XMemo token"
$xmemoToken | xmemo account token add --from-stdin --allow-plaintext
Remove-Variable xmemoToken

在 CI 自动化与受管工作站中,请通过系统的 Secret Manager 注入 XMEMO_KEY。切勿将其提交至 .env、MCP 配置文件、日志、Issue 或聊天上下文中。

全局统一 --json 支持

所有命令与子命令均原生支持 --json 输出:

  • 执行成功:在 stdout 输出符合标准的 JSON 数据,退出码为 0。

  • 执行失败:在 stdout 输出结构化错误信封 { schemaVersion, ok: false, command, data: null, error: { code, message, ... } },退出码为非 0(如参数或用法错误为 2,网络或内部错误为 1)。

命令参考

<details> <summary><strong>1. 快速上手</strong></summary>

xmemo init [--client <id>...] [--yes] [--dry-run] [--json]

# 兼容别名
xmemo start [--json]

</details>

<details> <summary><strong>2. 连接智能体</strong></summary>

# 高层智能体配置
xmemo setup <client> [--url <url>] [--no-profile] [--json] [--force]
xmemo setup <client> --dry-run
xmemo setup --all [--write] [--profile] [--force]

# 底层 MCP 协议配置
xmemo mcp serve
xmemo mcp list
xmemo mcp config --client <client-id> [--base-url <url>] [--json]
xmemo mcp add <client-id> [--write] [--config <path>]
xmemo mcp proxy [--port 8765] [--base-url <url>]

# 工作区行为规范 Profiles
xmemo profile install <client-id> [--target <path>] [--dry-run]
xmemo profile show <client-id> [--target <path>] [--json]
xmemo profile status <client-id> [--target <path>] [--json]
xmemo profile uninstall <client-id> [--target <path>] [--yes]

</details>

<details> <summary><strong>3. Skill 管理</strong></summary>

# 将经过校验与哈希锁定的 Skill 安装至智能体目录
xmemo skill install [--client <id>|--all] [--project] [--dir <path>] [--dry-run] [--yes] [--force] [--json]

# 检查各客户端 Skill 安装状态与版本
xmemo skill status [--client <id>|--all] [--json]

# 安全移除已安装的 Skill 目录(拒绝移除无关外部目录)
xmemo skill remove --client <id> [--project] [--yes] [--json]

# 覆盖更新 Skill(自动在 ~/.xmemo/backups/skills/<client>/ 创建备份)
xmemo skill update [--client <id>|--all] [--yes] [--json]

</details>

<details> <summary><strong>4. 插件中心</strong></summary>

xmemo plugin list [--all] [--json]
xmemo plugin info <id> [--json]
xmemo plugin install <id> [--dry-run] [--yes] [--open] [--dir <path>] [--json]
xmemo plugin status [<id>] [--all] [--json]

</details>

<details> <summary><strong>5. 记忆与云服务</strong></summary>

xmemo memory add --content "Remember this" --path notes/example --json
xmemo memory search "example" --json
xmemo memory read <id> --json
xmemo memory list [--path-prefix <prefix>] [--project <name>] [--query <text>] [--type <type>] [--all] [--limit <n>] [--offset <n>] --json
xmemo memory delete <id> [--reason <text>] [--yes] --json
xmemo memory restore <id> [--yes] --json
xmemo memory import --file memories.jsonl [--dry-run] [--idempotency-key <key>] [--yes] --json
xmemo memory ledger-delete --id <transaction-uuid> --yes --json
xmemo context recall "resume this task" --include-knowledge --json
xmemo state save --current-task "ship the client" --next-action "run tests" --json
xmemo state restore --json
xmemo restart snapshot --json
xmemo restart restore --snapshot-id <snapshot-id> --json

xmemo knowledge add --base <base-id> --file ./guide.pdf --title "Guide" --json
xmemo knowledge search "setup" --base <base-id> --json
xmemo knowledge read <item-id> --json > knowledge-view.json
xmemo knowledge update <item-id> --text "Updated" --from knowledge-view.json --publish --yes --json

xmemo dream preview --wait --json
xmemo dream show <run-id> --json > dream-view.json
xmemo dream apply <run-id> --item <candidate-id> --from dream-view.json --yes --json

xmemo cloud-skill list --json
xmemo cloud-skill add --file ./SKILL.md --json
xmemo cloud-skill show <skill-id> --json > skill-view.json
xmemo cloud-skill update <skill-id> --from skill-view.json --file ./SKILL.md --json
xmemo cloud-skill run <skill-id> --input ./args.json --from skill-view.json --yes --json

所有直连云端服务的命令均支持统一的机器可读 JSON 输出封装。知识库更新、Dream 记忆整合应用以及 Cloud Skill 执行均采用 readReceipt 进行乐观锁防冲突,确保 CLI 绝不会静默覆盖新版本。可通过设置 XMEMO_KNOWLEDGE_BASE_ID 指定非交互默认知识库。如需对长篇知识库条目进行分页读取,可使用 xmemo knowledge read <item-id> --from knowledge-view.json --offset <n>。使用 xmemo doctor --services --json 可只读诊断知识库、Dream 与 Cloud Skill 状态。

登录时如需扩展权限作用域,可显式声明,例如:

xmemo login --scopes memory:read,memory:write,memory:restore,knowledge:read,knowledge:write

</details>

<details> <summary><strong>6. 账号与认证</strong></summary>

xmemo account login [--base-url <url>] [--allow-plaintext] [--json]
xmemo account logout [--yes] [--json]
xmemo account status [--verify] [--base-url <url>] [--json]
xmemo account token status [--verify] [--json]
xmemo account token add --from-stdin --allow-plaintext [--json]
xmemo account token set --from-stdin [--allow-plaintext] [--json]

# 兼容别名(交互模式下在 stderr 输出一行弃用提示)
xmemo login
xmemo auth status
xmemo auth-status
xmemo token status
xmemo token add --from-stdin --allow-plaintext

</details>

<details> <summary><strong>7. 系统维护与诊断</strong></summary>

# 运行环境检查与 MCP 深度校验
xmemo doctor [--services [memory,dream,knowledge,cloud-skill]] [--base-url <url>] [--json]
xmemo doctor --discovery [--base-url <url>] [--json]
xmemo doctor --client <client-id> [--config <path>] [--smoke] [--auth oauth|key] [--fix] [--json]

# 服务端探针、CLI 更新与环境变量
xmemo status [--url <url>] [--json]
xmemo update [--dry-run] [--json]
xmemo env [--example] [--shell bash|powershell|cmd] [--json]
xmemo privacy [--json]
xmemo --version [--json]

# 安全卸载(仅清理 XMemo 自有配置项与 Profile)
xmemo uninstall <client> --dry-run
xmemo uninstall <client> --yes
xmemo uninstall --all --dry-run
xmemo uninstall --all --yes --profiles

# 兼容别名(交互模式下在 stderr 输出一行弃用提示)
xmemo smoke --client codex
xmemo discovery show

</details>

运行 xmemo help 或 xmemo <command> --help 可获取版本匹配的完整参数选项。

常用客户端集成说明

<details> <summary><strong>Codex 与 Cursor</strong></summary>

xmemo setup codex
xmemo doctor --client codex --smoke

xmemo setup cursor

两者均写入用户级的 MCP 配置,并可选择安装特定标记的记忆行为规范 Profile。传入 --no-profile 可只配 MCP。Cursor 官方插件市场版本优先使用 OAuth,不包含 Bearer Token 配置。

</details>

<details> <summary><strong>Gemini CLI 与 Antigravity</strong></summary>

xmemo setup gemini
xmemo setup antigravity

这些客户端采用托管 MCP OAuth。生成的配置中不包含任何 Token 明文;重启客户端并在首次触发工具调用时完成浏览器授权即可。

</details>

<details> <summary><strong>OpenClaw</strong></summary>

xmemo login
xmemo setup openclaw
openclaw xmemo status

该命令会自动安装/更新 @xmemo/openclaw-memory 插件,安装配套 XMemo Skill,复用本地 XMemo 凭据,并验证插件连通性。

</details>

<details> <summary><strong>Hermes</strong></summary>

xmemo login
xmemo setup hermes

该命令会自动安装/更新 hermes-xmemo,配置原生记忆提供者,并将用户级 XMemo 凭据同步至 Hermes。

</details>

<details> <summary><strong>Copilot CLI</strong></summary>

xmemo login
xmemo setup copilot
xmemo mcp proxy

Copilot CLI 会被配置为连接本地安全代理。代理从受保护存储中读取凭据、附加身份元数据,并将请求转发至托管 MCP,无需在 Copilot 配置中硬编码密钥。

</details>

默认安全隐私原则

安全控制项默认行为
遥测监控绝无任何用户埋点、CLI 使用情况收集或分析上报
凭据输出终端与日志中绝不打印 Token 明文
项目文件生成的配置仅引用环境变量等凭据源,不内嵌密钥
服务发现doctor、discovery show 与公开能力发现绝不附带用户 Token
设备身份本地生成唯一且非敏感的实例 ID,存储于 git 仓库之外
写入安全setup 支持 preview/dry-run;大范围卸载强制二次确认
本地凭据存储交互式登录明确征求用户同意;非交互写入需 --allow-plaintext;存储文件受系统级所有者权限保护
发布包边界npm files 白名单严格排除测试文件、运维脚本、日志与服务端源码

凭据优先级与兼容别名可通过以下命令查看:

xmemo env example --shell bash
xmemo privacy

对于私有化或自建部署服务,设置环境变量 XMEMO_URL 或在命令行传入 --url <service-url>。MEMORY_OS_URL 作为向后兼容别名保留。

发布包边界

发布至 npm 的内容:

bin/
docs/assets/
src/
README.md
README_CN.md
LICENSE

严格排除在 npm 之外的内容:

.github/
docs/analysis/
docs/architecture/
docs/design/
test/
coverage/
服务端代码 (Server code)
数据库迁移文件 (Database migrations)
部署脚本 (Deployment files)
日志与本地状态文件 (Logs & local state)

本地开发与测试

npm install
npm run release:check
npm run lint
npm test
npm run pack:dry-run

在发起版本发布 PR 之前,执行完整的门禁检查:

npm run prepublishOnly

本地 stdio 服务可直接启动调试:

node bin/mcp-stdio.js

版本说明

本仓库包含两个独立发布的产品,各自维护独立演进的版本线与标签规则:

  • CLI 工具(@xmemo/client):发布到 npm。

    • 当前版本:由根目录 package.json 维护。

    • Git Tag 规则:cli-v*(历史版本截至 0.4.181 使用 v0.4.xxx)。

    • 可在 npm (@xmemo/client) 查看版本与变更。

  • Skill 智能体技能(xmemo):发布到 ClawHub 并由 xmemo.dev 分发。

    • 当前版本:由 skills/xmemo/scripts/xmemo-skill.mjs 中的 SKILL_VERSION 维护。

    • Git Tag 规则:skill-v*。

    • 可在 ClawHub (xmemo) 查看版本与安装方式。Skill 版本的 GitHub Release 会显式标记为 Latest,以确保服务端与安装脚本的下载回退正常运作。

发布流水线模型

正式版本均由 GitHub Actions 在打上 tag 的特定提交上直接构建发布,绝不依赖可变分支或开发者个人工作区:

develop → CLI 版本同步 → 测试门禁 → cli-v 标签 → GitHub Actions → npm publish --provenance

CLI 工具包与托管 MCP 服务保持独立的版本管理轨道:

  • CLI/npm 版本:由 package.json、package-lock.json 与 server.json 中的 npm 条目定义。

  • 托管 MCP/Registry 版本:由顶级 server.json.version 与 lhm.plugin.json 维护,随已部署的 XMemo 云服务演进。

node scripts/check-release-version.mjs 负责同时校验两套版本契约。打上 cli-vX.Y.Z 标签仅发布 npm 包;MCP Registry 则由独立的 Publish MCP Registry metadata 工作流通过 mcp-vX.Y.Z 触发发布。CLI npm 发布使用 OIDC 可信发布(environment: npm,id-token: write),不再使用静态 NPM_TOKEN。手动恢复工作流(.github/workflows/publish.yml)需在 npmjs.com 配置独立的可信发布条目。

文档与技术支持

权威官方文档请访问 docs.xmemo.dev。本仓库聚焦于客户端本身,云服务相关指南可参考:

快速起步docs.xmemo.dev/docs/quickstart
MCP 概览与各客户端指南docs.xmemo.dev/docs/mcp/overview
工具规范 (remember, recall, search, …)docs.xmemo.dev/docs/tools/remember
REST API 文档docs.xmemo.dev/docs/api/authentication
常见问题排查docs.xmemo.dev/docs/troubleshooting
AI 可读索引xmemo.dev/llms.txt

开源协议

MIT © 2025–2026 Yonro

217 files · 205 not served here

Advantages

  • Provides a unified control plane for managing memory across diverse AI clients and platforms. evidence: README.md
  • Ensures privacy by keeping credentials out of project files through a secure configuration reference model. evidence: README.md
  • Supports multiple connection modes including hosted MCP, local stdio, and native integrations for specific agents. evidence: README.md

Limitations

  • The underlying hosted service implementation is private and not part of the open-source repository. evidence: README.md
  • Native integration maturity varies by platform, with some features currently in preview. evidence: README.md

Security

Risk level: Medium risk

This brain runs

MCP servers (2)

  • README.md (XMemo): https://xmemo.dev/mcp · uses the network
  • README.md (XMemo): npx -y --package @xmemo/client@latest xmemo-mcp

Install scripts (4)

  • README.md: # $env:XMEMO_SKILL_AGENT="claude-code"; irm https://xmemo.dev/skill/install.ps1 | iex · uses the network
  • README.md: # $env:XMEMO_SKILL_AGENT="codex"; irm https://xmemo.dev/skill/install.ps1 | iex · uses the network
  • skills/install.ps1: pwsh skills/install.ps1
  • skills/install.sh: sh skills/install.sh · uses the network

Agent instructions that run or fetch something (12)

  • skills/xmemo/SKILL.md: For standalone examples below, run the command and arguments as `node scripts/xmemo-skill.mjs <command> [options]` from the Skill directory.
  • skills/xmemo/SKILL.md: After ClawHub installs this Skill, follow First-run sign-in below:
  • skills/xmemo/SKILL.md: On explicit user consent (yes): run `node scripts/xmemo-skill.mjs login --allow-plaintext` directly so output is visible while the command is waiting (for example a background task or streaming shell).
  • skills/xmemo/SKILL.md: When login succeeds: run `node scripts/xmemo-skill.mjs auth status --verify`, tell the user in one line that XMemo is connected and that recall can offer setup assistance, run `node scripts/xmemo-skill.mjs profile --status later --if-unset` to record this preference, and continue the original task.
  • skills/xmemo/SKILL.md: run `profile --status never` to disable them and stop counting.
  • skills/xmemo/SKILL.md: The standalone runtime needs a shell to run Node.js, network access to the configured XMemo service, and credentials from `XMEMO_KEY`, a supported managed store, or the consent-gated local credential file.
  • skills/xmemo/SKILL.md: | Command | Purpose | Details | |:---|:---|:---| | `remember` | Save memory (text/stdin/file) | [Details][cmd] | | `recall` | Recall memories by query | [Details][mem] | | `search` | Keyword memory search | [Details][mem] | | `read` | Read memory or document by ID | [Details][cmd] | | …[+2483 chars]
  • skills/xmemo/SKILL.md: [cmd]: references/command-details.md [mem]: references/memory-operations.md [run]: references/runtime-operations.md [auth]: references/auth-setup.md [led]: references/ledger-operations.md [trn]: references/troubleshooting.md
  • skills/xmemo/SKILL.md: When a command fails with "No XMemo credential found" (exit code 2) and no `XMEMO_KEY` or secret store is configured, follow First-run sign-in above.
  • skills/xmemo/SKILL.md: Read [references/auth-setup.md](references/auth-setup.md) before running auth, login, register, or logout (`--revoke-environment-token`) commands other than first-run login.
  • skills/xmemo/SKILL.md: | Code | Meaning | Next action | |:---:|:---|:---| | `0` | Success (operation succeeded, empty state, `--help`, `--version`) | Proceed with next task | | `1` | Invalid input (validation failure, missing `--confirm`, HTTP 4xx) | Check parameters or resource ID | | `2` | Missing, expired …[+220 chars]
  • skills/xmemo/SKILL.md: When a command returns exit code 2 with "No XMemo credential found", follow First Successful Run above.
  • Medium risk: runs-mcp-server-unpinned-runner (README.md:241)
  • Medium risk: runs-install-script-remote-exec (README.md:365)
  • Medium risk: runs-install-script-remote-exec (README.md:366)
  • Medium risk: runs-install-script-network-variable-host (skills/install.sh)
  • Medium risk: network-variable-host (skills/install.sh:97)
  • Low risk: scripts-present (skills/install.ps1)
  • Low risk: scripts-present (skills/install.sh)

AutoGineer scanned @xmemo/[email protected] (sha512-RuiGtD6maj+mz977XsJ8uCDCIBr/spe+qEsnBKZhWioOPsBn30Z0PEirnGeA8P82swgKOst4879CIcC6Yn0QwQ==).

AutoGineer scanned @xmemo/[email protected] (sha512-RuiGtD6maj+mz977XsJ8uCDCIBr/spe+qEsnBKZhWioOPsBn30Z0PEirnGeA8P82swgKOst4879CIcC6Yn0QwQ==).

Attribution and licence

Created by
Yonro
Publisher
XMemo (Official XMemo project)
Source
yonro/memory-os-cli · commit 09b1438
Licence
MIT License (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Yonro or XMemo.

Install from source

205 of its files are not served here, so there is no ZIP. yonro/memory-os-cli at 09b1438