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.

When you bookmark a URL with nb, it does much more than save a link. nb fetches the page, extracts the title and description, converts the HTML body to Markdown (when Pandoc is available), cleans up the markup (when readability-cli is installed), and stores everything in a structured plain-text Markdown file alongside your notes. The result is a searchable, offline archive of every page you bookmark β€” no account required, no vendor lock-in.

Creating Bookmarks

Pass a URL as the first argument to nb to create a bookmark immediately:
nb https://example.com
nb auto-generates a structured Markdown file from the page:
# Example Title (example.com)

<https://example.com>

## Description

Example description.

## Content

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

This domain is for use in illustrative examples in documents. You may
use this domain in literature without prior coordination or asking for
permission.
You can also use the explicit nb bookmark subcommand (aliases: nb bk, nb bm):
nb bookmark https://example.com
Many shells automatically escape special characters in URLs. If a URL with anchors or query strings is being truncated, wrap it in quotes: nb "https://example.com#sample-anchor".

Bookmark Multiple URLs at Once

Pass multiple URLs in a single command β€” any additional options are reused for each bookmark:
nb https://example.com https://example.net --tags tag1,tag2 --filename example

Adding a Title

Override the auto-detected title with --title:
nb https://example.com --title "My Custom Title"

Adding Tags

Use --tags <tag1>,<tag2>... (-t) to attach #hashtags to the bookmark. Tags are placed in a ## Tags section:
nb https://example.com --tags tag1,tag2
## Tags

#tag1 #tag2

Adding a Quote

Capture a specific excerpt from the page with --quote (-q). The text is formatted as a Markdown blockquote in a ## Quote section:
nb https://example.com --quote "Example quote line one.

Example quote line two."
## Quote

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

Adding a Comment

Attach your own notes to the bookmark with --comment (-c). The text goes into a ## Comment section:
nb https://example.com --comment "Example comment."
Link to other bookmarks, notes, or external URLs with --related (-r). Multiple --related options can be used and each entry is placed in a ## Related section:
nb https://example.com --related example:123 -r https://example.net
## Related

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

Encrypting Bookmarks

Add --encrypt (-e) to create a password-protected bookmark:
nb https://example.com --encrypt
Encrypted bookmarks require a password before they can be viewed, opened, or searched.

Skipping the Page Request

Use --no-request to create a bookmark without fetching the remote page. This saves a minimal bookmark file with just the URL:
nb https://example.com --no-request

Bookmark File Format

Bookmarks are identified by the .bookmark.md extension. The bookmarked URL must appear as the first URL in the file, enclosed in angle brackets. A full bookmark file looks like:
# Example Title (example.com)

<https://example.com>

## Description

Example description.

## Quote

> A relevant quote from the page.

## Comment

My personal notes about this page.

## Related

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

## Tags

#tag1 #tag2

## Content

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

Page body converted to Markdown.
You can create a minimal valid bookmark by hand with nb add:
nb add example.bookmark.md --content "<https://example.com>"

Listing Bookmarks

nb bookmark (aliases: nb bk, nb bm) lists only bookmarks with a helpful add-prompt header:
nb bookmark
# Add: nb <url> Help: nb help bookmark
# ------------------------------------
# [3] πŸ”– πŸ”’ example.bookmark.md.enc
# [2] πŸ”– Bookmark Two (example.com)
# [1] πŸ”– Bookmark One (example.com)
Filter the bookmark list by passing a search term:
nb bookmark list two
# [2] πŸ”– Bookmark Two (example.com)
Bookmarks also appear in the general nb / nb ls list alongside notes. To see only bookmarks there, use --type bookmark or --bookmark:
nb --type bookmark
nb --bookmark
Because nb saves the domain in each bookmark title, filtering by domain is straightforward:
nb example.com
# [7] πŸ”– Bookmark Three (example.com)
# [1] πŸ”– Bookmark One (example.com)

Opening Bookmarks

nb provides three ways to open a bookmark, depending on whether you want a GUI browser, a terminal browser, or just the raw URL.
nb open (shortcut: nb o) opens the bookmarked URL in your system’s primary web browser:
# open bookmark by id
nb open 3
nb o 3

# open bookmark in a specific notebook
nb open example:12
nb example:12 open
nb open and nb peek automatically check whether the URL is still valid. If the page has been removed, nb can check the Internet Archive Wayback Machine for an archived copy.

Viewing and Editing Bookmarks

Use nb show and nb edit to view or modify bookmark files the same way you would any other note:
# view bookmark file with syntax highlighting
nb show 3

# render bookmark as HTML in terminal browser
nb show 3 --render

# edit the bookmark file
nb edit 3
nb show <id> --render displays the full bookmark β€” all sections and the cached page content β€” as a cleaned-up HTML page in your terminal browser.

Searching Bookmarks

Full-text search covers the cached page content stored inside each bookmark file. Use nb search / nb q or the bookmark search shorthand:
# search current notebook
nb search "example query"

# search only bookmarks
nb search "example query" --type bookmark

# using the bookmark search alias
nb bookmark search "example query"
Search output includes the matching line numbers and content:
[10] πŸ”– example.bookmark.md "Example Bookmark (example.com)"
------------------------------------------------------------
5:Lorem ipsum example query.
Search for tagged bookmarks:
nb search --tag tag1
nb q -t tag1
nb q \#tag1

Quick Reference

Create

nb <url>, nb bookmark <url>, nb bk, nb bm

List

nb bookmark, nb bookmark list, nb --bookmark

Open

nb open, nb o

Peek

nb peek, nb p, nb preview

Build docs developers (and LLMs) love