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 stores all configuration in a single file โ€” ~/.nbrc โ€” as plain Bash export statements. Every setting ships with a sensible default, so the file starts empty and you only add what you want to change. You can edit it directly in your $EDITOR, or let nb set manage it for you through an interactive prompt or one-line commands.

The ~/.nbrc File

All settings are stored as environment variable assignments in ~/.nbrc. When nb starts, it sources this file so every exported variable is available at runtime. You can open the file directly with:
nb settings edit
This opens ~/.nbrc in your configured $EDITOR. You can also set variables manually by adding lines like:
export NB_INDICATOR_PINNED="๐Ÿ”ฎ"
The location of the configuration file can be overridden by setting $NBRC_PATH before nb runs (default: $HOME/.nbrc).

nb set and nb settings

nb set and nb settings are aliases for the same subcommand. Use whichever feels natural โ€” they behave identically. Running either command with no arguments opens the interactive settings prompt, where you can browse every available setting, see its current value, and enter a new one:
nb set
To jump straight to a specific settingโ€™s prompt, pass its name or number:
nb set editor
[6]  editor
     ------
     The command line text editor used by `nb`.

     โ€ข Example Values:

         atom
         code
         emacs
         hx
         macdown
         mate
         micro
         nano
         pico
         subl
         vi
         vim

EDITOR is currently set to vim

Enter a new value, unset to set to the default value, or q to quit.
Value:

Setting Values

Skip the interactive prompt by passing both the name (or number) and value together:
# set editor with setting name
nb set editor code

# set editor with setting number (6)
nb set 6 code

# set the color theme to blacklight
nb set color_theme blacklight

# set the default ls limit to 10
nb set limit 10

Getting, Listing, and Unsetting

# by name
nb settings get editor

# by number
nb settings get 6
nb settings show <name> prints the full help text and current value for a single setting, which is useful for checking what values are supported.

Key Settings Reference

The table below covers the most frequently configured settings. Every NB_* variable shown here can also be set by running nb set <lowercase_name> <value> (e.g., nb set nb_dir ~/notes).
VariableDefaultDescription
$NB_DIR~/.nbDirectory that contains all notebooks
$NB_EDITOR / $EDITORsystem defaultCLI text editor used by nb edit
$NB_DEFAULT_EXTENSIONmdFile extension for new notes (md, org, etc.)
$NB_LIMIT15Max items shown by nb / nb ls; supports auto
$NB_AUTO_SYNC1Auto-run nb sync on every git checkpoint (0 to disable)
$NB_AUTO_SYNC_SECONDS60Minimum seconds between automatic sync operations
$NB_COLOR_THEMEnbActive color theme name
$NB_ENCRYPTION_TOOLopensslEncryption backend โ€” openssl or gpg
$NB_SERVER_HOSTlocalhostHostname for nb browse server
$NB_SERVER_PORT6789Port for nb browse server

NB_LIMIT auto mode

NB_LIMIT accepts several special values beyond a plain number:
nb set limit auto        # fit the terminal height
nb set limit auto^15     # auto, capped at 15
nb set limit auto-2      # auto minus 2 (for multiline prompts)
nb set limit auto+2      # auto plus 2
nb set limit auto-2^15   # combined: offset and cap

NB_AUTO_SYNC

When NB_AUTO_SYNC is 1 (the default), nb will automatically run nb sync whenever it reaches a git checkpoint. Set it to 0 to manage syncing manually:
nb set auto_sync 0
nb set and nb settings are aliases โ€” they refer to the same subcommand and can be used interchangeably throughout your workflow.

Complete Variable Reference

For the full list of every NB_* environment variable with descriptions and supported values, see the Variables reference.

Build docs developers (and LLMs) love