npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cmem-oper

v2.2.0

Published

CLI maintenance tool for claude-mem — view, search, and clean up Claude Code memory data directly from the terminal

Readme

cmem-oper(Claude Memory 运维工具)

claude-mem 插件的 CLI 运维工具 — 在终端中查看、搜索、删除 Claude Code 记忆数据。

cmem-oper 是一款事后管理工具,帮助你查看和删除 claude-mem 已经记录的对话数据。直接操作本地 SQLite 数据库,零外部依赖

如果你想要事前控制——阻止 claude-mem 记录某个对话——只需在提示词中任意位置加上 <private/> 标签即可。该标签会让 claude-mem 跳过整个会话。


快速开始

npx cmem-oper list

一行命令,无需安装。只要你有 Node.js 22+,即可直接运行。

安装方式

| 方式 | 命令 | |------|------| | npx(推荐) | npx cmem-oper <命令> | | npm 全局安装 | npm install -g cmem-oper | | 直接下载 | 下载 cmem-oper.mjs 后运行 ./cmem-oper.mjs <命令> |

命令参考

list — 浏览会话和条目

cmem-oper list [项目名] [--web] [--json]
cmem-oper list projects [--json]

| 变体 | 说明 | |------|------| | list | 按 SDK 会话分组显示最近会话 | | list --web | 逐条显示 prompt 和 observation(网页风格) | | list projects | 列出所有项目及统计信息 | | list <项目名> | 按项目名过滤 | | list --json | JSON 格式输出(便于管道处理) |

delete — 删除数据

cmem-oper delete <ID...> [--dry-run] [--force]
cmem-oper delete --project <项目名> [--dry-run] [--force]

ID 格式

| 格式 | 示例 | 作用范围 | |------|------|----------| | #<数字> | #39 | 删除单条 prompt 或 observation | | #<数字>p | #39p | 强制按 user_prompt 定位 | | #<数字>o | #42o | 强制按 observation 定位 | | 纯数字 | 19 | 删除整个 SDK 会话(DB 自增 ID) | | UUID | fb67951c-... | 删除整个 SDK 会话(content_session_id) |

使用示例

# 预览将要删除的内容(不实际执行)
cmem-oper delete #39 --dry-run

# 删除单条条目
cmem-oper delete #39

# 删除整个会话
cmem-oper delete 19

# 批量删除多个会话
cmem-oper delete 19 23 45

# 删除项目下的所有数据
cmem-oper delete --project 我的项目

delete-by-id — 旧版别名

cmem-oper delete-by-id <db-id> [--dry-run] [--force]

等同于 cmem-oper delete <数字>

help — 查看完整帮助

cmem-oper help

工作原理

直接读取 ~/.claude-mem/claude-mem.db 中的 SQLite 数据库。仅使用 Node.js 内置模块(node:sqlitenode:osnode:pathnode:readline)。

相关链接

开源协议

MIT