Three commands form the core read-modify-remove loop inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/xwmx/nb/llms.txt
Use this file to discover all available pages before exploring further.
nb: edit opens an item for interactive or programmatic modification, show displays or queries item metadata, and delete permanently removes one or more items. All three accept the same flexible selector format — numeric ID, filename, title, or a fully-qualified notebook:folder/id path.
nb edit
Open a note in $EDITOR, or append, prepend, or overwrite its content programmatically without ever leaving the terminal.
Usage
Options
Append
<content> to the file without opening the editor. Useful for quick updates or scripted edits. Combine with --edit to also open the editor after appending.Replace the entire file content with the value passed to
--content or received on stdin, instead of appending.Insert
<content> or stdin before existing file content, rather than appending.Open the note with a specific editor, overriding the
$EDITOR environment variable for this invocation.Edit the most recently modified item in the current notebook, without needing to specify an identifier.
Open the note in
$EDITOR even when content is supplied via --content or stdin. Without this flag, piped or --content input is appended silently.Shortcut Alias
Examples
Non-text files (images, PDFs, etc.) are opened using your system’s preferred
application for that file type rather than a text editor.
nb show
Display a note in the pager, print it to stdout, render it to HTML, or query specific metadata fields without opening the full content.
Usage
Options
Print the note content directly to stdout instead of opening it in the pager (
less or $PAGER).Use Pandoc to convert the note to HTML and display it in a terminal web browser (
w3m or links). Ignored if neither Pandoc nor a browser is available.Print the full filesystem path of the item.
Print the item’s path relative to the notebook root.
Print the filename of the item.
Print the title of the item.
Print the numeric id of the item.
Print the id, filename, and title on one line — the same format used in listings.
Print the date and time when the item was first added.
Print the date and time of the last recorded change.
List the git commit authors who have contributed to the item.
Print the file extension. When
<type> is provided, returns success (exit 0) if the item matches that type, error (exit 1) if not. Accepted types: archive, audio, bookmark, document, folder, image, text, video, or a file extension.Open the item using
nb browse in a terminal web browser.Show the item without syntax highlighting.
Shortcut Alias
Examples
nb delete
Permanently remove one or more items. By default, nb delete prompts for confirmation before removing anything.
Usage
Options
Skip the confirmation prompt and delete immediately. Required for non-interactive or scripted use.
Shortcut Aliases
nb rm, nb trash
Examples
nb move and nb copy
While not strictly viewing or editing commands, move and copy are the other two item-manipulation commands that complete the lifecycle alongside edit, show, and delete.
nb move
Move or rename an item, change its file type, or relocate it to another notebook or folder. nb rename is an alias.
| Option | Effect |
|---|---|
--reset | Reset the filename to a last-modified timestamp |
--to-bookmark | Convert to a bookmark (.bookmark.md extension) |
--to-note | Convert a bookmark back to a plain Markdown note (.md) |
--to-title | Set the filename from the note’s title |
--to-todo | Convert to a todo (.todo.md extension) |
-f, --force | Skip the confirmation prompt |
nb mv
nb copy
Duplicate an item in place or to another location. nb duplicate is an alias.