Skip to main content

Documentation 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 bookmark (shortcut aliases: nb bk, nb bm) is a full-featured bookmarking system built into nb. Bookmarks are stored as structured Markdown files (.bookmark.md) that automatically capture the page title, description, and full content — making them fully searchable offline. You can annotate them with quotes, comments, related links, and tags, then browse or open them at any time.

Usage

nb bookmark [<ls-options>...]
nb bookmark [<notebook>:][<folder-path>/] <url>...
            [-c <comment> | --comment <comment>] [--edit] [-e | --encrypt]
            [-f <filename> | --filename <filename>] [--no-request]
            [-q <quote> | --quote <quote>] [--save-source]
            [-r (<url> | <selector>) | --related (<url> | <selector>)]...
            [-t <tag1>,<tag2>... | --tags <tag1>,<tag2>...] [--title <title>]
nb bookmark [list [<list-options>...]]
nb bookmark (open | peek | url) (<id> | <filename> | <path> | <title>)
nb bookmark (edit | delete) (<id> | <filename> | <path> | <title>)
nb bookmark search <query>

Creating Bookmarks

The quickest way to bookmark a URL is to pass it directly to nb:
nb https://example.com
nb fetches the page, extracts the title and description, converts the HTML to Markdown (when Pandoc is available), and saves everything in a .bookmark.md file. If readability-cli is installed, the markup is cleaned up to focus on content. When Chromium or Chrome is present, JavaScript-dependent pages are automatically rendered before saving. URLs with special characters can be enclosed in quotes:
nb "https://example.com#sample-anchor"
To save a bookmark in a specific notebook or folder, include the selector before the URL:
# save in the "research" notebook
nb research: https://example.com

# save in a folder inside the current notebook
nb bookmark notes/web/ https://example.com

Bookmarking Multiple URLs

Pass multiple URLs to bookmark them all at once. Additional options are applied to each:
nb https://example.com https://example.net --tags tag1,tag2 --filename example

Options

-c, --comment <comment>
string
Add a comment or description in a ## Comment section.
-q, --quote <quote>
string
Add a quote or excerpt from the page in a ## Quote section. Alias: --excerpt.
-t, --tags <tag1>,<tag2>...
string
Add comma-separated tags as #hashtags in a ## Tags section.
--title <title>
string
Override the bookmark title. When not specified, nb uses the HTML <title> tag.
Add a related URL or nb selector to a ## Related section. Use multiple times to add multiple items.
-e, --encrypt
flag
Encrypt the bookmark with a password (AES-256 via OpenSSL by default, or GPG if configured).
-f, --filename <filename>
string
Set the filename for the bookmark. Omit the extension to use the default .bookmark.md.
--no-request
flag
Do not fetch or download the target page. Creates a minimal bookmark with only the URL.
--save-source
flag
Save the page’s raw HTML source in addition to the converted Markdown content.
--edit
flag
Open the bookmark in $EDITOR before saving, allowing manual edits to the generated file.

Bookmark File Format

Bookmarks are plain Markdown files with a .bookmark.md extension. Here is the structure nb generates:
# Example Title (example.com)

<https://example.com>

## Description

Example description.

## Quote

> Example quote line one.
>
> Example quote line two.

## Comment

Example comment.

## Related

- [[example:123]]
- <https://example.net>

## Tags

#tag1 #tag2

## Content

Example Title
=============

This domain is for use in illustrative examples in documents.
The bookmark URL must appear as the first URL in the file, wrapped in < and > characters. To create a minimal valid bookmark manually:
nb add example.bookmark.md --content "<https://example.com>"

Subcommands

list

List all bookmarks in the current notebook:
nb bookmark list

# filter by keyword
nb bookmark list example

# shortcut alias
nb bookmark ls
The plain nb bookmark command (no subcommand) also lists bookmarks:
nb bookmark
nb bk
nb bm
Bookmarks appear alongside other items in nb and nb ls. Use --type bookmark or --bookmark to filter:
nb --type bookmark
nb --bookmark
Filter by domain name:
nb example.com

open

Open the bookmarked URL in the system’s primary web browser:
nb bookmark open 3
nb open 3

# open a bookmark in a specific notebook
nb bookmark open example:12
nb open example:12

# alternative selector syntax
nb example:12 open
On WSL, install wslu for nb open to work correctly.

peek

Open the bookmarked URL in your terminal web browser (w3m, Links, or Lynx):
nb bookmark peek 3
nb peek 3

# peek a bookmark in a specific notebook
nb bookmark peek example:12
nb peek example:12

# set the preferred terminal browser
export BROWSER=lynx

# override for a single command
BROWSER=links nb 12 peek
nb open and nb peek work with encrypted bookmarks — nb will prompt for the password. Both commands also automatically check if the URL is still valid and can fall back to the Internet Archive Wayback Machine for archived copies.

url

Print the URL stored in a bookmark without opening it:
nb bookmark url 3
nb bookmark url example:12

edit

Open a bookmark file in $EDITOR:
nb bookmark edit 3
nb bookmark edit example:12

delete

Delete a bookmark:
nb bookmark delete 3
nb bookmark delete example:12
Perform a full-text search of bookmarks, including archived page content:
nb bookmark search "example query"

# shortcut alias
nb bookmark q "example query"

Searching with Tags

Search for tagged bookmarks with nb search:
nb search --tag tag1
nb q -t tag1
nb q \#tag1

Examples

1

Save a URL with tags and a comment

nb https://example.com --tags research,web --comment "Useful reference for project X."
2

Save a quote from the page

nb https://example.com --quote "The most important thing is to keep going."
3

Save a bookmark with related links

nb https://example.com --related example:123 -r https://example.net
4

Save an encrypted bookmark

nb https://example.com --encrypt
5

List and open bookmarks

nb bookmark
nb bookmark open 2
nb peek 3
6

Search bookmarks

nb bookmark search "example query"
nb q -t tag1

Shortcut Aliases

nb bk

Shortcut alias for nb bookmark

nb bm

Additional shortcut alias for nb bookmark

nb o

Shortcut for nb open
nb bk
nb bm example.net
nb o 3
nb o example:12
nb p 3
nb p example:12
nb b is the shortcut alias for nb browse, not nb bookmark. Use nb bk or nb bm as shortcuts for the bookmark subcommand.

The bookmark Standalone Command

bookmark is a standalone command installed alongside nb that is a direct shortcut for nb bookmark. It accepts all the same subcommands and options:
bookmark https://example.com --tags tag1,tag2
bookmark list
bookmark peek 2
bookmark open 2
bookmark search "example query"
For full help, run bookmark help.

Build docs developers (and LLMs) love