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 browse (shortcut: nb b) launches an embedded, terminal-first web application that lets you navigate, view, edit, and search your entire note collection from any web browser — terminal or GUI. It renders [[wiki-style links]] and #hashtags as internal links, making it easy to explore interconnected notes and bookmarks without leaving your browser.

Usage

nb browse [<notebook>:][<folder-path>/][<id> | <filename> | <title>] [--daemon]
          [-g | --gui] [-n | --notebooks] [-p | --print] [-q | --query <query>]
          [-s | --serve] [-t <tag> | --tag <tag> | --tags <tag1>,<tag2>...]
nb browse add [<notebook>:][<folder-path>/][<filename>]
          [-c <content> | --content <content>] [--tags <tag1>,<tag2>...]
          [-t <title> | --title <title>]
nb browse delete ([<notebook>:][<folder-path>/][<id> | <filename> | <title>])
nb browse edit ([<notebook>:][<folder-path>/][<id> | <filename> | <title>])

Subcommands

SubcommandShortcut AliasesDescription
(default)Open a notebook, folder, or item in a web browser
adda, +Open the add view in the browser
deleted, -Open the delete view in the browser
editeOpen the edit view in the browser

Options

-g, --gui
flag
Open in the system’s primary GUI web browser instead of the terminal browser.
-s, --serve
flag
Start the web server. The server stays running until you press any key.
--daemon
flag
Start the web server in daemon mode. Close with Ctrl-C.
-n, --notebooks
flag
Browse the list of all notebooks.
-p, --print
flag
Print the rendered output to standard output instead of opening a browser.
-q, --query <query>
string
Open directly to the search results page for <query>.
-t, --tag <tag>
string
Search for and open results filtered by a single #tag.
--tags <tag1>,<tag2>...
string
Search for and filter results by a comma-separated list of tags.
-c, --content <content>
string
(browse add) Pre-populate the new note with content.
-t, --title <title>
string
(browse add) Pre-populate the new note with a title.

Opening the Browser

Running nb browse with no arguments opens the current notebook in your configured terminal web browser (w3m, Links, or the $BROWSER environment variable):
# open the current notebook
nb browse

# open a specific notebook
nb browse example:

# open a folder
nb browse example/sample/

# open item 42 in the "sample" folder of the "example" notebook
nb browse example:sample/42

# shortcut alias
nb b
nb b example:123
The browser interface renders a list identical to nb ls, with each item linked. Lists paginate automatically to fit the terminal height. Navigation links let you jump to parent folders, the current notebook, and other notebooks.

Server Mode

By default nb browse opens the browser once and exits. Use --serve or --daemon to keep the server running for multi-session use or sharing within a local network:
# start server — press any key to stop
nb browse --serve

# start server as daemon — Ctrl-C to stop
nb browse --daemon
nb browse depends on either ncat (part of the nmap package) or socat for the server. When neither is available and Bash ≥ 5.2 is present, nb browse falls back to a pure-Bash implementation that supports all features except the Ace editor. When only pandoc is available, wiki-style links go to unrendered source files.

GUI Browser

Add --gui / -g to open any nb browse view in the system’s primary GUI browser (Chrome, Firefox, Safari, etc.):
# open the current notebook in the GUI browser
nb browse --gui

# open item 123 in the "sample" notebook in the GUI browser
nb browse sample:123 --gui

# open a folder in the GUI browser (short option)
nb browse example/ -g

# shortcut alias + short option
nb b -g

GUI Editing with Ace

By default, nb browse --gui uses the browser’s native <textarea> for editing. You can enable the Ace editor for syntax highlighting and block selection by adding this to ~/.nbrc:
export NB_ACE_ENABLED=1
nb will automatically download and install Ace from GitHub the next time an edit form is loaded.

Searching

The nb browse interface includes a search field powered by nb search. You can also open directly to search results from the command line:
# open to search results for "example"
nb browse --query "example"

# short option
nb b -q "example"

Tag Filtering

Filter results by tag with -t / --tag / --tags:
# open to items tagged #tag2
nb browse --tag tag2

# short option
nb b -t tag2

# multiple tags (comma-separated)
nb browse --tags tag1,tag2

browse add

Add a new item from within the browser using the + link or from the command line. Pass a notebook, folder, and/or filename selector to create the note in a specific location:
# open the add form for the current notebook
nb browse add

# open the add form inside "formats/" in the "text" notebook
nb browse add text:formats/

# pre-populate title, content, and tags
nb browse add --title "Example Title" --content "Example content." --tags tag1,tag2

# shortcut aliases
nb b a
nb b +

browse edit

Open any text-format item for editing directly in the browser. The form resizes automatically to fit the terminal window:
# open item 123 in the "text" notebook for editing
nb browse edit text:formats/markdown/123

# shortcut alias
nb b e text:formats/markdown/123
Terminal browser editing workflows differ: w3m opens items in $EDITOR and returns you to the browser to save, while links performs edits inline.

browse delete

Delete an item through the browser UI or from the command line:
# open the delete confirmation view for item 4 in "example"
nb browse delete example:4

# shortcut aliases
nb b d example:4
nb b - example:4

MathJax Support

Enable MathJax for rendering LaTeX math expressions in nb browse --gui by adding this to ~/.nbrc:
export NB_MATHJAX_ENABLED=1
nb will automatically download and install MathJax from GitHub.

Privacy

nb browse is fully self-contained — no external libraries, frameworks, or third-party code beyond the binary dependencies. It includes several privacy protections:
  • Page content is cached locally; bookmarks are readable offline without re-fetching.
  • <img> tags in bookmarked content are removed to prevent outbound requests.
  • Outbound links are rewritten through an exit-page redirect to mask the HTTP referrer.
  • All pages include <meta name="referrer" content="no-referrer">.
  • Links carry rel="noopener noreferrer".
  • lynx is opened with -noreferer.

AsciiDoc Support

To browse items in AsciiDoc format, install asciidoctor.

Shortcut Alias: nb b

# open the current notebook
nb b

# open item 123 in "example" notebook
nb b example:123

# open "sample" notebook in the GUI browser
nb b sample: -g

Examples

# browse all notebooks
nb browse --notebooks

# browse a specific folder
nb browse Example\ Folder/

# open item 123
nb browse 123

# open item 456 in the "demo" notebook
nb browse demo:456

# search across the current notebook
nb browse -q "meeting notes"

# filter by tag and open in GUI browser
nb browse --tag project --gui

Build docs developers (and LLMs) love