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 - Unix Shell|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|Bash]] 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 - colorized cat]]
- [`ncat`](https://nmap.org/ncat/)
- [[pandoc - Document Conversion]], [[pdftotext]]
- [[Ripgrep - Text Search]], [[ripgrep-all]]
- [`tig`](https://github.com/jonas/tig)
- [[w3m]], [[lynx]], [[links]]
- [[eza - file listing utility|eza]], [[lsd - file listing utility|lsd]]
- [[FFMPEG|ffplay]]
- [[ImageMagick]]
- [[glow - terminal markdown viewer]]
- [[ASCIIdoctor]]
- [[mpg123]], [[mplayer]]
- [[Pygments]]
- [[sc-im - spreadsheet]]
[Ack](https://beyondgrep.com/), [`afplay`](https://ss64.com/osx/afplay.html), [The Silver Searcher (`ag`)](https://github.com/ggreer/the_silver_searcher), [`catimg`](https://github.com/posva/catimg), [Chafa](https://github.com/hpjansson/chafa), [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), [`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), [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)), [Ranger](https://ranger.github.io/), [readability-cli](https://gitlab.com/gardenappl/readability-cli), [`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 - Document Conversion|pandoc]] 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
## Default Storage Location
```
~/.nb/
```
# Resources
- https://corymollet.com/posts/nb-notes-that-dont-suck/
- https://github.com/doctorfree/cheat-sheets-plus#nb
# References