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 settings (alias: nb set) opens an interactive settings prompt or lets you read and write configuration values directly from the command line. All settings are stored in ~/.nbrc as shell variable exports. You can reference settings by name or by their assigned number.

Usage

nb set [<name> [<value>] | <number> [<value>]]
nb settings colors [<number> | themes]
nb settings edit
nb settings get   (<name> | <number>)
nb settings list  [--long]
nb settings set   (<name> | <number>) <value>
nb settings show  (<name> | <number>)
nb settings unset (<name> | <number>)
nb set and nb settings are aliases for the same subcommand and can be used interchangeably.

Subcommands

(default) — Interactive Prompt

Running nb settings or nb set with no arguments opens the interactive prompt. Enter a setting name or number, then enter the new value:
nb settings
nb set
To open the prompt directly for a specific setting, pass the name or number:
nb set editor
nb set 6

colors

Print a table of available xterm color numbers and their rendered colors:
nb settings colors

# display a specific color number
nb settings colors 105

# list installed themes
nb settings colors themes

edit

Open the ~/.nbrc configuration file directly in $EDITOR:
nb settings edit

get

Print the current value of a setting:
nb settings get editor
nb settings get 6

list

List all available settings with their names, numbers, and descriptions:
nb settings list

# include full descriptions
nb settings list --long

set

Assign a value to a setting without using the interactive prompt:
nb settings set editor vim
nb settings set 6 vim
nb settings set color_theme blacklight
nb settings set limit 10

show

Print the full help description and current value for a setting:
nb settings show editor
nb settings show 6

unset

Restore a setting to its default value:
nb settings unset editor
nb settings unset 6

Quick Assignment with nb set

The nb set alias is the fastest way to configure nb from the command line:
# set the editor by name
nb set editor vim

# set the editor by number (6)
nb set 6 vim

# set the color theme
nb set color_theme blacklight

# set the default list limit
nb set limit 10

Example: Configuring the Editor

# open interactive prompt for the editor setting
 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:
Or set it directly:
 nb set editor code
EDITOR set to code

 nb set 6 code
EDITOR set to code
Read it back:
 nb settings get editor
code

 nb settings get 6
code
Restore the default:
 nb unset editor
EDITOR restored to the default: vim

Complete Settings Reference

All settings are listed below with their number, name, description, and default value.
Use nb settings list --long to see the full list in your terminal at any time.

[1] auto_sync

Controls whether add, edit, and delete operations automatically sync notebook changes to the remote repository.
[1]  auto_sync
     ---------
     By default, operations that trigger a git commit like `add`, `edit`,
     and `delete` will sync notebook changes to the remote repository, if
     the notebook's remote is set. To disable this behavior, set this to "0".

     • Default Value: 1
nb set auto_sync 0   # disable automatic syncing
nb set auto_sync 1   # re-enable (default)

[2] color_primary

The primary highlight color used for identifiers and messages, as an xterm color number.
[2]  color_primary
     -------------
     The primary color used to highlight identifiers and messages.

     • Supported Values: xterm color numbers 0 through 255.
     • Default Value:    68 (blue) for 256 color terminals,
                         4  (blue) for  8  color terminals.
nb set color_primary 105

[3] color_secondary

The color used for lines and footer elements.
[3]  color_secondary
     ---------------
     The color used for lines and footer elements.

     • Supported Values: xterm color numbers 0 through 255.
     • Default Value:    8
nb set color_secondary 240

[4] color_theme

The overall color theme for nb.
[4]  color_theme
     -----------
     The color theme.

     • Available themes:
         blacklight  console  desert  electro  forest
         nb  ocean  raspberry  smoke  unicorn  utility

     • Default Value: nb
nb set color_theme ocean
nb set color_theme blacklight
To change the syntax highlighting theme separately, use nb set syntax_theme.

[5] default_extension

The default file extension for new notes.
[5]  default_extension
     -----------------
     The default extension to use for note files. Change to "org" for
     Org files, "rst" for reStructuredText, "txt" for plain text, or
     whatever you prefer.

     • Default Value: md
nb set default_extension org
nb set default_extension txt

[6] editor

The command line text editor used by nb.
[6]  editor
     ------
     The command line text editor used by `nb`.

     • Example Values: atom, code, emacs, hx, macdown, mate,
                       micro, nano, pico, subl, vi, vim
nb set editor vim
nb set 6 vim

[7] encryption_tool

The tool used for encrypting notes and bookmarks.
[7]  encryption_tool
     ---------------
     The tool used for encrypting notes.

     • Supported Values: openssl, gpg
     • Default Value:    openssl
nb set encryption_tool gpg

Controls whether nb and nb ls display the example-commands footer.
[8]  footer
     ------
     By default, `nb` and `nb ls` include a footer with example commands.
     To hide this footer, set this to "0".

     • Default Value: 1
nb set footer 0   # hide footer

[9] header

Controls the notebook header displayed above lists.
[9]  header
     ------
     Set the alignment, or hide the header with "0".

     • Supported Values:
         0  Hide Header
         1  Dynamic Alignment (default)
         2  Center Aligned
         3  Left Justified

     • Default Value: 1
nb set header 0   # hide header
nb set header 3   # left-justified

[10] limit

The maximum number of items shown in nb and nb ls lists.
[10] limit
     -----
     The maximum number of items included in the `nb` and `nb ls` lists.
     Set to `auto` to automatically limit output to the current terminal height.
     Set a maximum auto limit with `auto^<max>`, e.g., `auto^15`.

     • Example Values: 15, auto, auto^15, auto-2, auto+2
     • Default Value: 15
nb set limit 20
nb set limit auto
nb set limit auto^20

[11] nb_dir

The directory that contains all notebooks.
[11] nb_dir
     ------
     The location of the directory that contains the notebooks.

     For example, to sync all notebooks with Dropbox, create a folder at
     `~/Dropbox/Notes` and run: `nb settings set nb_dir ~/Dropbox/Notes`

     • Default Value: ~/.nb
nb set nb_dir ~/Dropbox/Notes

[12] syntax_theme

The syntax highlighting theme used when displaying notes with bat, highlight, or Pygments.
[12] syntax_theme
     ------------
     The syntax highlighting theme. View examples with: bat --list-themes

     • Available themes: 1337, DarkNeon, Dracula, GitHub,
       Monokai Extended, Nord, OneHalfDark, Solarized (dark),
       Solarized (light), TwoDark, base16, gruvbox, zenburn, …

     • Default Value: base16
nb set syntax_theme Dracula
nb set syntax_theme Nord

Examples

# view all settings
nb settings list --long

# set editor
nb set editor nano

# set the color theme
nb set color_theme forest

# get the current color_primary value
nb settings get color_primary

# restore default for color_primary
nb settings unset color_primary

# open ~/.nbrc in $EDITOR
nb settings edit

# view available colors
nb settings colors

Build docs developers (and LLMs) love