| name | nb |
| description | Use when creating, listing, searching, bookmarking, or organizing notes with the nb CLI. |
| author | Benjamin Jesuiter <bjesuiter@gmail.com> |
| homepage | https://github.com/xwmx/nb |
| 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
nb notebooks
nb use <notebook>
nb notebooks add <name>
nb notebooks current
Adding Notes
nb add -t "Title" -c "Content here"
nb <notebook>: add -t "Title" -c "Content"
nb add -t "Title" --tags tag1,tag2
nb add <notebook>:filename.md
Listing Notes
nb list
nb list -a
nb <notebook>: list
nb list -e
nb list --tags
Showing Notes
nb show <id>
nb show "<title>"
nb show <notebook>:<id>
nb show <id> --print
Searching Notes
nb search "query"
nb <notebook>: search "query"
nb search "term1" --and "term2"
nb search "term1" --or "term2"
nb search "term1" --not "exclude"
nb search --tag "tagname"
Editing Notes
nb edit <id>
nb edit "<title>"
nb edit <id> -c "New content to append"
nb edit <id> -c "Content at top" --prepend
nb edit <id> -c "Replace all" --overwrite
Deleting Notes
nb delete <id>
nb delete <id> -f
Moving/Renaming
nb move <id> <notebook>:
nb move <id> new-filename.md
Todos
nb todo add "Task title"
nb todo add "Task" --due "2026-01-15"
nb todos open
nb todos closed
nb todo do <id>
nb todo undo <id>
Bookmarks
nb bookmark <url>
nb bookmark <url> -c "My comment"
nb bookmark <url> --tags reference,dev
nb bookmark list
nb bookmark search "query"
Git Operations
nb sync
nb git checkpoint "Message"
nb git dirty
nb git status
nb git log --oneline -5
Folders
nb folders add <folder-name>
nb folders
nb add <folder>/<filename>.md
Common Patterns
Adding Note with Full Content
For longer notes, create a temp file and import:
cp /tmp/note.md ~/.nb/<notebook>/
cd ~/.nb/<notebook> && git add . && git commit -m "Add note"
nb <notebook>: index rebuild
Searching Across All
nb search "term" --all
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/
โโโ notebook-name-1/ # Your first notebook
โโโ notebook-name-2/ # Your second notebook
โโโ ...
Tips
- Use
nb <notebook>: prefix to work with specific notebooks
- IDs are numbers shown in
nb list
- Titles can be used instead of IDs (quoted if spaces)
- All changes are automatically Git-committed
- Use
nb sync to push/pull from remote repos