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 treats every file as plain text, which means searches are instant and exhaustive. Under the hood, nb search is powered by git grep — one of the fastest grep implementations available — and extends it with multi-term AND/OR/NOT logic, hashtag awareness, type filtering, and cross-notebook scoping. Bookmark cached page content, todo descriptions, code snippets, and notes all live in the same index. Use nb search (shortcut: nb q, for “query”) to search the current notebook:
# search for "example query"
nb search "example query"

# using the shortcut alias
nb q "example query"
Search results show the item id, filename, title, and matching lines with their line numbers:
[314]  🔖 example.bookmark.md "Example Bookmark (example.com)"
--------------------------------------------------------------
1:# Example Bookmark (example.com)

3:<https://example.com>

[2718] example.md "Example Note"
--------------------------------
1:# Example Note

AND Queries

Multiple arguments are treated as an AND query — all terms must be present somewhere in the document (not necessarily on the same line):
# find items containing both "example" AND "demo"
nb search "example" "demo"

# equivalent using --and
nb search "example" --and "demo"

# search for three tags that all must be present
nb q "#example" "#demo" "#sample"
nb q "#example" --and "#demo" --and "#sample"

OR Queries

Use a pipe character inside a single argument or the --or option to match items containing at least one of the terms:
# pipe character in argument
nb search "example|sample"
nb q "example|sample"

# --or option
nb search "example" --or "sample"
nb q "example" --or "sample"
--or and --and can be combined in a single command:
nb q "example" --or "sample" --and "demo"
# equivalent: example|sample AND demo|sample

NOT Queries

Exclude items that match a term with --not <query>:
# find items matching "Example" but NOT "Sample"
nb search "Example" --not "Sample"

# combine: must match "Example" AND "Sample", but NOT "Demo"
nb search "Example" --and "Sample" --not "Demo"

Pass a regex pattern as the query argument:
# match phone numbers in ###-#### format
nb search "\d\d\d-\d\d\d\d"

# match any line starting with a Markdown heading
nb q "^# "

# items tagged with #tag1
nb search --tag tag1
nb q -t tag1

# items tagged with #tag1 AND #tag2
nb q --tag tag1 --tag tag2

# items tagged with #tag1 AND #tag2 (comma-separated)
nb q --tags tag1,tag2

Type Filtering

Limit search results to a specific item type with --type <type>:
# search only bookmarks
nb search "example" --type bookmark

# search only todos
nb search "project" --type todo

# search only notes
nb search "meeting" --type note
Supported type values: note, bookmark, todo, document, image, audio, video, folder, archive, book.

Scoping: Current Notebook, Specific Notebook, All Notebooks

# search the current notebook (default)
nb search "example query"

# search a specific notebook using the colon prefix
nb search example: "example query"
nb q example: "example query"

# search a specific folder
nb search demo/ "example query"

# search ALL unarchived notebooks
nb search "example query" --all
nb q -a "example query"

# search all notebooks and list matches only (no content preview)
nb search "example query" --all --list
nb q -la "example query"

Output Formats

nb search "example"
# [314]  🔖 example.bookmark.md "Example Bookmark (example.com)"
# --------------------------------------------------------------
# 1:# Example Bookmark (example.com)
#
# 3:<https://example.com>
The --list / -l flag prints only the id, filename, and title for each match — useful for piping results to other commands.

Search vs List Filtering

nb search and nb list <query> are related but distinct:
CommandWhat it does
nb list <query>Filters the item list by title or filename only
nb search <query>Full-text search of all file content
Use nb list for quick navigation when you know the note title. Use nb search when you want to find content inside files.

Alternative Search Utilities

nb search defaults to git grep but supports drop-in replacements via --utility <name>:
nb search "example" --utility rg
nb search "example" --utility ag
Supported alternatives: rga, rg, ag, ack, grep.

Searching with nb browse

Searches can also be performed from a terminal or GUI web browser using nb browse --query:
nb browse --query "#example"
nb b -q "#example"
❯nb · home : +

search: [#example             ]

[home:7]   Title Seven
[home:32]  Title Thirty-Two
[home:56]  Title Fifty-Six

Quick Reference

Basic Search

nb search <query>, nb q <query>

AND / OR / NOT

--and <q>, --or <q>, --not <q>

Tag Search

nb q --tag tag1, nb q \#tag1

All Notebooks

nb q --all, nb q -a

Build docs developers (and LLMs) love