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

@rebirthnote/cli

v1.0.2

Published

RebirthNote CLI and MCP — local notes via command line and Model Context Protocol

Readme

@rebirthnote/cli

通过命令行操作 Rebirth 本地笔记库,并对外提供 MCP(Model Context Protocol),供 Cursor、Claude Code 等连接使用。

安装

npm i -g @rebirthnote/cli
rebirth info
rebirth mcp stdio

安装后可用:

  • rebirth — 完整 CLI(卡片、标签、空间、MCP 子命令等)
  • rebirth-mcp — 仅启动 MCP(stdio 或 HTTP),等价于 rebirth mcp stdio / rebirth mcp serve

数据库路径(rebirth.db)

CLI 和 MCP 都只连接 SQLite 文件 rebirth.db。按下面优先级决定用哪一个文件,先命中先用

| 优先级 | 方式 | 说明 | |--------|------|------| | 1 | --db-path | 写在命令最前面,见下文示例 | | 2 | 环境变量 REBIRTHNOTE_DB_PATH | 设为 rebirth.db 的绝对路径 | | 3 | ~/.rebirthnote-cli/config.json 里的 dbPath | 持久配置,见下文 | | 4 | 默认路径 | 与 Rebirth 桌面端数据目录一致 |

默认路径(未配置时)

| 系统 | 默认 rebirth.db 位置 | |------|------------------------| | macOS | ~/Library/Application Support/Rebirth/rebirth_database/rebirth.db | | Windows | %APPDATA%\Rebirth\rebirth_database\rebirth.db | | Linux | ~/.config/Rebirth/rebirth_database/rebirth.db |

临时指定(单次命令)

rebirth --db-path /path/to/rebirth.db info
rebirth --db-path /path/to/rebirth.db card search "关键词"

rebirth mcp stdio --db-path /path/to/rebirth.db
rebirth mcp serve --db-path /path/to/rebirth.db

rebirth-mcp --db-path /path/to/rebirth.db
rebirth-mcp serve --port 45137 --db-path /path/to/rebirth.db

环境变量

export REBIRTHNOTE_DB_PATH=/path/to/rebirth.db
rebirth info

在 MCP 配置里用 command 启动时,可在配置中增加 env,或把 --db-path 写进 args

配置文件(推荐长期使用)

  • 路径:~/.rebirthnote-cli/config.json
  • 示例:
{
  "dbPath": "/绝对路径/rebirth.db",
  "defaultSpaceId": "可选-空间-uuid"
}
  • dbPath:固定使用的数据库文件。
  • defaultSpaceId:见下一节「空间 ID」;也可只用命令设置,不必手写。

查看当前使用的数据库

rebirth info
rebirth --json info

MCP 与命令行

同一套规则:rebirth mcp stdiorebirth mcp serverebirth-mcp 都会按上述优先级找库。
stdio 由编辑器单独拉起进程时,必须在该进程的启动命令或环境里配置 --db-pathREBIRTHNOTE_DB_PATH,否则只用本机终端 export 不会作用到 MCP 子进程。


空间 ID(spaceId)

卡片、标签、搜索等操作都在某个空间下进行。spaceId 按下面优先级解析(与数据库路径独立,可和 --db-path 一起用)。

| 优先级 | 方式 | 说明 | |--------|------|------| | 1 | --space-id <uuid> | 全局选项,写在命令最前,仅本次进程有效 | | 2 | ~/.rebirthnote-cli/config.json 里的 defaultSpaceId | 持久默认,推荐用命令设置 | | 3 | 自动 | 使用当前数据库里第一个可用空间(按创建时间) |

未配置且库内没有任何空间时,会报错,需先在 RebirthNote 应用里创建空间。

用命令设置默认空间(推荐)

# 列出空间:每行 id,name(完整 UUID,可直接复制给 space use)
rebirth space list
rebirth space list --json

# 切换到指定空间并写入配置,之后 card/tag/search 等默认在该空间
rebirth space use <完整空间UUID>

# 查看当前解析到的空间
rebirth space current
rebirth --json space current

rebirth space use 会把 defaultSpaceId 写入 ~/.rebirthnote-cli/config.json,与手动编辑该文件效果相同。

临时指定(单次命令)

rebirth --space-id <uuid> card search "关键词"
rebirth --db-path /path/to/rebirth.db --space-id <uuid> tag list

rebirth mcp stdio --space-id <uuid>
rebirth-mcp --db-path /path/to/rebirth.db --space-id <uuid>

MCP 子进程若需固定空间,在配置的 args 里加上 --space-id <uuid> 即可。

配置文件

dbPath 同在 ~/.rebirthnote-cli/config.json

{
  "dbPath": "/可选/rebirth.db",
  "defaultSpaceId": "完整空间UUID"
}

只设空间、不设库时也可只写 defaultSpaceIdrebirth space use 会自动合并进现有配置。


MCP 简要用法

  • stdio(Claude Code 等)

    • rebirth mcp stdiorebirth-mcp
    • 生成配置示例:rebirth mcp config --claude-code
  • HTTP(Cursor 等)

    • 先执行:rebirth mcp serve(默认 http://127.0.0.1:45137/mcp
    • 生成配置示例:rebirth mcp config --cursor

更多工具列表与能力说明见随包附带的 AGENTS.md / skills/