Pinning lets you promote the items that matter most β a daily note, an active project reference, or a high-priority todo β so they always appear at the top of every listing. Pinned items are marked with a π indicator 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, nb ls, and nb browse, making them impossible to miss no matter how many other items are in the notebook.
Pinning and Unpinning Items
Usenb pin to pin an item and nb unpin to remove the pin. Pass the itemβs ID, filename, or title as the selector.
Pinned items remain at the top in nb browse as well, so they are equally prominent when navigating in a terminal or GUI browser.
How Pinning Works: The .pindex File
When you pin an item, nb records it in a .pindex file stored in the same notebook or folder. This plain-text file lists the basenames of pinned items, one per line. Because .pindex lives alongside your notes and is tracked by Git, pinned state is preserved across machines and clones.
The
.pindex file is managed automatically by nb pin and nb unpin. You do not need to edit it by hand.Pattern-Based Pinning with NB_PINNED_PATTERN
For a more dynamic approach, nb can be configured to treat any item matching a search pattern as pinned. Set the $NB_PINNED_PATTERN environment variable in your ~/.nbrc file to the desired tag or pattern.
To pin all items tagged with #pinned:
#pinned will automatically appear at the top of listings β no manual nb pin command required. To tag an item for automatic pinning:
Customizing the Pin Indicator
All indicator icons innb are configurable. To use a different character for the pin indicator, set $NB_INDICATOR_PINNED in your ~/.nbrc:
Use Case Examples
Daily Note
Pin your daily log or journal entry each morning so itβs always the first item in your home notebook.
Reference Document
Keep a cheat sheet or style guide pinned in a project notebook for quick access while working.
Active Todo
Pin the most urgent todo so it stays visible at the top of the list until itβs done.
Tag-Based Pinning
Use
NB_PINNED_PATTERN to automatically pin anything tagged #active, keeping your workflow self-organizing.To move an item to the top of the list temporarily without committing a persistent pin, see the
bump plugin.