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 search performs full-text search across notes, bookmarks, and any other text files tracked in a notebook. It is powered by Git’s built-in git grep tool by default and supports boolean query logic, regular expressions, tag and type filters, and a choice of alternative search backends. Results show matching excerpts with the matched text highlighted.
Usage
Options
One or more search terms. When multiple positional query arguments are given, they are combined as AND queries — only items matching all of the terms are returned.
Search all unarchived notebooks rather than only the current one.
Add an explicit AND condition. Equivalent to passing an additional positional query. Items must match this term in addition to any other queries.
Add an OR condition. Items matching any one of the OR queries are included. Multiple
--or flags can be chained in a single command.Exclude items that match this term from the results, regardless of other query matches.
Print only the id, filename, and title for each matching item — no excerpts. Useful for feeding results into other commands.
Print the full filesystem path for each matching file instead of the default listing format.
Filter results to items that contain the specified tag(s). Accepts a comma-separated list. Multiple
-t / --tag flags are combined as AND conditions.List all tags found in the current notebook (or the specified notebook/folder) instead of performing a text search.
Restrict the search to items of a particular type.
<type> can be a file extension (md, org, txt, etc.) or one of the named types: archive, audio, book, bookmark, document, folder, image, note, text, video. The shorthand --<type> form (e.g., --bookmark) is also accepted.Use an alternative search tool instead of
git grep. Supported values: rga, rg, ag, ack, grep.Shortcut Alias
Examples
Search Backends
By defaultnb search uses git grep, which is always available because every notebook is a git repository. For additional capabilities — such as searching inside PDFs or binary files — you can install and select an alternative tool:
| Backend | Flag value | Homepage |
|---|---|---|
git grep (default) | (built-in) | Always available |
rga (ripgrep-all) | --utility rga | https://github.com/phiresky/ripgrep-all |
rg (ripgrep) | --utility rg | https://github.com/BurntSushi/ripgrep |
ag (Silver Searcher) | --utility ag | https://github.com/ggreer/the_silver_searcher |
ack | --utility ack | https://beyondgrep.com/ |
grep | --utility grep | https://en.wikipedia.org/wiki/Grep |
How Multiple Query Terms Work
Multiple positional arguments behave as AND:
nb search "foo" "bar" returns
only items that contain both “foo” and “bar”. The --and, --or, and
--not flags give you explicit control over how terms are combined, and all
four mechanisms can be mixed in a single command.Searching Tags
Tags innb are written as #hashtag inside note content. The --tag / -t option searches for these inline tags: