```cardlink
url: https://xwmx.github.io/nb/#-bookmarks
title: "nb · command line and local web plain text note-taking, bookmarking, archiving, and knowledge base application"
description: "A CLI and local web plain text note-taking, bookmarking, archiving, and knowledge base application."
host: xwmx.github.io
favicon: data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAACQWAAAkFgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAon8IB59/AlSegwFunYgCVJ+RBhGdlAFcnZkAbp2eAkqcpwMxm6sBaJuxAzCbtwJim7wChZrAAlCaxgUHmsQEAKN+CQafgQJqnYUB2p6JA2WfkQYPnpYDdp2aAdmengNXnKgEMZutAsCbsgHNm7cCiZu9AnGZwwG8mMcCbo6pAACehgIAnYYCIJ2HAbeeigMYnpUFAJ6cBSednQK1nqAEE5irAACbsQKTm7MBlp++DwKZxgIAmccCPZjKAbuZzQQXnogCAJ2IAiCdigG8no0EHZ6XBQCenwUnnZ8CtZ6iBBOZrgAAm7MCkZu1AmqatAAAmcsEAJnLAx2YzQG9mc8EKJ2LAgCdigIenY0B152RAlqdlwAAnqEEL52iAbaepQQQmLAAAJu2ApObuAGbncQKBJjLAQCZzQJBmM8BupnRBBafiQUOnYsBep2OAdOdlAKsnZoChZ2gAaidowKVoKwOA5a3AACbuAKQm7sC0ZrCApCYyAF8mM0Bv5jPAmeTxgAAn4oGDJ6MA1WekANJnpcEIp2cAmudoAJsnaQDGp2jAgCVuwAAm7sCkJu9A3GZxAJUmcgCe5nNAkaa0QUGmdAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKjBJwCZuwAAnLkFFZu9AqSbvwNkmr4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACowSYAl7sAAJu6A1iavQGym8EDQprAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqcMpAJu9AACcvAUEnMAECJ3ECAKcwwcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAP//AAD//wAA//8AAAABAAAAAQAAiIgAAIiYAACIiAAAAIEAAAGBAAD/HwAA/x8AAP8fAAD//wAA//8AAA==
```
nb is a [[AGPLv3]] licensed commandline note management tool written in [[Bash - Unix Shell|Bash script]].
- [Website](https://xwmx.github.io/nb/)
- [Source](https://github.com/xwmx/nb)
> CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning & syncing, Pandoc conversion, + more, in a single portable script.
Formerly known as `notes.sh`.
# Notability
Multiple people have sent me links to it. It falls into a similar kind of [[Knowledge Management Systems]] category as [[Obsidian Editor]].
I find it interesting that it supports wikilinks like Obsidian.
As a commandline app, usage on mobile is severely hamstrung.
# Philosophy
There seems to have been an attempt to implement it in [[Go]] but it was abandoned in 2020.
Almost everything is contained within a single monolithic Bash script, which as of [[2023-12-29]] is over 26,000 lines long.
# System Support and Requirements
## Requirements
- Require [[git]] which it uses for change tracking.
- Requires that [[Bash - Unix Shell]] is installed, as it is written in Bash-flavoured shell script, but it interoperates with other shells.
- Requires a text editor which can be launched with arguments from the command shell.
## Optional Tools
- [`bat`](https://github.com/sharkdp/bat)
- [`ncat`](https://nmap.org/ncat/)
- [`pandoc`](https://pandoc.org/)
- [`rg`](https://github.com/BurntSushi/ripgrep)
- [`tig`](https://github.com/jonas/tig)
- [`w3m`](https://en.wikipedia.org/wiki/W3m)
[Ack](https://beyondgrep.com/), [`afplay`](https://ss64.com/osx/afplay.html), [`asciidoctor`](https://asciidoctor.org/), [The Silver Searcher (`ag`)](https://github.com/ggreer/the_silver_searcher), [`catimg`](https://github.com/posva/catimg), [Chafa](https://github.com/hpjansson/chafa), [`eza`](https://github.com/eza-community/eza), [`ffplay`](https://ffmpeg.org/ffplay.html), [ImageMagick](https://imagemagick.org/), [`glow`](https://github.com/charmbracelet/glow), [GnuPG](https://en.wikipedia.org/wiki/GNU_Privacy_Guard), [`highlight`](http://www.andre-simon.de/doku/highlight/en/highlight.php), [`imgcat`](https://www.iterm2.com/documentation-images.html), [`joshuto`](https://github.com/kamiyaa/joshuto), [kitty's `icat` kitten](https://sw.kovidgoyal.net/kitty/kittens/icat.html), [`lsd`](https://github.com/lsd-rs/lsd), [Links](https://en.wikipedia.org/wiki/Links_(web_browser)), [Lynx](https://en.wikipedia.org/wiki/Lynx_(web_browser)), [`mdcat`](https://github.com/swsnr/mdcat), [`mdless`](https://github.com/ttscoff/mdless), [`mdv`](https://github.com/axiros/terminal_markdown_viewer), [Midnight Commander (`mc`)](https://en.wikipedia.org/wiki/Midnight_Commander), [`mpg123`](https://en.wikipedia.org/wiki/Mpg123), [MPlayer](https://en.wikipedia.org/wiki/MPlayer), [ncat](https://nmap.org/ncat/), [note-link-janitor](https://github.com/andymatuschak/note-link-janitor) (via [plugin](https://github.com/xwmx/nb/blob/master/plugins/backlink.nb-plugin)), [`pdftotext`](https://en.wikipedia.org/wiki/Pdftotext), [Pygments](https://pygments.org/), [Ranger](https://ranger.github.io/), [readability-cli](https://gitlab.com/gardenappl/readability-cli), [`rga` / ripgrep-all](https://github.com/phiresky/ripgrep-all), [`sc-im`](https://github.com/andmarti1424/sc-im), [`termvisage`](https://github.com/AnonymouX47/termvisage), [`termpdf.py`](https://github.com/dsanson/termpdf.py), [Tidy-Viewer (`tv`)](https://github.com/alexhallam/tv), [`timg`](https://github.com/hzeller/timg), [vifm](https://vifm.info/), [`viu`](https://github.com/atanunq/viu), [VisiData](https://www.visidata.org/)
## Shell Support
> `nb` works perfectly with Zsh, fish, and any other shell set as your primary login shell, the system just needs to have Bash available on it.
# Features
- plain text data storage,
- [encryption](https://github.com/xwmx/nb#password-protected-encrypted-notes-and-bookmarks),
- [filtering](https://github.com/xwmx/nb#listing--filtering), [pinning](https://github.com/xwmx/nb#-pinning), [#tagging](https://github.com/xwmx/nb#-tagging), and [search](https://github.com/xwmx/nb#-search),
- [Git](https://git-scm.com/)-backed [versioning](https://github.com/xwmx/nb#-revision-history) and [syncing](https://github.com/xwmx/nb#-git-sync),
- [Pandoc](https://pandoc.org/)-backed [conversion](https://github.com/xwmx/nb#%EF%B8%8F-import--export),
- [[[wiki-style linking]]](https://github.com/xwmx/nb#-linking),
- terminal and GUI web [browsing](https://github.com/xwmx/nb#-browsing),
- inline [images](https://github.com/xwmx/nb#-images),
- [todos](https://github.com/xwmx/nb#-todos) with [tasks](https://github.com/xwmx/nb#%EF%B8%8F-tasks),
- global and local [notebooks](https://github.com/xwmx/nb#-notebooks),
- organization with [folders](https://github.com/xwmx/nb#-folders),
- customizable [color themes](https://github.com/xwmx/nb#-color-themes),
- extensibility through [plugins](https://github.com/xwmx/nb#-plugins),
> `nb` creates notes in text-based formats like [Markdown](https://en.wikipedia.org/wiki/Markdown), [Org](https://orgmode.org/), [LaTeX](https://www.latex-project.org/), and [AsciiDoc](https://asciidoc.org/), can work with files in any format, can import and export notes to many document formats, and can create private, password-protected encrypted notes and bookmarks. With `nb`, you can write notes using Vim, Emacs, VS Code, Sublime Text, and any other text editor you like, as well as terminal and GUI web browsers. `nb` works in any standard Linux / Unix environment, including macOS and Windows via WSL. [Optional dependencies](https://github.com/xwmx/nb#optional) can be installed to enhance functionality, but `nb` works great without them.
## Bookmarking
`nb` is also a powerful [bookmarking](https://github.com/xwmx/nb#-bookmarks) system featuring:
- locally-served, text-centric, distraction-free bookmark [browsing](https://github.com/xwmx/nb#-browsing) in terminal and GUI web browsers,
- local full-text search of cached page content with regular expression support,
- convenient filtering and listing,
- [Internet Archive Wayback Machine](https://archive.org/web/) snapshot lookup for broken links,
- tagging, pinning, linking, and full integration with other `nb` features.
## Syncing
`nb` uses [Git](https://git-scm.com/) in the background to automatically record changes and sync notebooks with remote repositories. `nb` can also be configured to sync notebooks using a general purpose syncing utility like Dropbox so notes can be edited in other apps on any device.
# Tips
Tools which may integrate well in an `nb` workflow:
- https://github.com/xwmx/nb/issues/68
# References
- https://corymollet.com/posts/nb-notes-that-dont-suck/
- https://github.com/doctorfree/cheat-sheets-plus#nb