Linux command
nb 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Create a note
nb add
Create a note
nb add "[Note content here]"
List notes
nb ls
Search notes
nb search "[query]"
Edit a note
nb edit [1]
Delete a note
nb delete [1]
Save a bookmark
nb bookmark "[https://example.com]"
Show a note
nb show [1]
Sync notes
nb sync
Switch notebooks
nb use [notebook_name]
说明
nb is a command-line note-taking, bookmarking, archiving, and knowledge-base application. Notes are stored as plain Markdown (or any text format) on the local filesystem, and each notebook is a git repository, providing version history, conflict resolution, and remote sync. Beyond plain notes, nb supports tagged to-do lists, encrypted notes (via OpenSSL or GPG), bookmarks (with cached page snapshots), pinned notes, search with rg/ag/grep, and import/export to multiple formats. It runs as a single Bash script with optional plugins.
参数
- add _text_
- Create a new note. Without arguments opens the configured editor.
- ls
- List notes, optionally filtered by query.
- search _query_
- Full-text search across notes.
- edit _id_
- Open an existing note in the editor.
- delete _id_
- Remove a note. --force skips the confirmation.
- show _id_
- Print the contents of a note.
- bookmark _url_
- Save a bookmark, fetching title and content automatically.
- todo _action_
- Manage to-do items.
- notebooks
- Manage notebooks (groups of notes backed by separate git repositories).
- sync
- Pull and push changes to the configured remote git repository.
- use _notebook_
- Switch the active notebook.
- --help
- Display help for nb or a subcommand.
FAQ
What is the nb command used for?
nb is a command-line note-taking, bookmarking, archiving, and knowledge-base application. Notes are stored as plain Markdown (or any text format) on the local filesystem, and each notebook is a git repository, providing version history, conflict resolution, and remote sync. Beyond plain notes, nb supports tagged to-do lists, encrypted notes (via OpenSSL or GPG), bookmarks (with cached page snapshots), pinned notes, search with rg/ag/grep, and import/export to multiple formats. It runs as a single Bash script with optional plugins.
How do I run a basic nb example?
Run `nb add` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does add _text_ do in nb?
Create a new note. Without arguments opens the configured editor.