Tags are one of the most flexible organizational tools inDocumentation 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. Rather than forcing a rigid taxonomy, tags let you label and cross-reference notes, bookmarks, and todos using plain #hashtag syntax that lives right inside your documents. Because tags are just text, they travel with your files in Git and remain readable in any editor — no proprietary metadata required.
How Tags Work
Tags innb are written as #hashtags and can be placed anywhere in a document. A valid hashtag is a # character followed by any combination of letters, numbers, underscores, or dashes. Tags integrate naturally with nb browse, where they are rendered as clickable links that filter to all items sharing that tag.
Tags placed via
--tags are automatically formatted as #hashtags in the document. You can also write #tags directly into your note content by hand.Adding Tags at Creation
The--tags option is available when creating notes, bookmarks, and todos. It accepts a comma-separated list of tag names and inserts them as #hashtags in the new document.
- Notes
- Bookmarks
- Todos
Inline Hashtags
You can write#hashtags directly anywhere inside a note’s content without using --tags. nb recognizes any #word as a tag when listing and searching, and nb browse renders all inline hashtags as clickable filter links.
Nested Tags
nb supports hierarchical tags using slash-separated segments, such as #project/design/ui. Nested tags let you build a parent-child taxonomy without needing separate notebooks or folders.
Searching for a parent prefix matches all descendants:
| Query | Matches |
|---|---|
#project | #project, #project/design, #project/design/ui |
#project/design | #project/design, #project/design/ui |
#project/design/ui | #project/design/ui only |
#project/ui | nothing (branch does not exist) |
Listing Items by Tag
Pass a#hashtag (escaped or quoted) directly to nb / nb ls to list matching items, or use the --tags option:
Listing All Tags
Use--tags on nb ls or nb list to display every tag present in a notebook, folder, or individual item:
Searching by Tag
Usenb search (shortcut nb q) for richer tag queries, including AND and OR logic:
Cross-Notebook Tag Search
Append--all (or -a) to any tag listing or search command to search across every notebook:
Browsing Tags
When viewing notes innb browse, every #hashtag is rendered as a clickable link that opens a filtered list of all items in the current notebook sharing that tag.
Use the --tag / -t option with nb browse to open directly to a tag-filtered view:
Combining Tags with Other Filters
Tags can be combined with notebook selectors, folder paths, and text queries in mostnb commands: