微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📓

Git 原生纯文本笔记库

Nb · v1.0.0
productivity 安全 S 级 作者 bjesuiter 公开目录收录
下载 2.9k 安装 1 收藏 8.1k 浏览 34
原始页面

简介

纯文本 CLI 笔记工具,Git 版本控制,支持多笔记本、书签、待办,适合技术用户本地知识管理。

原始描述

Manage notes, bookmarks, and notebooks using the nb CLI. Create, list, search, and organize notes across multiple notebooks with Git-backed versioning.

中文使用说明 来自收录源

核心用法

nb 是一个命令行笔记管理工具,该 Skill 为其提供完整的使用文档。核心功能包括:

  • 多笔记本管理:通过 nb notebooks 创建和切换笔记本,支持 ideas/projects/reads/references 等分类
  • 笔记操作:nb add 创建笔记(支持标题、标签、内容),nb list 列表查看,nb show 详情展示,nb edit/delete 编辑删除
  • 高级搜索:nb search 支持跨笔记本搜索,可组合 AND/OR/NOT 条件,支持按标签筛选
  • 任务管理:nb todo 创建待办事项,支持截止日期、完成状态切换
  • 书签归档:nb bookmark 保存网页链接,支持评论和标签
  • Git 集成:所有操作自动 Git 提交,nb sync 同步远程,nb git 执行任意 Git 命令

显著优点

  1. 纯文本存储:笔记以 Markdown 格式保存在 ~/.nb/,可移植、易版本控制
  2. Git 原生支持:内置版本管理,数据安全可追溯,支持多设备同步
  3. 无厂商锁定:开源工具,数据完全本地存储,随时可迁移
  4. Wiki 风格链接:支持笔记间相互引用,构建知识网络
  5. 轻量高效:命令行操作,适合程序员和技术写作者的工作流

潜在局限

  1. 学习曲线:需熟悉命令行和 Git 概念,非技术用户上手门槛较高
  2. 无图形界面:纯 CLI 工具,虽支持本地 Web 服务但功能有限
  3. 移动端缺失:无官方 App,手机端需配合 Git 客户端使用
  4. 协作局限:Git 协作对普通用户不够友好,实时协作能力弱
  5. 依赖外部工具:实际功能依赖用户本地安装的 nb CLI,Skill 本身仅为文档

适合人群

  • 程序员、DevOps 工程师等技术从业者
  • 偏好命令行工作流的知识管理者
  • 需要版本控制笔记的写作者和研究者
  • 开源工具倡导者,重视数据所有权

常规风险

  1. 数据安全:笔记存储于本地 ~/.nb/ 目录,需用户自行备份,磁盘损坏可能丢失数据
  2. Git 操作风险:直接编辑 .nb/* 文件会破坏索引,必须使用 CLI 操作
  3. 同步冲突:多设备同步时可能产生 Git 冲突,需手动解决
  4. 误删除风险:nb delete -f 强制删除无二次确认,不可逆
  5. CLI 版本差异:不同 nb 版本命令可能有差异,建议锁定版本

安全评估

该 Skill 为纯 Markdown 文档(T-MD 类型),无可执行代码、无外部 API、无敏感信息泄露,安全等级 S 级,可放心使用。但用户需注意 nb CLI 本身需从官方渠道安装。

技能正文


name: nb description: Manage notes, bookmarks, and notebooks using the nb CLI. Create, list, search, and organize notes across multiple notebooks with Git-backed versioning. metadata: clawdbot: emoji: "📓" os: ["darwin", "linux"] requires: bins: ["nb"]

nb - Command Line Note-Taking

⚠️ IMPORTANT: Never edit files in nb git repos (~/.nb/*) by hand! Always use the nb CLI to ensure proper indexing and Git commits.

A command line and local web note-taking, bookmarking, and archiving tool with plain text data storage, Git-backed versioning, and wiki-style linking.

Quick Reference

Notebooks

# List all notebooks
nb notebooks

# Switch to a notebook
nb use <notebook>

# Create a new notebook
nb notebooks add <name>

# Show current notebook
nb notebooks current

Adding Notes

# Add a note with title
nb add -t "Title" -c "Content here"

# Add note to specific notebook
nb <notebook>: add -t "Title" -c "Content"

# Add note with tags
nb add -t "Title" --tags tag1,tag2

# Add note from file content
nb add <notebook>:filename.md

Listing Notes

# List notes in current notebook
nb list

# List all notes (no limit)
nb list -a

# List notes in specific notebook
nb <notebook>: list

# List with excerpts
nb list -e

# List with tags shown
nb list --tags

Showing Notes

# Show note by ID or title
nb show <id>
nb show "<title>"

# Show note from specific notebook
nb show <notebook>:<id>

# Print content (for piping)
nb show <id> --print

Searching Notes

# Search across all notebooks
nb search "query"

# Search in specific notebook
nb <notebook>: search "query"

# Search with AND/OR/NOT
nb search "term1" --and "term2"
nb search "term1" --or "term2"
nb search "term1" --not "exclude"

# Search by tag
nb search --tag "tagname"

Editing Notes

# Edit by ID
nb edit <id>

# Edit by title
nb edit "<title>"

# Append content
nb edit <id> -c "New content to append"

# Prepend content
nb edit <id> -c "Content at top" --prepend

# Overwrite content
nb edit <id> -c "Replace all" --overwrite

Deleting Notes

# Delete by ID (will prompt)
nb delete <id>

# Force delete without prompt
nb delete <id> -f

Moving/Renaming

# Move note to another notebook
nb move <id> <notebook>:

# Rename a note
nb move <id> new-filename.md

Todos

# Add a todo
nb todo add "Task title"

# Add todo with due date
nb todo add "Task" --due "2026-01-15"

# List open todos
nb todos open

# List closed todos
nb todos closed

# Mark todo as done
nb todo do <id>

# Mark todo as not done
nb todo undo <id>

Bookmarks

# Add a bookmark
nb bookmark <url>

# Add with comment
nb bookmark <url> -c "My comment"

# Add with tags
nb bookmark <url> --tags reference,dev

# List bookmarks
nb bookmark list

# Search bookmarks
nb bookmark search "query"

Git Operations

# Sync with remote
nb sync

# Create checkpoint (commit)
nb git checkpoint "Message"

# Check dirty status
nb git dirty

# Run any git command
nb git status
nb git log --oneline -5

Folders

# Add folder to notebook
nb folders add <folder-name>

# List folders
nb folders

# Add note to folder
nb add <folder>/<filename>.md

Common Patterns

JB's Notebooks

# Ideas notebook
nb ideas: add -t "New Idea" --tags feature,cool

# Projects notebook
nb projects: add -t "Project Name"

# Reads notebook
nb reads: add -t "Article Title" -c "URL and notes"

# References notebook
nb references: add -t "Topic" -c "Reference content"

# Agents notebook (agent scratch space)
nb agents: add -t "Note" -c "Content"

Adding Note with Full Content

For longer notes, create a temp file and import:

# Write content to temp file first, then copy to nb
cp /tmp/note.md ~/.nb/<notebook>/
cd ~/.nb/<notebook> && git add . && git commit -m "Add note"
nb <notebook>: index rebuild

Searching Across All

# Search everything
nb search "term" --all

# Search by type
nb search "term" --type bookmark
nb search "term" --type todo

Data Location

Notes are stored in ~/.nb/<notebook>/ as markdown files with Git versioning.

~/.nb/
├── ideas/           # Ideas notebook
├── projects/        # Projects notebook
├── reads/           # Reads notebook
├── references/      # References notebook
└── agents/          # Agent scratch space

Tips

  1. Use nb <notebook>: prefix to work with specific notebooks
  2. IDs are numbers shown in nb list
  3. Titles can be used instead of IDs (quoted if spaces)
  4. All changes are automatically Git-committed
  5. Use nb sync to push/pull from remote repos

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

其他来源收录

同一技能在不同目录的原始页面:

标签

note-takingcligitmarkdownknowledge-managementbookmarkstodoslocal-firstopen-source

同类 Skill