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 uses color throughout its interface to highlight IDs and selectors, the current notebook name, the shell prompt, divider lines, syntax elements, and links. All of this is controlled through a layered theming system: pick a built-in theme, install a custom .nb-theme plugin, or override individual color variables and emoji indicators directly in ~/.nbrc.

Setting the Active Theme

Change the active color theme with nb set color_theme:
# open the interactive theme selector
nb set color_theme

# set a theme directly
nb set color_theme blacklight

Built-in Color Themes

nb ships with eleven built-in themes. Use nb settings colors themes to list all installed themes (built-in and user-installed) at any time.

nb (default)

The default theme. Balanced colors suitable for most terminal backgrounds.

blacklight

Dark, high-contrast theme with vivid accent colors.

console

Minimal monochrome-style theme for distraction-free work.

desert

Warm earth tones inspired by classic Vim desert colorscheme.

electro

Bright electric accents on a dark background.

forest

Deep greens and natural tones.

ocean

Cool blues and teals for a calm interface.

raspberry

Rich reds and pinks.

smoke

Soft grey monochrome theme for subdued environments.

unicorn

Playful pastel rainbow palette.

utility

Clean, no-frills utility style with minimal color.

Previewing Colors

# print a table of available xterm colors and their numbers
nb set colors

# list all installed themes (built-in + user-installed)
nb settings colors themes

Primary and Secondary Colors

Every theme defines two color variables. You can override them independently to fine-tune any theme without creating a full .nb-theme file.
# open the interactive prompt for the primary color
nb set color_primary

# open the interactive prompt for the secondary color
nb set color_secondary
VariableDefaultRole
$NB_COLOR_PRIMARYterminal-dependentIDs, notebook name, links, highlights
$NB_COLOR_SECONDARY8Divider lines and secondary accents
Both variables accept xterm color numbers (typically 1–256). Run nb set colors to see a full color table with the corresponding numbers.
# example: set primary to color 105 (a medium purple)
nb set color_primary 105

Custom Color Themes

Color themes are nb plugins with a .nb-theme file extension. A theme file contains a single if block that checks for the theme name and exports NB_COLOR_PRIMARY and NB_COLOR_SECONDARY:
# turquoise.nb-theme
if [[ "${NB_COLOR_THEME}" == "turquoise" ]]
then
  export NB_COLOR_PRIMARY=43
  export NB_COLOR_SECONDARY=38
fi

Installing a Custom Theme

# install from a GitHub URL
nb plugins install https://github.com/xwmx/nb/blob/master/plugins/turquoise.nb-theme

# install from a local path
nb plugins install /path/to/my-theme.nb-theme
Once installed, activate the theme by name:
nb set color_theme turquoise
Theme files follow the same installation mechanism as .nb-plugin files. See Plugins for full details on managing installed plugins.

Terminal Syntax Highlighting

When bat, highlight, or Pygments is installed, nb displays files with syntax highlighting. The syntax highlighting theme is controlled by $NB_SYNTAX_THEME (default: base16). When bat is installed, both light and dark background themes are available:
# open the interactive syntax theme selector
nb set syntax_theme

# set a specific bat theme
nb set syntax_theme Nord
Run bat --list-themes to see all themes available on your system.

GUI Web Syntax Highlighting

When browsing notes with nb browse --gui, syntax highlighting is also applied to text-format items. The web view incorporates the current theme’s primary color into the syntax highlight palette automatically β€” no extra configuration required.

Customizing Indicators

nb uses emoji characters called indicators to represent file types and item states in list views. Every indicator has a corresponding environment variable that you can override in ~/.nbrc.

Changing an Indicator

Open ~/.nbrc with nb settings edit and add an export line:
# use a star instead of the default pushpin for pinned items
export NB_INDICATOR_PINNED="✨"

Disabling an Indicator

Assign an empty string to remove an indicator entirely:
export NB_INDICATOR_PINNED=""

Available Indicators

The full set of indicator variables with their default values:
export  NB_INDICATOR_AUDIO="πŸ”‰"
export  NB_INDICATOR_BOOKMARK="πŸ”–"
export  NB_INDICATOR_DOCUMENT="πŸ“„"
export  NB_INDICATOR_EBOOK="πŸ“–"
export  NB_INDICATOR_ENCRYPTED="πŸ”’"
export  NB_INDICATOR_FOLDER="πŸ“‚"
export  NB_INDICATOR_IMAGE="πŸŒ„"
export  NB_INDICATOR_PINNED="πŸ“Œ"
export  NB_INDICATOR_TODO="βœ”οΈ "
export  NB_INDICATOR_TODO_DONE="βœ…"
export  NB_INDICATOR_VIDEO="πŸ“Ή"

Shell Prompt Integration

nb supports shell prompt themes that display the current notebook name in the terminal prompt context line. The astral Zsh theme is designed to work with nb and shows the active notebook name automatically.

Build docs developers (and LLMs) love