{"id":13395231,"url":"https://github.com/xwmx/nb","last_synced_at":"2025-05-14T12:00:28.029Z","repository":{"id":37206413,"uuid":"49516849","full_name":"xwmx/nb","owner":"xwmx","description":"CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning \u0026 syncing, Pandoc conversion, + more, in a single portable script.","archived":false,"fork":false,"pushed_at":"2025-05-07T07:59:12.000Z","size":9634,"stargazers_count":7044,"open_issues_count":128,"forks_count":195,"subscribers_count":77,"default_branch":"master","last_synced_at":"2025-05-07T11:41:46.410Z","etag":null,"topics":["archiving","bash","bookmark-manager","bookmarks","cli","command-line","git","knowledge-base","markdown","note-taking","notebook","notes","notes-app","pandoc","productivity","shell","sync","vim","vscode","zettelkasten"],"latest_commit_sha":null,"homepage":"https://xwmx.github.io/nb","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xwmx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["xwmx"],"custom":"https://paypal.me/WilliamMelody"}},"created_at":"2016-01-12T17:27:26.000Z","updated_at":"2025-05-07T07:59:16.000Z","dependencies_parsed_at":"2024-02-29T13:18:10.987Z","dependency_job_id":"5c316217-d47f-460d-8e93-907076fda20b","html_url":"https://github.com/xwmx/nb","commit_stats":{"total_commits":7474,"total_committers":23,"mean_commits":"324.95652173913044","dds":"0.0070912496655071156","last_synced_commit":"b4b3a9d12051c617d41533acc06e246cee565cf3"},"previous_names":[],"tags_count":333,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Fnb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Fnb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Fnb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Fnb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xwmx","download_url":"https://codeload.github.com/xwmx/nb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253446381,"owners_count":21909945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archiving","bash","bookmark-manager","bookmarks","cli","command-line","git","knowledge-base","markdown","note-taking","notebook","notes","notes-app","pandoc","productivity","shell","sync","vim","vscode","zettelkasten"],"created_at":"2024-07-30T17:01:46.981Z","updated_at":"2025-05-14T12:00:27.981Z","avatar_url":"https://github.com/xwmx.png","language":"Shell","funding_links":["https://github.com/sponsors/xwmx","https://paypal.me/WilliamMelody"],"categories":["Shell","Productivity","Open Source","By Language","\u003ca name=\"data\"\u003e\u003c/a\u003edata","Software","bash","Tools","知识管理_wiki知识库","vim","cli","git","\u003ca name=\"note-taking\"\u003e\u003c/a\u003eNote taking","Uncategorized","其他工具","Note Taking \u0026 Knowledge","[↑](#-contents) Free","Table of Contents"],"sub_categories":["Note Taking and Lists","CLI","Shell","sh","资源传输下载","Uncategorized","命令行工具","Note Taking"],"readme":"\u003cp align=\"center\"\u003e\u003c/p\u003e\u003c!-- spacer --\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg  src=\"https://raw.githubusercontent.com/xwmx/nb/master/docs/assets/images/nb.png\"\n        alt=\"nb\"\n        width=\"200\"\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\u003c/p\u003e\u003c!-- spacer --\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/xwmx/nb/actions\" rel=\"nofollow\"\u003e\n    \u003cimg  src=\"https://img.shields.io/github/actions/workflow/status/xwmx/nb/tests.yml?branch=master\"\n          alt=\"Build Status\"\n          style=\"max-width:100%;\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\u0026nbsp;\u003c/div\u003e\u003c!-- spacer --\u003e\n\u003cbr/\u003e\n\n`nb` is a command line and local web\nnote‑taking, bookmarking, archiving,\nand knowledge base application\nwith:\n\n- plain text data storage,\n- [encryption](#password-protected-encrypted-notes-and-bookmarks),\n- [filtering](#listing--filtering), [pinning](#-pinning), [#tagging](#-tagging), and [search](#-search),\n- [Git](https://git-scm.com/)-backed [versioning](#-revision-history) and [syncing](#-git-sync),\n- [Pandoc](https://pandoc.org/)-backed [conversion](#%EF%B8%8F-import--export),\n- \u003ca href=\"#-linking\"\u003e[[wiki-style linking]]\u003c/a\u003e,\n- terminal and GUI web [browsing](#-browsing),\n- inline [images](#-images),\n- [todos](#-todos) with [tasks](#%EF%B8%8F-tasks),\n- global and local [notebooks](#-notebooks),\n- organization with [folders](#-folders),\n- customizable [color themes](#-color-themes),\n- extensibility through [plugins](#-plugins),\n\nand more, in a single portable script.\n\n`nb` creates notes in text-based formats like\n[Markdown](https://en.wikipedia.org/wiki/Markdown),\n[Org](https://orgmode.org/),\n[LaTeX](https://www.latex-project.org/),\nand [AsciiDoc](https://asciidoc.org/),\ncan work with files in any format,\ncan import and export notes to many document formats,\nand can create private, password-protected encrypted notes and bookmarks.\nWith `nb`, you can write notes using\nVim,\nEmacs,\nVS Code,\nSublime Text,\nand any other text editor you like,\nas well as terminal and GUI web browsers.\n`nb` works in any standard Linux / Unix environment,\nincluding macOS and Windows via WSL, MSYS, and Cygwin.\n[Optional dependencies](#optional) can be installed to enhance functionality,\nbut `nb` works great without them.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg  src=\"https://xwmx.github.io/misc/nb/images/nb-theme-nb-home.png\"\n        alt=\"home\"\n        width=\"450\"\u003e\n\u003c/div\u003e\n\n`nb` is also a powerful [bookmarking](#-bookmarks) system featuring:\n\n- locally-served, text-centric, distraction-free bookmark [browsing](#-browsing)\n  in terminal and GUI web browsers,\n- local full-text search of cached page content with regular expression support,\n- convenient filtering and listing,\n- [Internet Archive Wayback Machine](https://archive.org/web/) snapshot lookup\n  for broken links,\n- tagging, pinning, linking, and full integration with other `nb` features.\n\nPage information is\ndownloaded,\ncleaned up,\nstructured,\nand saved\ninto normal Markdown documents made for humans,\nso bookmarks are easy to view and edit just like any other note.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg  src=\"https://xwmx.github.io/misc/nb/images/gui-terminal-browse.png\"\n        alt=\"nb browse\"\n        width=\"500\"\u003e\n\u003c/div\u003e\n\n`nb` uses [Git](https://git-scm.com/) in the background to\nautomatically record changes and sync notebooks with remote repositories.\n`nb` can also be configured to\nsync notebooks using a general purpose syncing utility like Dropbox\nso notes can be edited in other apps on any device.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg  src=\"https://xwmx.github.io/misc/nb/images/terminal-empty.png\"\n        alt=\"nb list empty\"\n        width=\"450\"\u003e\n\u003c/div\u003e\n\n`nb` is designed to be portable, future-focused, and vendor independent,\nproviding a full-featured and intuitive experience within\na highly composable multimodal user-centric text interface.\nThe entire program is contained within\na single [well-tested](#tests) shell script\nthat can be\ninstalled, copied, or `curl`ed almost anywhere and just work,\nusing a strategy inspired by\n[progressive enhancement](https://en.wikipedia.org/wiki/Progressive_enhancement)\nfor various experience improvements in more capable environments.\n`nb` works great whether you have one notebook with just a few notes\nor dozens of notebooks containing thousands of notes, bookmarks, and other items.\n`nb` makes it easy to incorporate other tools, writing apps, and workflows.\n`nb` can be used a little, a lot, once in a while, or for just a subset of features.\n`nb` is flexible.\n\n\u003cdiv align=\"center\"\u003e\u0026nbsp;\u003c/div\u003e\u003c!-- spacer --\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003e\n  📝\n  🔖\n  🔍\n  🌍\n  🔒\n  ✅\n  🔄\n  🎨\n  📚\n  📌\n  📂\n  🌄\n  \u003c/sub\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\u0026nbsp;\u003c/p\u003e\u003c!-- spacer --\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch1 align=\"center\" id=\"nb\"\u003e\u003ccode\u003enb\u003c/code\u003e\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#overview\"\u003eOverview\u003c/a\u003e\u0026nbsp;\u0026nbsp;\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\u003c/p\u003e\u003c!-- spacer --\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"#-help\"\u003eHelp\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\u003c/p\u003e\u003c!-- spacer --\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"#top\"\u003e\u0026nbsp;↑\u0026nbsp;\u003c/a\u003e\n\u003c/div\u003e\n\n### Installation\n\n#### Dependencies\n\n##### Required\n\n- [Bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell))\n  - `nb` works perfectly with Zsh, fish, and any other shell\n    set as your primary login shell,\n    the system just needs to have Bash available on it.\n- [Git](https://git-scm.com/)\n- A text editor with command line support, such as:\n  - [Vim](https://en.wikipedia.org/wiki/Vim_\\(text_editor\\)),\n  - [Emacs](https://en.wikipedia.org/wiki/Emacs),\n  - [Visual Studio Code](https://code.visualstudio.com/),\n  - [Sublime Text](https://www.sublimetext.com/),\n  - [Helix](https://helix-editor.com/),\n  - [micro](https://github.com/zyedidia/micro),\n  - [nano](https://en.wikipedia.org/wiki/GNU_nano),\n  - [Atom](https://atom.io/),\n  - [TextMate](https://macromates.com/),\n  - [MacDown](https://macdown.uranusjr.com/),\n  - [some of these](https://github.com/topics/text-editor),\n  - [and many of these.](https://en.wikipedia.org/wiki/List_of_text_editors)\n\n##### Optional\n\n`nb` leverages standard command line tools\nand works in standard Linux / Unix environments.\n`nb` also checks the environment for some additional optional tools and\nuses them to enhance the experience whenever they are available.\n\nRecommended:\n\n- [`bat`](https://github.com/sharkdp/bat)\n- [`ncat`](https://nmap.org/ncat/) or [`socat`](https://www.kali.org/tools/socat/)\n- [`pandoc`](https://pandoc.org/)\n- [`rg`](https://github.com/BurntSushi/ripgrep)\n- [`tig`](https://github.com/jonas/tig)\n- [`w3m`](https://en.wikipedia.org/wiki/W3m)\n\nAlso supported for various enhancements:\n\n[Ack](https://beyondgrep.com/),\n[`afplay`](https://ss64.com/osx/afplay.html),\n[`asciidoctor`](https://asciidoctor.org/),\n[The Silver Searcher (`ag`)](https://github.com/ggreer/the_silver_searcher),\n[`catimg`](https://github.com/posva/catimg),\n[Chafa](https://github.com/hpjansson/chafa),\n[Chromium](https://www.chromium.org) / [Chrome](https://www.google.com/chrome/),\n[`eza`](https://github.com/eza-community/eza),\n[`ffplay`](https://ffmpeg.org/ffplay.html),\n[ImageMagick](https://imagemagick.org/),\n[`glow`](https://github.com/charmbracelet/glow),\n[GnuPG](https://en.wikipedia.org/wiki/GNU_Privacy_Guard),\n[`highlight`](http://www.andre-simon.de/doku/highlight/en/highlight.php),\n[`imgcat`](https://www.iterm2.com/documentation-images.html),\n[`joshuto`](https://github.com/kamiyaa/joshuto),\n[kitty's `icat` kitten](https://sw.kovidgoyal.net/kitty/kittens/icat.html),\n[`lowdown`](https://kristaps.bsd.lv/lowdown),\n[`lsd`](https://github.com/lsd-rs/lsd),\n[Links](https://en.wikipedia.org/wiki/Links_(web_browser)),\n[Lynx](https://en.wikipedia.org/wiki/Lynx_(web_browser)),\n[`mdcat`](https://github.com/swsnr/mdcat),\n[`mdless`](https://github.com/ttscoff/mdless),\n[`mdv`](https://github.com/axiros/terminal_markdown_viewer),\n[Midnight Commander (`mc`)](https://en.wikipedia.org/wiki/Midnight_Commander),\n[`mpg123`](https://en.wikipedia.org/wiki/Mpg123),\n[MPlayer](https://en.wikipedia.org/wiki/MPlayer),\n[`ncat`](https://nmap.org/ncat/),\n[`netcat`](https://netcat.sourceforge.net/),\n[note-link-janitor](https://github.com/andymatuschak/note-link-janitor)\n(via [plugin](https://github.com/xwmx/nb/blob/master/plugins/backlink.nb-plugin)),\n[`pdftotext`](https://en.wikipedia.org/wiki/Pdftotext),\n[Pygments](https://pygments.org/),\n[Ranger](https://ranger.github.io/),\n[readability-cli](https://gitlab.com/gardenappl/readability-cli),\n[`rga` / ripgrep-all](https://github.com/phiresky/ripgrep-all),\n[`sc-im`](https://github.com/andmarti1424/sc-im),\n[`socat`](https://www.kali.org/tools/socat/),\n[`termvisage`](https://github.com/AnonymouX47/termvisage),\n[`termpdf.py`](https://github.com/dsanson/termpdf.py),\n[Tidy-Viewer (`tv`)](https://github.com/alexhallam/tv),\n[`timg`](https://github.com/hzeller/timg),\n[vifm](https://vifm.info/),\n[`viu`](https://github.com/atanunq/viu),\n[VisiData](https://www.visidata.org/)\n\n#### macOS / Homebrew\n\n```bash\nbrew install xwmx/taps/nb\n```\n\nInstalling `nb` with Homebrew also installs\nthe recommended dependencies above\nand completion scripts for Bash, Zsh, and Fish.\n\nInstall the latest development version from the repository with:\n\n```bash\nbrew install xwmx/taps/nb --head\n```\n\n`nb` is also available in\n[homebrew-core](https://github.com/Homebrew/homebrew-core).\nInstalling it together with the `bash` formula is recommended:\n\n```bash\nbrew install nb bash\n```\n\n#### Ubuntu, Windows, and others\n\n##### npm\n\n```bash\nnpm install -g nb.sh\n```\n\nAfter `npm` installation completes, run\n`sudo \"$(which nb)\" completions install`\nto install Bash and Zsh completion scripts (recommended).\n\nOn Ubuntu and WSL, you can\nrun [`sudo \"$(which nb)\" env install`](#env)\nto install the optional dependencies.\n\nWhen `nb` is installed on Windows,\n`socat` ([MSYS](https://packages.msys2.org/package/socat),\n[Cygwin](https://cygwin.com/packages/summary/socat.html)) is recommended.\n\n*`nb` is also available under its original package name,\n[notes.sh](https://www.npmjs.com/package/notes.sh),\nwhich comes with an extra `notes` executable wrapping `nb`.*\n\n##### Download and Install\n\nTo install as an administrator,\ncopy and paste one of the following multi-line commands:\n\n```bash\n# install using wget\nsudo wget https://raw.github.com/xwmx/nb/master/nb -O /usr/local/bin/nb \u0026\u0026\n  sudo chmod +x /usr/local/bin/nb \u0026\u0026\n  sudo nb completions install\n\n# install using curl\nsudo curl -L https://raw.github.com/xwmx/nb/master/nb -o /usr/local/bin/nb \u0026\u0026\n  sudo chmod +x /usr/local/bin/nb \u0026\u0026\n  sudo nb completions install\n```\n\nOn Ubuntu and WSL, you can\nrun [`sudo nb env install`](#env) to install the optional dependencies.\n\n###### User-only Installation\n\nTo install with just user permissions, simply\nadd the `nb` script to your `$PATH`.\nIf you already have a `~/bin` directory, for example, you can\nuse one of the following commands:\n\n```bash\n# download with wget\nwget https://raw.github.com/xwmx/nb/master/nb -O ~/bin/nb \u0026\u0026 chmod +x ~/bin/nb\n\n# download with curl\ncurl -L https://raw.github.com/xwmx/nb/master/nb -o ~/bin/nb \u0026\u0026 chmod +x ~/bin/nb\n```\n\nInstalling with just user permissions doesn't include\nthe optional dependencies or completions,\nbut `nb` core functionality works without them.\nIf you have `sudo` access and want\nto install the completion scripts and dependencies, run the following command:\n\n```bash\nsudo nb env install\n```\n\n##### Make\n\nTo install with [Make](https://en.wikipedia.org/wiki/Make_(software)),\nclone this repository, navigate to the clone's root directory, and run:\n\n```bash\nsudo make install\n```\n\nThis will also install the completion scripts on all systems and\nthe recommended dependencies on Ubuntu and WSL.\n\n##### bpkg\n\nTo install with [bpkg](https://github.com/bpkg/bpkg):\n\n```bash\nbpkg install xwmx/nb\n```\n\n##### basher\n\nTo install with [basher](https://www.basher.it/):\n\n```bash\nbasher install xwmx/nb\n```\n\n#### Tab Completion\n\nBash, Fish, and Zsh tab completion should be enabled\nwhen `nb` is installed using the methods above,\nassuming you have the appropriate system permissions or installed with `sudo`.\nIf completion isn't working after installing `nb`, see the\n[completion installation instructions](https://github.com/xwmx/nb/tree/master/etc).\n\n#### Updating\n\nWhen `nb` is installed using a package manager like npm or Homebrew,\nuse the package manager's upgrade functionality to update `nb` to\nthe latest version.\nWhen installed via other methods,\n`nb` can be updated to the latest version using\nthe [`nb update`](#update) subcommand.\n\n## Overview\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"#-notes\"\u003e\u003ccode\u003e📝\u003c/code\u003e\u0026nbsp;Notes\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#adding\"\u003eAdding\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#listing--filtering\"\u003eListing\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#editing\"\u003eEditing\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#viewing\"\u003eViewing\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#deleting\"\u003eDeleting\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-bookmarks\"\u003e\u003ccode\u003e🔖\u003c/code\u003e\u0026nbsp;Bookmarks\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-todos\"\u003e\u003ccode\u003e✅\u003c/code\u003e\u0026nbsp;Todos\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#%EF%B8%8F-tasks\"\u003e\u003ccode\u003e✔️\u003c/code\u003e\u0026nbsp;Tasks\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-tagging\"\u003e\u003ccode\u003e🏷\u003c/code\u003e\u0026nbsp;Tagging\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-linking\"\u003e\u003ccode\u003e🔗\u003c/code\u003e\u0026nbsp;Linking\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-browsing\"\u003e\u003ccode\u003e🌍\u003c/code\u003e\u0026nbsp;Browsing\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-images\"\u003e\u003ccode\u003e🌄\u003c/code\u003e\u0026nbsp;Images\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-zettelkasten\"\u003e\u003ccode\u003e🗂\u003c/code\u003e\u0026nbsp;Zettelkasten\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-folders\"\u003e\u003ccode\u003e📂\u003c/code\u003e\u0026nbsp;Folders\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-pinning\"\u003e\u003ccode\u003e📌\u003c/code\u003e\u0026nbsp;Pinning\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-search\"\u003e\u003ccode\u003e🔍\u003c/code\u003e\u0026nbsp;Search\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-moving--renaming\"\u003e\u003ccode\u003e↔\u003c/code\u003e\u0026nbsp;Moving\u0026nbsp;\u0026\u0026nbsp;Renaming\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-revision-history\"\u003e\u003ccode\u003e🗒\u003c/code\u003e\u0026nbsp;History\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-notebooks\"\u003e\u003ccode\u003e📚\u003c/code\u003e\u0026nbsp;Notebooks\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-git-sync\"\u003e\u003ccode\u003e🔄\u003c/code\u003e\u0026nbsp;Git\u0026nbsp;Sync\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#%EF%B8%8F-import--export\"\u003e\u003ccode\u003e↕️\u003c/code\u003e\u0026nbsp;Import\u0026nbsp;/\u0026nbsp;Export\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#%EF%B8%8F-set--settings\"\u003e\u003ccode\u003e⚙️\u003c/code\u003e\u003ccode\u003eset\u003c/code\u003e\u0026\u003ccode\u003esettings\u003c/code\u003e\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-color-themes\"\u003e\u003ccode\u003e🎨\u003c/code\u003e\u0026nbsp;Color\u0026nbsp;Themes\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-plugins\"\u003e\u003ccode\u003e🔌\u003c/code\u003e\u0026nbsp;Plugins\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-selectors\"\u003e\u003ccode\u003e:/\u003c/code\u003e\u0026nbsp;Selectors\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#01-metadata\"\u003e\u003ccode\u003e01\u003c/code\u003e\u0026nbsp;Metadata\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-interactive-shell\"\u003e\u003ccode\u003e❯\u003c/code\u003e\u0026nbsp;Shell\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#shortcut-aliases\"\u003eShortcuts\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-help\"\u003e\u003ccode\u003e?\u003c/code\u003e\u0026nbsp;Help\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#-variables\"\u003e\u003ccode\u003e$\u003c/code\u003e\u0026nbsp;Variables\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#specifications\"\u003eSpecifications\u003c/a\u003e\u0026nbsp;·\n  \u003ca href=\"#tests\"\u003eTests\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\u003c/p\u003e\u003c!-- spacer --\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"#nb\"\u003e\u0026nbsp;↑\u0026nbsp;\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\u003c/p\u003e\u003c!-- spacer --\u003e\n\nTo get started, simply run:\n\n```bash\nnb\n```\n\n`nb` sets up your initial `home` notebook the first time it runs.\n\nBy default, notebooks and notes are global (at `~/.nb`),\nso they are always available to `nb`\nregardless of the current working directory.\n`nb` also supports [local notebooks](#global-and-local-notebooks).\n\n### 📝 Notes\n\n#### Adding\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#add\"\u003e\u003ccode\u003enb add\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#browse\"\u003e\u003ccode\u003enb browse add\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\nUse [`nb add`](#add) (shortcuts: [`nb a`](#add), [`nb +`](#add))\nto create new notes:\n\n```bash\n# create a new note in your text editor\nnb add\n\n# create a new note with the filename \"example.md\"\nnb add example.md\n\n# create a new note containing \"This is a note.\"\nnb add \"This is a note.\"\n\n# create a new note with piped content\necho \"Note content.\" | nb add\n\n# create a new password-protected, encrypted note titled \"Secret Document\"\nnb add --title \"Secret Document\" --encrypt\n\n# create a new note in the notebook named \"example\"\nnb example:add \"This is a note.\"\n\n# create a new note in the folder named \"sample\"\nnb add sample/\n```\n\n[`nb add`](#add) with no arguments or input will open the new, blank note\nin your environment's preferred text editor.\nYou can change your editor using\nthe `$EDITOR` environment variable\nor [`nb set editor`](#editor).\n\n`nb` files are [Markdown](https://daringfireball.net/projects/markdown/)\nfiles by default. The default file type can be changed to\nwhatever you like\nusing [`nb set default_extension`](#default_extension).\n\n[`nb add`](#add) has intelligent argument parsing\nand behaves differently depending on the types of arguments it receives.\nWhen a filename with extension is specified,\na new note with that filename is opened in the editor:\n\n```bash\nnb add example.md\n```\n\nWhen a string is specified, a new note is immediately created\nwith that string as the content and without opening the editor:\n\n```bash\n❯ nb add \"This is a note.\"\nAdded: [1] 20200101000000.md\n```\n\n[`nb add \u003cstring\u003e`](#add) is useful for quickly jotting down notes directly\nvia the command line. Quoting content is optional, but recommended.\n\nWhen no filename is specified, [`nb add`](#add) uses the current datetime as\nthe filename.\n\n[`nb add`](#add) can also receive piped content, which behaves the same as\n[`nb add \u003cstring\u003e`](#add):\n\n```bash\n# create a new note containing \"Note content.\"\n❯ echo \"Note content.\" | nb add\nAdded: [6] 20200101000100.md\n\n# create a new note containing the clipboard contents on macOS\n❯ pbpaste | nb add\nAdded: [7] 20200101000200.md\n\n# create a new note containing the clipboard contents using xclip\n❯ xclip -o | nb add\nAdded: [8] 20200101000300.md\n```\n\nContent can be passed with the [`--content \u003ccontent\u003e`](#add) option,\nwhich also creates a new note without opening the editor:\n\n```bash\nnb add --content \"Note content.\"\n```\n\nWhen content is piped,\nspecified with [`--content \u003ccontent\u003e`](#add),\nor passed as a string argument,\nuse the [`--edit`](#add) flag to open the file in the editor\nbefore the change is committed.\n\nThe title, filename, and content can also be specified with long and\nshort options:\n\n```bash\n❯ nb add --filename \"example.md\" -t \"Example Title\" -c \"Example content.\"\nAdded: [9] example.md \"Example Title\"\n```\n\nThe [`-t \u003ctitle\u003e`](#add) / [`--title \u003ctitle\u003e`](#add) option also\nsets the filename to the title,\nlowercased with spaces and non-filename characters replaced with underscores:\n\n```bash\n❯ nb add --title \"Example Title\" \"Example content.\"\nAdded: [10] example_title.md \"Example Title\"\n```\n\nTags can be added with the [`--tags \u003ctag1\u003e,\u003ctag2\u003e...`](#add) option, which\ntakes a comma separated list of tags,\nconverts them to [#hashtags](#-tagging),\nand inserts them between the title and content:\n\n```bash\n❯ nb add \"Example content.\" --title \"Tagged Example\" --tags tag1,tag2\nAdded: [11] tagged_example.md \"Tagged Example\"\n\n❯ nb show 11 --print\n# Tagged Example\n\n#tag1 #tag2\n\nExample content.\n```\n\n[Search](#-search) for tagged items with\n[`nb search`](#search) / [`nb q`](#search):\n\n```bash\n# search for items tagged with \"#tag1\"\nnb search --tag tag1\n\n# search for items tagged with \"#tag1\" AND \"#tag2\", short options\nnb q -t tag1 -t tag2\n\n# search for items tagged with \"#tag1\" OR \"#tag2\", arguments\nnb q \\#tag1 --or \\#tag2\n```\n\nFiles can be created with any file type by specifying the extension either\nin the filename (`example.md`),\nthe extension by itself (`.md`),\nor via the [`--type \u003ctype\u003e`](#add) option (`--type md`):\n\n```bash\n# open a new Org file in the editor\nnb add example.org\n\n# open a new reStructuredText file in the editor\nnb add --type rst\n\n# open a new JavaScript file in the editor\nnb add .js\n```\n\nCombining a type argument with piped clipboard content provides\na very convenient way to save code snippets using a clipboard utility such as\n`pbpaste`,\n`xclip`,\nor [`pb`](https://github.com/xwmx/pb):\n\n```bash\n# save the clipboard contents as a JavaScript file in the current notebook\npb | nb add .js\n\n# save the clipboard contents as a Rust file in the \"rust\" notebook\n# using the shortcut alias `nb a`\npb | nb a rust: .rs\n\n# save the clipboard contents as a Haskell file named \"example.hs\" in the\n# \"snippets\" notebook using the shortcut alias `nb +`\npb | nb + snippets: example.hs\n```\n\nUse [`nb show`](#show) and [`nb browse`](#browse) to view code snippets\nwith automatic syntax highlighting and\nuse [`nb edit`](#edit) to open in your editor.\n\nThe [`clip` plugin](#clip) can also be used to\ncreate notes from clipboard content.\n\nPiping,\n[`--title \u003ctitle\u003e`](#add),\n[`--tags \u003ctag-list\u003e`](#add),\n[`--content \u003ccontent\u003e`](#add),\nand content passed in an argument\ncan be combined as needed\nto create notes with content from multiple input methods and sources\nusing a single command:\n\n```bash\n❯ pb | nb add \"Argument content.\" \\\n    --title   \"Sample Title\"      \\\n    --tags    tag1,tag2           \\\n    --content \"Option content.\"\nAdded: [12] sample_title.md \"Sample Title\"\n\n❯ nb show 12 --print\n# Sample Title\n\n#tag1 #tag2\n\nArgument content.\n\nOption content.\n\nClipboard content.\n```\n\nFor a full list of options available for [`nb add`](#add), run\n[`nb help add`](#add).\n\n##### Password-Protected Encrypted Notes and Bookmarks\n\nPassword-protected notes and [bookmarks](#-bookmarks) are\ncreated with the [`-e`](#add) / [`--encrypt`](#add) flag and\nencrypted with AES-256 using OpenSSL by default.\nGPG is also supported and can be configured with\n[`nb set encryption_tool`](#encryption_tool).\n\nEach protected note and bookmark is\nencrypted individually with its own password.\nWhen an encrypted item is viewed, edited, or opened,\n`nb` will simply prompt for the item's password before proceeding.\nAfter an item is edited,\n`nb` automatically re-encrypts it and saves the new version.\n\nEncrypted notes can be decrypted\nusing the OpenSSL and GPG command line tools directly, so\nyou aren't dependent on `nb` to decrypt your files.\n\n##### Templates\n\nCreate a note based on a template by assigning a template string\nor path to a template file with [`add --template \u003ctemplate\u003e`](#add):\n\n\u003c!-- {% raw %} --\u003e\n```bash\n# create a new note based on a template specified by path\nnb add --template /path/to/example/template\n\n# create a new note based on a template defined as a string\nnb add --template \"{{title}} • {{content}}\"\n```\n\u003c!-- {% endraw %} --\u003e\n\n`nb` template tags are enclosed in double curly brackets.\nSupported tags include:\n\n\u003cdl\u003e\n  \u003cdt\u003e\u003ccode\u003e\u0026#x007B;{title}}\u003c/code\u003e\u003c/dt\u003e\n  \u003cdd\u003eThe note title, as specified with\n  \u003ca href=\"#add\"\u003e\u003ccode\u003eadd --title \u0026#60;title\u003e\u003c/code\u003e\u003c/a\u003e\u003c/dd\u003e\n  \u003cdt\u003e\u003ccode\u003e\u0026#x007B;\u0026#x007B;tags}}\u003c/code\u003e\u003c/dt\u003e\n  \u003cdd\u003eA list of hashtags, as specified with\n  \u003ca href=\"#add\"\u003e\u003ccode\u003eadd --tags \u0026#60;tag1\u003e,\u0026#60;tag2\u003e\u003c/code\u003e\u003c/a\u003e\u003c/dd\u003e\n  \u003cdt\u003e\u003ccode\u003e\u0026#x007B;{content}}\u003c/code\u003e\u003c/dt\u003e\n  \u003cdd\u003eThe note content, as specified with\n  \u003ca href=\"#add\"\u003e\u003ccode\u003eadd \u0026#60;content\u003e\u003c/code\u003e\u003c/a\u003e,\n  \u003ca href=\"#add\"\u003e\u003ccode\u003eadd --content \u0026#60;content\u003e\u003c/code\u003e\u003c/a\u003e,\n  and piped content.\u003c/dd\u003e\n  \u003cdt\u003e\u003ccode\u003e\u0026#x007B;{date}}\u003c/code\u003e\u003c/dt\u003e\n  \u003cdd\u003eThe ouput of the system's \u003ccode\u003edate\u003c/code\u003e command. Use the\n  \u003ca href=\"https://man7.org/linux/man-pages/man1/date.1.html\"\u003e\u003ccode\u003edate\u003c/code\u003e\n  command options\u003c/a\u003e to control formatting, e.g.,\n  \u003ccode\u003e\u0026#x007B;{date +\"%Y-%m-%d\"}}\u003c/code\u003e.\n \u003c/dd\u003e\n\u003c/dl\u003e\n\nAn example complete markdown template could look like the following:\n\n\u003c!-- {% raw %} --\u003e\n```\n# {{title}}\n\n{{date +\"%Y-%m-%d\"}}\n\n{{tags}}\n\n{{content}}\n```\n\u003c!-- {% endraw %} --\u003e\n\nTemplates are Bash strings processed with `eval`, so you can use\ncommand substitution (`$(echo \"Example command\")`) to include\nthe output from command line tools and shell code.\n\nA default template can be configured by assigning a string or path\nto the [`$NB_DEFAULT_TEMPLATE`](#nb_default_template) variable\nin your `~/.nbrc` file:\n\n\u003c!-- {% raw %} --\u003e\n```bash\n# set the default template to a path\nexport NB_DEFAULT_TEMPLATE=\"/path/to/example/template\"\n\n# set the default template with a string\nexport NB_DEFAULT_TEMPLATE=\"{{title}} • {{content}}\"\n```\n\u003c!-- {% endraw %} --\u003e\n\nUse [`nb add --no-template`](#add) to skip using a template when\none is assigned.\n\n##### Shortcut Aliases: `nb a`, `nb +`\n\n`nb` includes shortcuts for many commands, including\n[`nb a`](#add) and [`nb +`](#add) for [`nb add`](#add):\n\n```bash\n# create a new note in your text editor\nnb a\n\n# create a new note with the filename \"example.md\"\nnb a example.md\n\n# create a new note containing \"This is a note.\"\nnb + \"This is a note.\"\n\n# create a new note containing the clipboard contents with xclip\nxclip -o | nb +\n\n# create a new note in the notebook named \"example\"\nnb example:a\n```\n\n##### Other Aliases: `nb create`, `nb new`\n\n[`nb add`](#add) can also be invoked with\n[`nb create`](#add) and [`nb new`](#add) for convenience:\n\n```bash\n# create a new note containing \"Example note content.\"\nnb new \"Example note content.\"\n\n# create a new note with the title \"Example Note Title\"\nnb create --title \"Example Note Title\"\n```\n\n##### Adding with `nb browse`\n\nItems can also be added within terminal and GUI web browsers using\n[`nb browse add`](#browse) / [`nb b a`](#browse):\n\n```bash\n❯ nb browse add\n❯nb · home : +\n\n[                                                     ]\n[                                                     ]\n[                                                     ]\n[                                                     ]\n[                                                     ]\n[                                                     ]\n[                                                     ]\n[                                                     ]\n[                                                     ]\n[                                                     ]\n\n[add]\n```\n\nPass a filename, relative path, and / or notebook name to\ncreate a new note at that location:\n\n```bash\n# open the add form in the browser to create the file \"file.md\" in the folder \"example\"\nnb browse add \"example/file.md\"\n```\n\n[`nb browse add`](#browse) includes options for quickly\npre-populating new notes with content:\n\n```bash\n❯ nb browse add --title \"Example Title\" --content \"Example content.\" --tags tag1,tag2\n❯nb · home : +\n\n[# Example Title                                      ]\n[                                                     ]\n[#tag1 #tag2                                          ]\n[                                                     ]\n[Example content.                                     ]\n[                                                     ]\n[                                                     ]\n[                                                     ]\n[                                                     ]\n[                                                     ]\n\n[add]\n```\n\n[`nb browse add`](#browse) can also be opened with\n[`nb add --browse`](#add) / [`nb a -b`](#add).\n\nFor more information, see [Browsing](#-browsing).\n\n#### Listing \u0026 Filtering\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#ls\"\u003e\u003ccode\u003enb ls\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#list\"\u003e\u003ccode\u003enb list\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#browse\"\u003e\u003ccode\u003enb browse\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\nTo list notes and notebooks, run [`nb ls`](#ls) (shortcut alias: `nb`):\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg  src=\"https://xwmx.github.io/misc/nb/images/nb-theme-utility-home.png\"\n        alt=\"nb ls\"\n        width=\"450\"\u003e\n\u003c/div\u003e\n\nNotebooks are listed above the line,\nwith the current notebook highlighted and/or underlined,\ndepending on terminal capabilities.\n[`nb ls`](#ls) also includes a footer with example commands for easy reference.\nThe notebook header and command footer can be configured or hidden with\n[`nb set header`](#header) and\n[`nb set footer`](#footer).\n\n```bash\n❯ nb ls\nhome\n----\n[3] example.md · \"Example content.\"\n[2] sample.md · \"Sample content.\"\n[1] demo.md · \"- Demo list item one.\"\n```\n\nNotes from the current notebook are listed in the order they were last modified.\nBy default, each note is listed with its\nid, filename, and an excerpt from the first line of the note.\nWhen a note has a title, the title is displayed\ninstead of the filename and first line.\n\nMarkdown titles can be defined within a note using\n[either Markdown `h1` style](https://daringfireball.net/projects/markdown/syntax#header)\nor [YAML front matter](#front-matter):\n\n```markdown\n# Example Title\n```\n\n```markdown\nSample Title\n============\n```\n\n```markdown\n---\ntitle: Demo Title\n---\n```\n\n[Org](https://orgmode.org/),\n[LaTeX](https://www.latex-project.org/),\nand [AsciiDoc](https://asciidoc.org/)\ntitles are recognized in `.org`,`.latex`, and `.asciidoc` / `.adoc` files:\n\n```text\n#+title: Example Org Title\n```\n\n```latex\n\\title{Example LaTeX Title}\n```\n\n```asciidoc\n= Example AsciiDoc Title\n```\n\nOnce defined, titles are displayed in place of the filename and first line\nin the output of [`nb ls`](#ls):\n\n```bash\n❯ nb ls\nhome\n----\n[3] Example Title\n[2] Sample Title\n[1] Demo Title\n```\n\nPass an id, filename, or title to view the listing for that note:\n\n```bash\n❯ nb ls Sample\\ Title\n[2] Sample Title\n\n❯ nb ls 3\n[3] Example Title\n```\n\nIf there is no exact match, `nb` will list items with\ntitles and filenames that fuzzy match the query:\n\n```bash\n❯ nb ls exa\n[3] Example Title\n\n❯ nb ls ample\n[3] Example Title\n[2] Sample Title\n```\n\nMultiple words act like an `OR` filter, listing any\ntitles or filenames that match any of the words:\n\n```bash\n❯ nb ls example demo\n[3] Example Title\n[1] Demo Title\n```\n\nWhen multiple words are quoted, filter titles and filenames for that phrase:\n\n```bash\n❯ nb ls \"example title\"\n[3] Example Title\n```\n\nFor full text search, see [Search](#-search).\n\nTo view excerpts of notes, use the [`--excerpt`](#ls) or [`-e`](#ls) option,\nwhich optionally accepts a length:\n\n```bash\n❯ nb ls 3 --excerpt\n[3] Example Title\n-----------------\n# Example Title\n\nThis is an example excerpt.\n\n❯ nb ls 3 -e 8\n[3] Example Title\n-----------------\n# Example Title\n\nThis is an example excerpt.\n\nMore example content:\n\n- one\n- two\n```\n\nSeveral classes of file types are represented with emoji\n[indicators](#indicators) to make them easily identifiable in lists.\nFor example, bookmarks and encrypted notes are listed with `🔖` and `🔒`:\n\n```bash\n❯ nb ls\nhome\n----\n[4] Example Note\n[3] 🔒 encrypted-note.md.enc\n[2] 🔖 Example Bookmark (example.com)\n[1] 🔖 🔒 encrypted.bookmark.md.enc\n```\n\nFile types include:\n\n```text\n 🔉  Audio\n 📖  Book\n 🔖  Bookmark\n 🔒  Encrypted\n 📂  Folder\n 🌄  Image\n 📄  PDF, Word, or Open Office document\n 📹  Video\n```\n\nBy default, items are listed starting with the most recently modified.\nTo reverse the order, use the [`-r`](#ls) or [`--reverse`](#ls) flag:\n\n```bash\n❯ nb ls\nhome\n----\n[2] Todos\n[3] Example Title\n[1] Ideas\n\n❯ nb ls --reverse\n[1] Ideas\n[3] Example Title\n[2] Todos\n```\n\nNotes can be sorted with the [`-s`](#ls) / [`--sort`](#ls) flag,\nwhich can be combined with [`-r`](#ls) / [`--reverse`](#ls):\n\n```bash\n❯ nb ls\nhome\n----\n[2] Sample Title\n[3] Example Title\n[1] Demo Title\n\n❯ nb ls --sort\n[1] Demo Title\n[2] Sample Title\n[3] Example Title\n\n❯ nb ls --sort --reverse\n[3] Example Title\n[2] Sample Title\n[1] Demo Title\n```\n\n`nb` with no subcommand behaves like an alias for [`nb ls`](#ls),\nso the examples above can be run without the `ls`:\n\n```bash\n❯ nb\nhome\n----\n[2] Sample Title\n[3] Example Title\n[1] Demo Title\n\n❯ nb example\n[3] Example Title\n\n❯ nb 3 --excerpt\n[3] Example Title\n-----------------\n# Example Title\n\nThis is an example excerpt.\n\n❯ nb 3 -e 8\n[3] Example Title\n-----------------\n# Example Title\n\nThis is an example excerpt.\n\nMore example content:\n\n- one\n- two\n\n❯ nb --sort\n[1] Demo Title\n[2] Sample Title\n[3] Example Title\n\n❯ nb --sort --reverse\n[3] Example Title\n[2] Sample Title\n[1] Demo Title\n```\n\nShort options can be combined for brevity:\n\n```bash\n# equivalent to `nb --sort --reverse --excerpt 2` and `nb -s -r -e 2`:\n❯ nb -sre 2\n[3] Example Title\n-----------------\n# Example Title\n\n[2] Sample Title\n----------------\nSample Title\n============\n[1] Demo Title\n--------------\n---\ntitle: Demo Title\n```\n\n`nb` and [`nb ls`](#ls) display the 15 most recently modified items.\nThe default limit can be changed with [`nb set limit \u003cnumber\u003e`](#limit).\nTo list a different number of items on a per-command basis, use the\n[`-n \u003climit\u003e`](#ls),\n[`--limit \u003climit\u003e`](#ls),\n[`--\u003climit\u003e`](#ls),\n[`-a`](#ls),\nand [`--all`](#ls)\nflags:\n\n```bash\n❯ nb -n 1\nhome\n----\n[5] Example Five\n4 omitted. 5 total.\n\n❯ nb --limit 2\nhome\n----\n[5] Example Five\n[4] Example Four\n3 omitted. 5 total.\n\n❯ nb --3\nhome\n----\n[5] Example Five\n[4] Example Four\n[3] Example Three\n2 omitted. 5 total.\n\n❯ nb --all\nhome\n----\n[5] Example Five\n[4] Example Four\n[3] Example Three\n[2] Example Two\n[1] Example One\n```\n\nLists can be paginated with\n[`-p \u003cnumber\u003e`](#ls) / [`--page \u003cnumber\u003e`](#ls),\nwhich paginates by the value of [`nb set limit`](#limit) by\ndefault, or the value of\n[`-n \u003climit\u003e`](#ls),\n[`--limit \u003climit\u003e`](#ls),\nor [`--\u003climit\u003e`](#ls)\nwhen present:\n\n```bash\n❯ nb\nhome\n----\n[6] Example Six\n[5] Example Five\n[4] Example Four\n[3] Example Three\n[2] Example Two\n[1] Example One\n\n❯ nb set limit 3\nNB_LIMIT set to 3\n\n❯ nb --page 1\n[6] Example Six\n[5] Example Five\n[4] Example Four\n\n❯ nb -p 2\n[3] Example Three\n[2] Example Two\n[1] Example One\n\n❯ nb -p 2 --limit 2\n[4] Example Four\n[3] Example Three\n\n❯ nb -p 3 --2\n[2] Example Two\n[1] Example One\n```\n\nList [#tagged](#tagging) items by passing `\\#escaped` or `\"#quoted\"` hashtags\nor tags specified with the [`--tags`](#ls) option. Multiple tags perform an\n`AND` query:\n\n```bash\n# list items in the current notebook tagged with \"#tag1\", escaped\nnb \\#tag1\n\n# list items in the \"example\" notebook tagged with \"#tag2\", quoted\nnb example: \"#tag2\"\n\n# list items in all notebooks tagged with \"#tag1\", long option\nnb \\#tag1 --all\n\n# list items in the current notebook tagged with \"#tag1\" AND \"#tag2\"\nnb \\#tag1 \"#tag2\"\n\n# list items in all notebooks tagged with \"#tag2\" AND \"#tag3\", short option\nnb --tags tag2,tag3 -a\n```\n\n[`nb ls`](#ls) is a combination of\n[`nb notebooks`](#notebooks) and [`nb list`](#list)\nin one view and accepts the same arguments as [`nb list`](#list),\nwhich lists only notes without the notebook list and with no limit by default:\n\n```bash\n❯ nb list\n[100] Example One Hundred\n[99]  Example Ninety-Nine\n[98]  Example Ninety-Eight\n... lists all notes ...\n[2]   Example Two\n[1]   Example One\n```\n\nFor more information about options for listing notes, run\n[`nb help ls`](#ls)\nand\n[`nb help list`](#list).\n\n##### Listing with `browse`\n\nItems can be listed within terminal and GUI web browsers using\n[`nb browse`](#browse) / [`nb b`](#browse):\n\n```bash\n❯ nb browse example:sample/demo/\n❯nb · example : sample / demo / +\n\nsearch: [                    ]\n\n[example:sample/demo/7] Title Seven\n[example:sample/demo/6] Title Six\n[example:sample/demo/5] Title Five\n[example:sample/demo/4] Title Four\n[example:sample/demo/3] Title Three\n\nnext ❯\n```\n\nFor more information, see [Browsing](#-browsing).\n\n#### Editing\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#edit\"\u003e\u003ccode\u003enb edit\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#browse\"\u003e\u003ccode\u003enb browse edit\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\nYou can edit an item in your editor with\n[`nb edit`](#edit) (shortcut: [`nb e`](#edit)):\n\n```bash\n# edit note by id\nnb edit 3\n\n# edit note by filename\nnb edit example.md\n\n# edit note by title\nnb edit \"A Document Title\"\n\n# edit note 12 in the notebook named \"example\"\nnb edit example:12\n\n# edit note 12 in the notebook named \"example\", alternative\nnb example:12 edit\n\n# edit note 12 in the notebook named \"example\", alternative\nnb example:edit 12\n```\n\n[`edit`](#edit) and other subcommands that take an identifier\ncan be called with the identifier and subcommand name reversed:\n\n```bash\n# edit note by id\nnb 3 edit\n```\n\n[`nb edit`](#edit) can also receive piped content, which it\nappends to the specified note without opening the editor:\n\n```bash\necho \"Content to append.\" | nb edit 1\n```\n\nContent can be passed with the [`--content \u003ccontent\u003e`](#edit) option,\nwhich also appends the content without opening the editor:\n\n```bash\nnb edit 1 --content \"Content to append.\"\n```\n\nUse the [`--overwrite`](#edit) option to overwrite existing file content\nand the [`--prepend`](#edit) option to prepend the new content before existing content.\n\nWhen content is piped or specified with [`--content \u003ccontent\u003e`](#edit),\nuse the [`--edit`](#edit) flag to open the file in the editor\nbefore the change is committed.\n\n##### Editing Encrypted Notes\n\nWhen a note is encrypted,\n[`nb edit`](#edit) prompts you for the note password,\nopens the unencrypted content in your editor,\nand then automatically reencrypts the note when you are done editing.\n\n##### Shortcut Alias: `nb e`\n\n[`nb edit`](#edit) can be called by the shortcut alias, [`nb e`](#edit):\n\n```bash\n# edit note by id\nnb e 3\n\n# edit note by filename\nnb e example.md\n\n# edit note by title\nnb e \"A Document Title\"\n\n# edit note by id, alternative\nnb 3 e\n\n# edit note 12 in the notebook named \"example\"\nnb e example:12\n\n# edit note 12 in the notebook named \"example\", alternative\nnb example:12 e\n\n# edit note 12 in the notebook named \"example\", alternative\nnb example:e 12\n```\n\nFor [`nb edit`](#edit) help information, run [`nb help edit`](#edit).\n\n##### Editing with `browse`\n\nItems can be edited within terminal and GUI web browsers using\n[`nb browse edit`](#browse) / [`nb b e`](#browse):\n\n```bash\n❯ nb browse edit text:formats/markdown/123\n❯nb · text : formats / markdown / 123 · ↓ · editing · - | +\n\n[# Daring Fireball: Markdown (daringfireball.net)         ]\n[                                                         ]\n[\u003chttps://daringfireball.net/projects/markdown/\u003e          ]\n[                                                         ]\n[## Related                                               ]\n[                                                         ]\n[- \u003chttps://en.wikipedia.org/wiki/Markdown\u003e               ]\n[                                                         ]\n[## Comments                                              ]\n[                                                         ]\n[See also:                                                ]\n[                                                         ]\n[- [[text:formats/org]]                                   ]\n[- [[cli:apps/nb]]                                        ]\n[                                                         ]\n[## Tags                                                  ]\n[                                                         ]\n\n[save] · last: 2021-01-01 01:00:00\n```\n\nFor more information, see\n[`browse edit`](#browse-edit) and [Browsing](#-browsing).\n\n#### Viewing\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#show\"\u003e\u003ccode\u003enb show\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#browse\"\u003e\u003ccode\u003enb browse\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#open\"\u003e\u003ccode\u003enb open\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#peek\"\u003e\u003ccode\u003enb peek\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\nNotes and other items can be viewed using\n[`nb show`](#show) (shortcut: [`nb s`](#show)):\n\n```bash\n# show note by id\nnb show 3\n\n# show note by filename\nnb show example.md\n\n# show note by title\nnb show \"A Document Title\"\n\n# show note by id, alternative\nnb 3 show\n\n# show note 12 in the notebook named \"example\"\nnb show example:12\n\n# show note 12 in the notebook named \"example\", alternative\nnb example:12 show\n\n# show note 12 in the notebook named \"example\", alternative\nnb example:show 12\n```\n\nBy default, [`nb show`](#show) opens notes in\n[`less`](https://linux.die.net/man/1/less),\nwith syntax highlighting if\n[`bat`](https://github.com/sharkdp/bat),\n[`highlight`](http://www.andre-simon.de/doku/highlight/en/highlight.php),\nor\n[Pygments](https://pygments.org/)\nis installed.\nYou can navigate in `less` using the following keys:\n\n```text\nKey               Function\n---               --------\nmouse scroll      Scroll up or down\narrow up or down  Scroll one line up or down\nf                 Jump forward one window\nb                 Jump back one window\nd                 Jump down one half window\nu                 Jump up one half window\n/\u003cquery\u003e          Search for \u003cquery\u003e\nn                 Jump to next \u003cquery\u003e match\nq                 Quit\n```\n\n*If `less` scrolling isn't working in [iTerm2](https://www.iterm2.com/),\ngo to*\n\"Settings\"\n-\u003e \"Advanced\"\n-\u003e \"Scroll wheel sends arrow keys when in alternate screen mode\"\n*and change it to* \"Yes\".\n*[More Info](https://stackoverflow.com/a/37610820)*\n\nUse the [`-p`](#show) / [`--print`](#show) option\nto print to standard output with syntax highlighting:\n\n```bash\n❯ nb show 123 --print\n# Example Title\n\nExample content:\n\n- one\n- two\n- three\n```\n\nUse [`nb show --print --no-color`](#show) to print without syntax highlighting.\n\nWhen [Pandoc](https://pandoc.org/) is available,\nuse the [`-r`](#show) / [`--render`](#show) option to\nrender the note to HTML and open it in your terminal browser:\n\n```bash\nnb show example.md --render\n# opens example.md as an HTML page in w3m, links, or lynx\n```\n\n[`nb show`](#show) also supports previewing other file types in the terminal,\ndepending on the tools available in the environment. To prefer specific tools\nfor certain file types, `nb` provides configuration variables that can be\nset in your `~/.nbrc` file,\nwhich can be opened in your editor with [`nb settings edit`](#settings).\n\nSupported file types and tools include:\n\n- Markdown files ([`$NB_MARKDOWN_TOOL`](#nb_markdown_tool)):\n  - [`bat`](https://github.com/sharkdp/bat)\n  - [`glow`](https://github.com/charmbracelet/glow)\n  - [`lowdown`](https://kristaps.bsd.lv/lowdown)\n  - [`mdcat`](https://github.com/swsnr/mdcat)\n  - [`mdless`](https://github.com/ttscoff/mdless)\n  - [`mdv`](https://github.com/axiros/terminal_markdown_viewer)\n- PDF files:\n  - [`termpdf.py`](https://github.com/dsanson/termpdf.py)\n    with [kitty](https://sw.kovidgoyal.net/kitty/)\n  - [`pdftotext`](https://en.wikipedia.org/wiki/Pdftotext)\n- Audio files ([`$NB_AUDIO_TOOL`](#nb_audio_tool)):\n  - [`mplayer`](https://en.wikipedia.org/wiki/MPlayer)\n  - [`afplay`](https://ss64.com/osx/afplay.html)\n  - [`mpg123`](https://en.wikipedia.org/wiki/Mpg123)\n  - [`ffplay`](https://ffmpeg.org/ffplay.html)\n- [Images](#-images) ([`$NB_IMAGE_TOOL`](#nb_image_tool)):\n  - [`catimg`](https://github.com/posva/catimg)\n  - [Chafa](https://github.com/hpjansson/chafa)\n  - [ImageMagick](https://imagemagick.org/) with a terminal that\n    supports [sixels](https://en.wikipedia.org/wiki/Sixel)\n  - [`imgcat`](https://www.iterm2.com/documentation-images.html) with\n    [iTerm2](https://www.iterm2.com/)\n  - [kitty's `icat` kitten](https://sw.kovidgoyal.net/kitty/kittens/icat.html)\n  - [`termvisage`](https://github.com/AnonymouX47/termvisage)\n  - [`timg`](https://github.com/hzeller/timg)\n  - [`viu`](https://github.com/atanunq/viu)\n- Folders, Directories, Notebooks ([`$NB_DIRECTORY_TOOL`](#nb_directory_tool)):\n  - [`eza`](https://github.com/eza-community/eza)\n  - [`joshuto`](https://github.com/kamiyaa/joshuto)\n  - [`lsd`](https://github.com/lsd-rs/lsd)\n  - [Midnight Commander (`mc`)](https://en.wikipedia.org/wiki/Midnight_Commander)\n  - [`ranger`](https://ranger.github.io/)\n  - [`vifm`](https://vifm.info/)\n- Word Documents:\n  - [Pandoc](https://pandoc.org/) with\n    [`w3m`](https://en.wikipedia.org/wiki/W3m) or\n    [`links`](https://en.wikipedia.org/wiki/Links_(web_browser))\n- Excel, CSV, TSV, and data files ([`$NB_DATA_TOOL`](#nb_data_tool)):\n  - [VisiData](https://www.visidata.org/)\n  - [`sc-im`](https://github.com/andmarti1424/sc-im)\n  - [Tidy-Viewer (`tv`)](https://github.com/alexhallam/tv)\n- EPUB ebooks:\n  - [Pandoc](https://pandoc.org/) with\n    [`w3m`](https://en.wikipedia.org/wiki/W3m) or\n    [`links`](https://en.wikipedia.org/wiki/Links_(web_browser))\n\nWhen using [`nb show`](#show) with other file types or\nif the above tools are not available,\n[`nb show`](#show) opens files in\nyour system's preferred application for each type.\n\n[`nb show`](#show) also provides [options](#show) for\nquerying information about an item. For example, use the\n[`--added`](#show) / [`-a`](#show) and [`--updated`](#show) / [`-u`](#show)\nflags to print the date and time that an item was added or updated:\n\n```bash\n❯ nb show 2 --added\n2020-01-01 01:01:00 -0700\n\n❯ nb show 2 --updated\n2020-02-02 02:02:00 -0700\n```\n\n[`nb show`](#show) is primarily intended for viewing items within the terminal.\nTo view a file in the system's preferred GUI application, use\n[`nb open`](#open).\nTo [browse](#-browsing) rendered items in terminal and GUI web browsers, use\n[`nb browse`](#browse).\n\nFor full [`nb show`](#show) usage information, run [`nb help show`](#show).\n\n##### Shortcut Alias: `nb s`\n\n[`nb show`](#show) can be called using the shortcut alias [`nb s`](#show):\n\n```bash\n# show note by id\nnb s 3\n\n# show note by filename\nnb s example.md\n\n# show note by title\nnb s \"A Document Title\"\n\n# show note by id, alternative\nnb 3 s\n\n# show note 12 in the notebook named \"example\"\nnb s example:12\n\n# show note 12 in the notebook named \"example\", alternative\nnb example:12 s\n\n# show note 12 in the notebook named \"example\", alternative\nnb example:s 12\n```\n\n##### Alias: `nb view`\n\n[`nb show`](#show) can also be invoked with [`nb view`](#show) for convenience:\n\n```bash\n# show note by id\nnb view 3\n\n# show note by filename\nnb view example.md\n\n# show note by title\nnb view \"A Document Title\"\n\n# show note by id, alternative\nnb 3 view\n```\n\n##### Viewing with `browse`\n\nItems can be viewed within terminal and GUI web browsers using\n[`nb browse`](#browse) / [`nb b`](#browse):\n\n```bash\n❯ nb browse text:formats/markdown/123\n❯nb · text : formats / markdown / 123 · ↓ · edit | +\nDaring Fireball: Markdown (daringfireball.net)\n\nhttps://daringfireball.net/projects/markdown/\n\nRelated\n\n  • https://en.wikipedia.org/wiki/Markdown\n\nComments\n\nSee also:\n\n  • [[text:formats/org]]\n  • [[cli:apps/nb]]\n\nTags\n\n#markup #plain-text\n\nContent\n\nDaring Fireball: Markdown\n\nDownload\n\nMarkdown 1.0.1 (18 KB) — 17 Dec 2004\n\nIntroduction\n\nMarkdown is a text-to-HTML conversion tool for web writers. Markdown allows\nyou to write using an easy-to-read, easy-to-write plain text format, then\nconvert it to structurally valid XHTML (or HTML).\n```\n\nFor more information, see [Browsing](#-browsing).\n\n#### Deleting\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#delete\"\u003e\u003ccode\u003enb delete\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#browse\"\u003e\u003ccode\u003enb browse delete\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\nTo delete one or more notes, pass any number of\nids, filenames, titles, and other [selectors](#-selectors)\nto [`nb delete`](#delete) (shortcuts: [`nb d`](#delete), [`nb -`](#delete)):\n\n```bash\n# delete item by id\nnb delete 3\n\n# delete item by filename\nnb delete example.md\n\n# delete item by title\nnb delete \"A Document Title\"\n\n# delete item by id, alternative\nnb 3 delete\n\n# delete item 12 in the notebook named \"example\"\nnb delete example:12\n\n# delete item 12 in the notebook named \"example\", alternative\nnb example:12 delete\n\n# delete item 12 in the notebook named \"example\", alternative\nnb example:delete 12\n\n# delete item 345 in the folder named \"example\"\nnb delete example/345\n\n# delete items with the ids 89, 56, and 21\nnb delete 89 56 21\n```\n\nBy default, [`nb delete`](#delete) will display a confirmation prompt.\nTo skip, use the [`--force`](#delete) / [`-f`](#delete) option:\n\n```bash\nnb delete 3 --force\n```\n\n##### Shortcut Aliases: `nb d`, `nb -`\n\n[`nb delete`](#delete) has the aliases [`nb d`](#delete) and [`nb -`](#delete):\n\n```bash\n# delete note by id\nnb d 3\n\n# delete note by filename\nnb d example.md\n\n# delete note by title\nnb - \"A Document Title\"\n\n# delete note by id, alternative\nnb 3 d\n\n# delete note 12 in the notebook named \"example\"\nnb - example:12\n\n# delete note 12 in the notebook named \"example\", alternative\nnb example:12 d\n\n# delete note 12 in the notebook named \"example\", alternative\nnb example:d 12\n```\n\nFor [`nb delete`](#delete) help information, run [`nb help delete`](#delete).\n\n##### Deleting with `nb browse`\n\nItems can be deleted within terminal and GUI web browsers using\n[`nb browse delete`](#browse) / [`nb b d`](#browse):\n\n```bash\n❯ nb browse delete example:4\n❯nb · example : 4 · ↓ · edit · - | +\n\n              deleting\n\n[4] example_file.md \"Example Title\"\n\n              [delete]\n\n```\n\nFor more information, see [Browsing](#-browsing).\n\n### 🔖 Bookmarks\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#nb-help\"\u003e\u003ccode\u003enb\u0026nbsp;\u0026lt;url\u0026gt;\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#browse\"\u003e\u003ccode\u003enb\u0026nbsp;browse\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#bookmark\"\u003e\u003ccode\u003enb\u0026nbsp;bookmark\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#open\"\u003e\u003ccode\u003enb\u0026nbsp;open\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#peek\"\u003e\u003ccode\u003enb\u0026nbsp;peek\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#show\"\u003e\u003ccode\u003enb\u0026nbsp;show\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\n`nb` includes a bookmarking system to conveniently\ncreate, annotate, view, search, [browse](#-browsing), and manage\ncollections of bookmarks.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg  src=\"https://xwmx.github.io/misc/nb/images/nb-bookmarks-gui-gui-terminal.png\"\n        alt=\"nb bookmarks\"\n        width=\"450\"\u003e\n\u003c/div\u003e\n\nBookmarks in `nb` are stored as\n[simple structured Markdown files](#nb-markdown-bookmark-file-format)\ncontaining information extracted from the bookmarked pages.\n\nTo create a new bookmark, pass a URL as the first argument to `nb`:\n\n```bash\nnb https://example.com\n```\n\n`nb` automatically generates a bookmark using information from the page:\n\n```markdown\n# Example Title (example.com)\n\n\u003chttps://example.com\u003e\n\n## Description\n\nExample description.\n\n## Content\n\nExample Title\n=============\n\nThis domain is for use in illustrative examples in documents. You may\nuse this domain in literature without prior coordination or asking for\npermission.\n\n[More information\\...](https://www.iana.org/domains/example)\n```\n\n`nb` embeds the page content in the bookmark, making it available for\n[full text search](#-search) with [`nb search`](#search) and\nlocally-served, distraction-free [reading and browsing](#-browsing)\nwith [`nb browse`](#browse).\nWhen [Pandoc](https://pandoc.org/) is installed,\nthe HTML page content is converted to Markdown.\nWhen [readability-cli](https://gitlab.com/gardenappl/readability-cli)\nis installed, markup is cleaned up to focus on content. When\n[Chromium](https://www.chromium.org) or\n[Chrome](https://www.google.com/chrome/) is installed,\nJavaScript-dependent pages are rendered and the resulting markup is\nsaved.\n\nMany shells automatically escape special characters in URLs. If a\nURL contains characters that are preventing it from being saved in full,\nURLs can also be enclosed in quotes when passed to `nb`:\n\n```bash\nnb \"https://example.com#sample-anchor\"\n```\n\nIn addition to caching the page content,\nyou can also include a quote from the page in a\n[`## Quote`](#-quote) section\nusing the\n[`-q \u003cquote\u003e`](#bookmark) / [`--quote \u003cquote\u003e`](#bookmark) option:\n\n```bash\nnb https://example.com --quote \"Example quote line one.\n\nExample quote line two.\"\n```\n```markdown\n# Example Title (example.com)\n\n\u003chttps://example.com\u003e\n\n## Description\n\nExample description.\n\n## Quote\n\n\u003e Example quote line one.\n\u003e\n\u003e Example quote line two.\n\n## Content\n\nExample Title\n=============\n\nThis domain is for use in illustrative examples in documents. You may\nuse this domain in literature without prior coordination or asking for\npermission.\n\n[More information\\...](https://www.iana.org/domains/example)\n```\n\nAdd a comment in a [`## Comment`](#-comment) section using the\n[`-c \u003ccomment\u003e`](#bookmark) / [`--comment \u003ccomment\u003e`](#bookmark) option:\n\n```bash\nnb https://example.com --comment \"Example comment.\"\n```\n```markdown\n# Example Title (example.com)\n\n\u003chttps://example.com\u003e\n\n## Description\n\nExample description.\n\n## Comment\n\nExample comment.\n\n## Content\n\nExample Title\n=============\n\nThis domain is for use in illustrative examples in documents. You may\nuse this domain in literature without prior coordination or asking for\npermission.\n\n[More information\\...](https://www.iana.org/domains/example)\n```\n\nAdd related URLs and [linked](#-linking) [selectors](#-selectors)\nto a [`## Related`](#-related) section using the\n[`-r (\u003curl\u003e | \u003cselector\u003e)`](#bookmark) /\n[`--related (\u003curl\u003e | \u003cselector\u003e)`](#bookmark)\noption:\n\n```bash\nnb https://example.com --related example:123 -r https://example.net\n```\n```markdown\n# Example Title (example.com)\n\n\u003chttps://example.com\u003e\n\n## Description\n\nExample description.\n\n## Related\n\n- [[example:123]]\n- \u003chttps://example.net\u003e\n\n## Content\n\nExample Title\n=============\n\nThis domain is for use in illustrative examples in documents. You may\nuse this domain in literature without prior coordination or asking for\npermission.\n\n[More information\\...](https://www.iana.org/domains/example)\n```\n\nBookmarks can be tagged using the\n[`-t \u003ctag1\u003e,\u003ctag2\u003e...`](#bookmark) /\n[`--tags \u003ctag1\u003e,\u003ctag2\u003e...`](#bookmark) option.\nTags are converted into [#hashtags](#-tagging) and\nadded to a [`## Tags`](#-tags) section:\n\n```bash\nnb https://example.com --tags tag1,tag2\n```\n```markdown\n# Example Title (example.com)\n\n\u003chttps://example.com\u003e\n\n## Description\n\nExample description.\n\n## Tags\n\n#tag1 #tag2\n\n## Content\n\nExample Title\n=============\n\nThis domain is for use in illustrative examples in documents. You may\nuse this domain in literature without prior coordination or asking for\npermission.\n\n[More information\\...](https://www.iana.org/domains/example)\n```\n\n[Search](#-search) for tagged bookmarks with\n[`nb search`](#search) / [`nb q`](#search):\n\n```bash\nnb search --tag tag1\n\nnb q -t tag1\n\nnb q \\#tag1\n```\n\n[`nb search`](#search) / [`nb q`](#search)\nautomatically searches archived page content:\n\n```bash\n❯ nb q \"example query\"\n[10] 🔖 example.bookmark.md \"Example Bookmark (example.com)\"\n------------------------------------------------------------\n5:Lorem ipsum example query.\n```\n\nBookmarks can also be encrypted:\n\n```bash\n# create a new password-protected, encrypted bookmark\nnb https://example.com --encrypt\n```\n\nEncrypted bookmarks require a password before they can be viewed or\nopened.\n\nMultiple URLs can be bookmarked with a single command by passing\nmultiple [`\u003curl\u003e`](#bookmark) arguments. Additional arguments will be reused\nfor each bookmark:\n\n```bash\n❯ nb https://example.com https://example.net --tags tag1,tag2 --filename example\nAdded: [1] 🔖 example.bookmark.md \"Example Domain (example.com)\"\nAdded: [2] 🔖 example-1.bookmark.md \"Example Domain (example.net)\"\n```\n\n#### Listing and Filtering Bookmarks\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg  src=\"https://xwmx.github.io/misc/nb/images/nb-bookmarks-gui-terminal-terminal.png\"\n        alt=\"nb bookmark lists\"\n        width=\"500\"\u003e\n\u003c/div\u003e\n\nBookmarks are included in\n`nb`,\n[`nb ls`](#ls),\n[`nb list`](#list),\nand [`nb browse`](#browse)\nalong with items of other types.\n[`nb bookmark`](#bookmark) and [`nb bookmark list`](#bookmark) can be used to\nlist and filter only bookmarks:\n\n```bash\n❯ nb bookmark\nAdd: nb \u003curl\u003e Help: nb help bookmark\n------------------------------------\n[3] 🔖 🔒 example.bookmark.md.enc\n[2] 🔖 Bookmark Two (example.com)\n[1] 🔖 Bookmark One (example.com)\n\n❯ nb bookmark list two\n[2] 🔖 Bookmark Two (example.com)\n```\n\nBookmarks are also included in `nb`, [`nb ls`](#ls), and [`nb list`](#list):\n\n```bash\n❯ nb\nhome\n----\n[7] 🔖 Bookmark Three (example.com)\n[6] Example Note\n[5] 🔖 Bookmark Two (example.net)\n[4] Sample Note\n[3] 🔖 🔒 example-encrypted.bookmark.md.enc\n[2] Demo Note\n[1] 🔖 Bookmark One (example.com)\n```\n\nUse the [`--type \u003ctype\u003e`](#ls) / [`--\u003ctype\u003e`](#ls)\noption as a filter to display only bookmarks:\n\n```bash\n❯ nb --type bookmark\n[7] 🔖 Bookmark Three (example.com)\n[5] 🔖 Bookmark Two (example.net)\n[3] 🔖 🔒 example-encrypted.bookmark.md.enc\n[1] 🔖 Bookmark One (example.com)\n\n❯ nb --bookmark\n[7] 🔖 Bookmark Three (example.com)\n[5] 🔖 Bookmark Two (example.net)\n[3] 🔖 🔒 example-encrypted.bookmark.md.enc\n[1] 🔖 Bookmark One (example.com)\n```\n\n`nb` saves the domain in the title, making it easy to filter by domain\nusing any list subcommands:\n\n```bash\n❯ nb example.com\n[7] 🔖 Bookmark Three (example.com)\n[1] 🔖 Bookmark One (example.com)\n```\n\nFor more listing options, see\n[`nb help ls`](#ls),\n[`nb help list`](#list),\nand [`nb help bookmark`](#bookmark).\n\n##### Shortcut Aliases: `nb bk`, `nb bm`\n\n[`nb bookmark`](#bookmark) can also be used with the aliases\n[`nb bk`](#bookmark) and [`nb bm`](#bookmark):\n\n```bash\n❯ nb bk\nAdd: nb \u003curl\u003e Help: nb help bookmark\n------------------------------------\n[7] 🔖 Bookmark Three (example.com)\n[5] 🔖 Bookmark Two (example.net)\n[3] 🔖 🔒 example-encrypted.bookmark.md.enc\n[1] 🔖 Bookmark One (example.com)\n\n❯ nb bm example.net\n[5] 🔖 Bookmark Two (example.net)\n```\n\n#### Viewing Bookmarks\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#browse\"\u003e\u003ccode\u003enb\u0026nbsp;browse\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#open\"\u003e\u003ccode\u003enb\u0026nbsp;open\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#peek\"\u003e\u003ccode\u003enb\u0026nbsp;peek\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#show\"\u003e\u003ccode\u003enb\u0026nbsp;show\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\n`nb` provides multiple ways to view bookmark files, bookmarked content,\nand bookmarked URLs.\n\nUse [`nb browse`](#browse) (shortcut: [`nb b`](#browse))\nto [browse](#-browsing) bookmarks with cached content,\n\u003ca href=\"#-linking\"\u003e[[wiki-style links]]\u003c/a\u003e,\nlinked [#tags](#-tagging), and external links:\n\n```bash\n❯ nb browse text:formats/markdown/123\n❯nb · text : formats / markdown / 123 · ↓ · edit | +\nDaring Fireball: Markdown (daringfireball.net)\n\nhttps://daringfireball.net/projects/markdown/\n\nRelated\n\n  • https://en.wikipedia.org/wiki/Markdown\n\nComments\n\nSee also:\n\n  • [[text:formats/org]]\n  • [[cli:apps/nb]]\n\nTags\n\n#markup #plain-text\n\nContent\n\nDaring Fireball: Markdown\n\nDownload\n\nMarkdown 1.0.1 (18 KB) — 17 Dec 2004\n\nIntroduction\n\nMarkdown is a text-to-HTML conversion tool for web writers. Markdown allows\nyou to write using an easy-to-read, easy-to-write plain text format, then\nconvert it to structurally valid XHTML (or HTML).\n```\n\nFor more information, see [Browsing](#-browsing).\n\n[`nb open`](#open) (shortcut: [`nb o`](#open)) opens the bookmarked URL in\nyour system's primary web browser:\n\n```bash\n# open bookmark by id\nnb open 3\n\n# open bookmark 12 in the notebook named \"example\"\nnb open example:12\n\n# open bookmark 12 in the notebook named \"example\", alternative\nnb example:12 open\n\n# open bookmark 12 in the notebook named \"example\", alternative\nnb example:open 12\n```\n\n*N.B. To use [`nb open`](#open) with\n[WSL](https://docs.microsoft.com/en-us/windows/wsl/install),\ninstall [wslu](https://github.com/wslutilities/wslu).*\n\n[`nb peek`](#peek) (shortcut: [`nb p`](#peek), alias: [`nb preview`](#peek))\nopens the bookmarked URL in your terminal web browser,\nsuch as\n[w3m](https://en.wikipedia.org/wiki/W3m),\n[Links](https://en.wikipedia.org/wiki/Links_(web_browser)), or\n[Lynx](https://en.wikipedia.org/wiki/Lynx_(web_browser)):\n\n```bash\n# peek bookmark by id\nnb peek 3\n\n# peek bookmark 12 in the notebook named \"example\"\nnb peek example:12\n\n# peek bookmark 12 in the notebook named \"example\", alternative\nnb example:12 peek\n\n# peek bookmark 12 in the notebook named \"example\", alternative\nnb example:peek 12\n```\n\n[`nb open`](#open) and [`nb peek`](#peek)\nwork seamlessly with encrypted bookmarks.\n`nb` simply prompts you for the bookmark's password.\n\n[`nb open`](#open) and [`nb peek`](#peek)\nautomatically check whether the URL is still valid.\nIf the page has been removed, `nb` can check\nthe [Internet Archive Wayback Machine](https://archive.org/web/)\nfor an archived copy.\n\nThe preferred terminal web browser can be set using\nthe `$BROWSER` environment variable,\nassigned in `~/.bashrc`, `~/.zshrc`, or similar:\n\n```bash\nexport BROWSER=lynx\n```\n\nWhen `$BROWSER` is not set, `nb` looks for\n[`w3m`](https://en.wikipedia.org/wiki/W3m),\n[`links`](https://en.wikipedia.org/wiki/Links_(web_browser)), and\n[`lynx`](https://en.wikipedia.org/wiki/Lynx_(web_browser))\nand uses the first one it finds.\n\n`$BROWSER` can also be used to easy specify the terminal browser for\nan individual command:\n\n```bash\n❯ BROWSER=links nb 12 peek\n# opens the URL from bookmark 12 in links\n\n❯ BROWSER=w3m nb 12 peek\n# opens the URL from bookmark 12 in w3m\n```\n\n[`nb show`](#show) and [`nb edit`](#edit)\ncan also be used to view and edit bookmark files,\nwhich include the cached page converted to Markdown.\n\n[`nb show \u003cid\u003e --render`](#show) / [`nb show \u003cid\u003e -r`](#show)\ndisplays the bookmark file converted to HTML in the terminal web browser,\nincluding all bookmark fields and the cached page content,\nproviding a cleaned-up, distraction-free, locally-served view of\nthe page content along with all of your notes.\n\n##### Shortcut Aliases: `nb o` and `nb p`\n\n[`nb open`](#open) and [`nb peek`](#peek)\ncan also be used with the shortcut aliases\n[`nb o`](#open) and [`nb p`](#peek):\n\n```bash\n# open bookmark by id\nnb o 3\n\n# open bookmark 12 in the notebook named \"example\"\nnb o example:12\n\n# open bookmark 12 in the notebook named \"example\", alternative\nnb example:12 o\n\n# peek bookmark by id\nnb p 3\n\n# peek bookmark 12 in the notebook named \"example\"\nnb p example:12\n\n# peek bookmark 12 in the notebook named \"example\", alternative\nnb example:12 p\n```\n\n#### Bookmark File Format\n\nBookmarks are identified by a `.bookmark.md` file extension.\nThe bookmark URL is the first URL in the file within `\u003c` and `\u003e` characters.\nTo create a minimally valid bookmark file with [`nb add`](#add):\n\n```bash\nnb add example.bookmark.md --content \"\u003chttps://example.com\u003e\"\n```\n\nFor a full overview, see\n[`nb` Markdown Bookmark File Format](#nb-markdown-bookmark-file-format).\n\n#### `bookmark` -- A command line tool for managing bookmarks.\n\n`nb` includes [`bookmark`](#bookmark-help), a full-featured\ncommand line interface for creating, viewing, searching, and editing bookmarks.\n\n[`bookmark`](#bookmark-help) is a shortcut for the\n[`nb bookmark`](#bookmark) subcommand,\naccepting all of the same subcommands and options with identical behavior.\n\nBookmark a page:\n\n```bash\n❯ bookmark https://example.com --tags tag1,tag2\nAdded: [3] 🔖 20200101000000.bookmark.md \"Example Title (example.com)\"\n```\nList and filter bookmarks with\n[`bookmark`](#bookmark) and [`bookmark list`](#bookmark):\n\n```bash\n❯ bookmark\nAdd: bookmark \u003curl\u003e Help: bookmark help\n---------------------------------------\n[3] 🔖 🔒 example.bookmark.md.enc\n[2] 🔖 Example Two (example.com)\n[1] 🔖 Example One (example.com)\n\n❯ bookmark list two\n[2] 🔖 Example Two (example.com)\n```\n\nView a bookmark in your terminal web browser:\n\n```bash\nbookmark peek 2\n```\n\nOpen a bookmark in your system's primary web browser:\n\n```bash\nbookmark open 2\n```\n\nPerform a full text search of bookmarks and archived page content:\n\n```bash\n❯ bookmark search \"example query\"\n[10] 🔖 example.bookmark.md \"Example Bookmark (example.com)\"\n------------------------------------------------------------\n5:Lorem ipsum example query.\n```\n\nSee [`bookmark help`](#bookmark-help) for more information.\n\n### ✅ Todos\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#do\"\u003e\u003ccode\u003enb do\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#tasks\"\u003e\u003ccode\u003enb tasks\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#todo\"\u003e\u003ccode\u003enb todo\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#undo\"\u003e\u003ccode\u003enb undo\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\nUse [`nb todo`](#todo) (shortcut: [`nb to`](#todo))\nto create, list, and update todos.\n`nb` todos are [structured Markdown documents](#nb-markdown-todo-file-format)\nreferencing a single primary todo,\nwith optional [tasks](#%EF%B8%8F-tasks).\n\nUse [`nb todo add`](#todo) to create a new todo:\n\n```bash\n# create a new todo titled \"Example todo one.\"\n❯ nb todo add \"Example todo one.\"\nAdded: [1] ✔️ [ ] Example todo one.\n\n❯ nb show 1 --print\n# [ ] Example todo one.\n```\n\nUse the [`--due \u003cdate\u003e`](#todo) option to add an optional due date in a\n[`## Due`](#-due) section:\n\n```bash\n# create a new todo titled \"Example todo two.\" with a due date of \"2100-01-01\"\n❯ nb todo add \"Example todo two.\" --due \"2100-01-01\"\nAdded: [2] ✔️ [ ] Example todo two.\n\n❯ nb show 2 --print\n# [ ] Example todo two.\n\n## Due\n\n2100-01-01\n```\n\nAdd an optional [description](#-description-1) with the\n[`--description \u003cdescription\u003e`](#todo)\noption:\n\n```bash\n❯ nb todo add \"Example todo three.\" --description \"Example description.\"\nAdded: [3] ✔️ [ ] Example todo three.\n\n❯ nb show 3 --print\n# [ ] Example todo three.\n\n## Description\n\nExample description.\n```\n\nTodos can have [tasks](#%EF%B8%8F-tasks).\nTasks added with one or more [`--task \u003ctask\u003e`](#todo) options\nare represented as a markdown task list and placed in a\n[`## Tasks`](#-tasks) section:\n\n```bash\n❯ nb todo add \"Example todo seven.\" --task \"Task one.\" --task \"Task two.\" --task \"Task three.\"\nAdded: [7] ✔️ [ ] Example todo seven.\n\n❯ nb show 7 --print\n# [ ] Example todo seven.\n\n## Tasks\n\n- [ ] Task one.\n- [ ] Task two.\n- [ ] Task three.\n```\n\nRelated URLs and [linked](#-linking) [selectors](#-selectors)\ncan be added to a [`## Related`](#-related-1) field using the\n[`-r (\u003curl\u003e | \u003cselector\u003e)`](#todo) / [`--related (\u003curl\u003e | \u003cselector\u003e)`](#todo)\noption:\n\n```bash\n❯ nb todo add \"Example todo four.\" --related example:123 -r https://example.com\nAdded: [4] ✔️ [ ] Example todo four.\n\n❯ nb show 4 --print\n# [ ] Example todo four.\n\n## Related\n\n- [[example:123]]\n- \u003chttps://example.com\u003e\n```\n\n[Tags](#-tagging) can be added to todos with the\n[`--tags \u003ctag1\u003e,\u003ctag2\u003e...`](#todo) option:\n\n```bash\n❯ nb todo add \"Example todo five.\" --tags tag1,tag2\nAdded: [5] ✔️ [ ] Example todo five.\n\n❯ nb show 5 --print\n# [ ] Example todo five.\n\n## Tags\n\n#tag1 #tag2\n```\n\n[Tags](#-tagging), [links](#-linking), and URLs can be\n[browsed](#-browsing)\nin terminal and GUI web browsers with [`nb browse`](#browse).\n\n#### Listing Todos\n\nList todos in with [`nb todos`](#todo):\n\n```bash\n# list todos in the current notebook\n❯ nb todos\n[6] ✔️ [ ] Example todo six.\n[5] ✅ [x] Example todo five.\n[4] ✔️ [ ] Example todo four.\n[3] ✅ [x] Example todo three.\n[2] ✅ [x] Example todo two.\n[1] ✔️ [ ] Example todo one.\n\n# list todos in the notebook named \"sample\"\n❯ nb todos sample:\n[sample:4] ✅ [x] Sample todo four.\n[sample:3] ✔️ [ ] Sample todo three.\n[sample:2] ✔️ [ ] Sample todo two.\n[sample:1] ✅ [x] Sample todo one.\n\n```\n\nOpen / undone todos can be listed with [`nb todos open`](#todo):\n\n```bash\n# list open todos in the current notebook\n❯ nb todos open\n[6] ✔️ [ ] Example todo six.\n[4] ✔️ [ ] Example todo four.\n[1] ✔️ [ ] Example todo one.\n\n# list open todos in the notebook named \"sample\"\n❯ nb tasks open sample:\n[sample:3] ✔️ [ ] Sample todo three.\n[sample:2] ✔️ [ ] Sample todo two.\n```\n\nClosed / done todos can be listed with [`nb todos closed`](#todo):\n\n```bash\n# list closed todos in the current notebook\n❯ nb todos closed\n[5] ✅ [x] Example todo five.\n[3] ✅ [x] Example todo three.\n[2] ✅ [x] Example todo two.\n\n# list closed todos in the notebook named \"sample\"\n❯ nb tasks closed sample:\n[sample:4] ✅ [x] Sample todo four.\n[sample:1] ✅ [x] Sample todo one.\n```\n\nSee\n[`nb help todo`](#todo)\nfor more information.\n\n#### `do` / `undo`\n\nMark a todo as done or closed with [`nb do`](#do):\n\n```bash\n# add a new todo titled \"Example todo six.\"\n❯ nb todo add \"Example todo six.\"\nAdded: [6] ✔️ [ ] Example todo six.\n\n# mark todo 6 as done / closed\n❯ nb do 6\nDone: [6] ✅ [x] Example todo six.\n```\n\nRe-open a closed todo with [`nb undo`](#undo):\n\n```bash\n# mark todo 6 as undone / open\n❯ nb undo 6\nUndone: [6] ✔️ [ ] Example todo six.\n```\n\nSee\n[`nb help do`](#do)\nand\n[`nb help undo`](#undo)\nfor more information.\n\n### ✔️ Tasks\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#do\"\u003e\u003ccode\u003enb do\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#tasks\"\u003e\u003ccode\u003enb tasks\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#todo\"\u003e\u003ccode\u003enb todo\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#undo\"\u003e\u003ccode\u003enb undo\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\n`nb` can list and update tasks in [todos](#-todos) and other Markdown documents.\n\nTasks are defined as one or more Markdown list items starting with\n`- [ ]` to indicate an open task or `- [x]` to indicate a done / closed task:\n\n```markdown\n- [ ] Example open task.\n- [x] Example closed task.\n```\n\nList tasks in items, folders, and notebooks with\n[`nb tasks`](#tasks) (shortcut: [`nb t`](#tasks)),\nwhich lists both tasks and todos:\n\n```bash\n# list tasks in item 7\n❯ nb tasks 7\n[7] ✔️ [ ] Example todo seven.\n------------------------------\n[7 1] [x] Task one.\n[7 2] [x] Task two.\n[7 3] [ ] Task three.\n\n# list tasks and todos in the notebook named \"example\"\n❯ nb tasks example:\n[example:9] ✔️ [ ] Example todo nine.\n[example:8] ✅ [x] Example todo eight.\n--------------------------------------\n[example:8 1] [x] Task one.\n[example:8 2] [x] Task two.\n\n[example:6] ✔️ [ ] Example todo six.\n[example:4] Example Note Title\n------------------------------\n[example:4 1] [ ] Task one.\n[example:4 2] [x] Task two.\n[example:4 3] [ ] Task three.\n\n[example:3] ✔️ [ ] Example todo three.\n```\n\nOpen / undone tasks can be listed with [`nb tasks open`](#tasks):\n\n```bash\n# list open tasks in item 7\n❯ nb tasks open 7\n[7] ✔️ [ ] Example todo seven.\n------------------------------\n[7 3] [ ] Task three.\n\n# list open tasks and todos in the notebook named \"example\"\n❯ nb tasks open example:\n[example:9] ✔️ [ ] Example todo nine.\n[example:6] ✔️ [ ] Example todo six.\n[example:4] Example Note Title\n------------------------------\n[example:4 1] [ ] Task one.\n[example:4 3] [ ] Task three.\n\n[example:3] ✔️ [ ] Example todo three.\n```\n\nClosed / done tasks can be listed with [`nb tasks closed`](#tasks):\n\n```bash\n# list closed tasks in item 7\n❯ nb tasks closed 7\n[7] ✔️ [ ] Example todo seven.\n------------------------------\n[7 1] [x] Task one.\n[7 2] [x] Task two.\n\n# list closed tasks and todos in the notebook named \"example\"\n❯ nb tasks closed example:\n[example:8] ✅ [x] Example todo eight.\n--------------------------------------\n[example:8 1] [x] Task one.\n[example:8 2] [x] Task two.\n\n[example:4] Example Note Title\n------------------------------\n[example:4 2] [x] Task two.\n```\n\nTasks are identified by the item [selector](#-selectors), followed by\na space, then followed by the sequential number of the task in the file.\n\nUse [`nb do`](#do) to mark tasks as done / closed:\n\n```bash\n# list tasks in item 9\n❯ nb tasks 9\n[9] ✔️ [ ] Example todo nine.\n-----------------------------\n[9 1] [ ] Task one.\n[9 2] [ ] Task two.\n[9 3] [ ] Task three.\n\n# mark task 2 in item 9 as done / closed\n❯ nb do 9 2\n[9] ✔️ [ ] Example todo nine.\n-----------------------------\nDone: [9 2] [x] Task two.\n\n# list tasks in item 9\n❯ nb tasks 9\n[9] ✔️ [ ] Example todo nine.\n-----------------------------\n[9 1] [ ] Task one.\n[9 2] [x] Task two.\n[9 3] [ ] Task three.\n```\n\nUndo a done / closed task with [`nb undo`](#undo):\n\n```bash\n# mark task 2 in item 9 as undone / open\n❯ nb undo 9 2\n[9] ✔️ [ ] Example todo nine.\n-----------------------------\nUndone: [9 2] [ ] Task two.\n\n# list tasks in item 9\n❯ nb tasks 9\n[9] ✔️ [ ] Example todo nine.\n-----------------------------\n[9 1] [ ] Task one.\n[9 2] [ ] Task two.\n[9 3] [ ] Task three.\n```\n\nSee\n[`nb help tasks`](#tasks)\nfor more information.\n\n### 🏷 #tagging\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#add\"\u003e\u003ccode\u003enb add\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#bookmark\"\u003e\u003ccode\u003enb bookmark\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#browse\"\u003e\u003ccode\u003enb browse\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#list\"\u003e\u003ccode\u003enb list\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#ls\"\u003e\u003ccode\u003enb ls\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#search\"\u003e\u003ccode\u003enb search\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\n`nb` recognizes `#hashtags` defined anywhere within a document.\nA hashtag is defined in `nb` as a `#` character followed by any number of\nletters, numbers, underscores, and dashes.\n\nNotes and bookmarks can be tagged when they are created using the\n`--tags \u003ctag1\u003e,\u003ctag2\u003e...` option,\nwhich is available with\n[`nb add`](#add),\n[`nb \u003curl\u003e`](#nb-help),\n[`nb browse add`](#browse),\n[`nb bookmark`](#bookmark),\nand\n[`nb todo`](#todo).\n`--tags` takes a comma-separated list of tags, converts them to\n`#hashtags`,\nand adds them to the document.\n\nTags added to notes with [`nb add --tags`](#add) are placed between the title\nand body text:\n\n```bash\n❯ nb add --title \"Example Title\" \"Example note content.\" --tags tag1,tag2\n```\n\n```markdown\n# Example Title\n\n#tag1 #tag2\n\nExample note content.\n```\n\nTags added to [bookmarks](#bookmarks) with\n[`nb \u003curl\u003e --tags`](#nb-help) and [`nb bookmark \u003curl\u003e --tags`](#bookmark)\nare placed in a [`## Tags`](#-tags) section:\n\n```bash\n❯ nb https://example.com --tags tag1,tag2\n```\n\n```markdown\n# Example Title (example.com)\n\n\u003chttps://example.com\u003e\n\n## Description\n\nExample description.\n\n## Tags\n\n#tag1 #tag2\n\n## Content\n\nExample Title\n=============\n\nThis domain is for use in illustrative examples in documents. You may\nuse this domain in literature without prior coordination or asking for\npermission.\n\n[More information\\...](https://www.iana.org/domains/example)\n```\n\nTags added to [todos](#-todos) with\n[`nb todo add --tags`](#todo)\nare placed in a [`## Tags`](#-tags-1) section:\n\n```bash\n❯ nb todo add --tags tag1,tag2 \"Example todo.\"\n```\n\n```markdown\n# [ ] Example todo.\n\n## Tags\n\n#tag1 #tag2\n```\n\nUse [`nb --tags`](#nb-help), [`nb ls --tags`](#ls),\nand [`nb list --tags`](#list)\nto list the tags present in a notebook, folder, or item:\n\n```bash\n# list all tags found in items in the current notebook\nnb --tags\n\n# list all tags found in the folder named \"example\"\nnb example/ --tags\n\n# list all tags in the item with id 123 in the notebook named \"sample\"\nnb sample:123 --tags\n```\n\nList tagged items by passing `\\#escaped` or `\"#quoted\"` hashtags or tags\nspecified with the [`--tags`](#ls) option to [`nb`](#ls) / [`nb ls`](#ls):\n\n```bash\n# list items in the current notebook tagged with \"#tag1\", escaped\nnb \\#tag1\n\n# list items in the \"example\" notebook tagged with \"#tag2\", quoted\nnb example: \"#tag2\"\n\n# list items in all notebooks tagged with \"#tag3\", long option\nnb --tags tag3 --all\n\n# list items in all notebooks tagged with \"#tag3\", short option\nnb --tags tag3 -a\n```\n\nCombine multiple tags to search for items containing all specified tags:\n\n```bash\n# list items in the current notebook tagged with \"#tag1\" AND \"#tag2\"\nnb \\#tag1 \"#tag2\"\n\n# list items in the current notebook tagged with \"#tag2\" AND \"#tag3\"\nnb --tags tag2,tag3\n\n# list items in all notebooks tagged with \"#tag1\" AND \"#tag2\" AND \"#tag3\" AND \"#tag4\"\nnb \\#tag1 \"#tag2\" --tags tag3,tag4 --all\n```\n\nTagged items can be [searched](#-search) with\n[`nb search`](#search) / [`nb q`](#search):\n\n```bash\n# search for items tagged with \"#tag1\"\nnb search --tag tag1\n\n# search for items tagged with \"#tag1\", shortcut and short option\nnb q -t tag1\n\n# search for items tagged with \"#tag1\", shortcut and argument\nnb q \\#tag1\n\n# search for items tagged with \"#tag1\", shortcut and argument, alternative\nnb q \"#tag1\"\n\n# search for items tagged with \"#tag1\" AND \"#tag2\"\nnb q --tag tag1 --tag tag2\n\n# search for items tagged with \"#tag1\" AND \"#tag2\", short options\nnb q -t tag1 -t tag2\n\n# search for items tagged with \"#tag1\" AND \"#tag2\", arguments\nnb q \\#tag1 \\#tag2\n\n# search for items tagged with \"#tag1\" AND \"#tag2\", tag list\nnb q --tags tag1,tag2\n\n# search for items tagged with either \"#tag1\" OR \"#tag2\", options\nnb q -t tag1 --or -t tag2\n\n# search for items tagged with either \"#tag1\" OR \"#tag2\", arguments\nnb q \\#tag1 --or \\#tag2\n\n# search for items tagged with either \"#tag1\" OR \"#tag2\", single argument\nnb q \"#tag1|#tag2\"\n\n# search for items tagged with \"#tag1\" AND \"#tag2\" AND \"#tag3\"\nnb q -t tag1 --tags tag2,tag3\n\n# search for items tagged with \"#tag1\" OR \"#tag2\" OR \"#tag3\"\nnb q -t tag1 --or --tags tag2,tag3\n\n# search for items tagged with \"#tag1\" OR \"#tag2\" OR \"#tag3\"\nnb q \\#tag1 --or -t tag2 --or \"#tag3\"\n```\n\nLinked tags can be [browsed](#-browsing) with [`nb browse`](#browse),\nproviding another dimension of browsability in terminal and GUI web browsers,\ncomplimenting \u003ca href=\"#-linking\"\u003e[[wiki-style linking]]\u003c/a\u003e.\n\nTags in notes,\nbookmarks,\nfiles in text-based formats,\nWord `.docx` documents,\nand [Open Document](https://en.wikipedia.org/wiki/OpenDocument) `.odt` files\nare rendered as links to the list of items in the notebook sharing that tag:\n\n```bash\n❯nb · example : 321\n\nExample Title\n\n#tag1 #tag2\n\nExample content with link to [[Sample Title]].\n\nMore example content:\n\n- one\n- two\n- three\n```\n\nUse the [`-t \u003ctag\u003e`](#browse) / [`--tag \u003ctag\u003e`](#browse) option\nto open [`nb browse`](#browse) to the list of\nall items in the current notebook or a specified notebook or folder that\nshare a tag:\n\n```bash\n# open to a list of items tagged with \"#tag2\" in the \"example\" notebook\n❯ nb browse example: --tag tag2\n❯nb · example\n\nsearch: [#tag2               ]\n\n[example:321] Example Title\n[example:654] Sample Title\n[example:789] Demo Title\n\n# shortcut alias and short option\n❯ nb b example: -t tag2\n❯nb · example\n\nsearch: [#tag2               ]\n\n[example:321] Example Title\n[example:654] Sample Title\n[example:789] Demo Title\n```\n\nFor more information about full-text search, see\n[Search](#-search) and [`nb search`](#search).\nFor more information about browsing, see\n[Browsing](#-browsing) and [`nb browse`](#browse).\n\n### 🔗 Linking\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#browse\"\u003e\u003ccode\u003enb browse\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\nNotes,\nbookmarks,\nfiles in text-based formats,\nWord `.docx` documents,\nand [Open Document](https://en.wikipedia.org/wiki/OpenDocument) `.odt` files\ncan reference other items using\n\u003ca href=\"#-linking\"\u003e[[wiki-style links]]\u003c/a\u003e,\nmaking `nb` a powerful terminal-first platform for\n[Zettelkasten](#-zettelkasten),\nwiki-style knowledge mapping,\nand other link-based note-taking methods.\n\nTo add a link from a note or bookmark to another in the same notebook,\ninclude the id, title, or relative path for the target item\nwithin double square brackets anywhere in the linking document:\n\n```bash\n# link to the item with id 123 in the root level of current notebook\n[[123]]\n\n# link to the item titled \"Example Title\" in the root level of the current notebook\n[[Example Title]]\n\n# link to the item with id 456 in the folder named \"Sample Folder\"\n[[Sample Folder/456]]\n\n# link to the item titled \"Demo Title\" in the folder named \"Sample Folder\"\n[[Sample Folder/Demo Title]]\n```\n\nTo link to an item in another notebook,\nadd the notebook name with a colon before the identifier:\n\n```bash\n# link to the item with id 123 in the \"sample\" folder in the \"example\" notebook\n[[example:sample/123]]\n\n# link to the item titled \"Example Title\" in the \"demo\" notebook\n[[demo:Example Title]]\n\n# link to the item with filename \"Example File.md\" in the \"sample\" notebook\n[[sample:Example File.md]]\n```\n\nThe text for a link can be specified after a pipe `|` character:\n\n```bash\n# render link to item 123 in the \"example\" notebook as [[Example Link Text]]\n[[example:123|Example Link Text]]\n```\n\n\u003ca href=\"#-linking\"\u003e[[wiki-style links]]\u003c/a\u003e cooperate well with\n[Org links](https://orgmode.org/guide/Hyperlinks.html),\nwhich have a similar syntax,\nproviding a convenient option for linking collections of Org files.\n\nLinked items can be [browsed](#-browsing) with [`nb browse`](#browse).\n\nFor more information about identifying items, see [Selectors](#-selectors).\n\n### 🌍 Browsing\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#browse\"\u003e\u003ccode\u003enb browse\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\nUse [`nb browse`](#browse) (shortcut: [`nb b`](#browse)) to\nbrowse, view, edit, and search linked notes, bookmarks, notebooks, folders,\nand other items using terminal and GUI web browsers.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg  src=\"https://xwmx.github.io/misc/nb/images/gui-gui-terminal-browse.png\"\n        alt=\"nb browse\"\n        width=\"500\"\u003e\n\u003c/div\u003e\n\n[`nb browse`](#browse) includes an embedded, terminal-first web application\nthat renders\n\u003ca href=\"#-linking\"\u003e[[wiki-style links]]\u003c/a\u003e\nand\n[#hashtags](#-tagging)\nas internal links, enabling you to browse your notes and notebooks in web\nbrowsers, including seamlessly browsing to and from the offsite links in\nbookmarks and notes.\n\n```bash\n❯ nb browse\n❯nb · home : +\n\nsearch: [                    ]\n\n[home:6]  📌 Example Markdown Title\n[home:12] 🔒 example-encrypted.md.enc\n[home:11] 🔖 Example Bookmark (example.com)\n[home:10] 🔖 🔒 example-encrypted.bookmark.md.enc\n[home:9]  Example .org Title\n[home:8]  🌄 example-image.png\n[home:7]  📄 example.pdf\n[home:5]  🔉 example-audio.mp3\n[home:4]  Example LaTeX Title\n[home:3]  📹 example-video.mp4\n[home:2]  example.md\n[home:1]  📂 Example Folder\n```\n\nLists are displayed using the same format as `nb` and [`nb ls`](#ls),\nincluding [pinned](#-pinning) items, with each list item linked.\nLists are automatically paginated to fit the height of the terminal window.\n\n```bash\n❯ nb browse example:sample/demo/\n❯nb · example : sample / demo / +\n\nsearch: [                    ]\n\n[example:sample/demo/7] Title Seven\n[example:sample/demo/6] Title Six\n[example:sample/demo/5] Title Five\n[example:sample/demo/4] Title Four\n[example:sample/demo/3] Title Three\n\nnext ❯\n```\n\n[`nb browse`](#browse) is designed to make it easy to navigate within\nterminal web browsers using only keyboard commands,\nwhile also supporting mouse interactions.\nThe [`nb browse`](#browse) interface includes links\nto quickly jump to parent folders,\nthe current notebook,\nand other notebooks.\n\n[`nb browse`](#browse) opens in\n[w3m](https://en.wikipedia.org/wiki/W3m),\n[Links](https://en.wikipedia.org/wiki/Links_\\(web_browser\\)),\nor in the browser set in the `$BROWSER` environment variable.\nUse [`nb browse --gui`](#browse) / [`nb b -g`](#browse) to\nopen in the system's primary [GUI web browser](#browse---gui).\n\nTo open a specific item in [`nb browse`](#browse),\npass the [selector](#-selectors) for the item, folder, or notebook\nto [`nb browse`](#browse):\n\n```bash\n# open the item with id 42 in the folder named \"sample\" in the \"example\" notebook\n❯ nb browse example:sample/42\n❯nb · example : sample / 42 · ↓ · edit | +\n\nExample Title\n\n#tag1 #tag2\n\nExample content with link to [[Demo Title]].\n\nMore example content:\n\n  • one\n  • two\n  • three\n```\n\nItems can also be browsed with\n[`nb show --browse`](#show) / [`nb s -b`](#show),\nwhich behaves identically.\n\n[`nb browse`](#browse) is particularly useful for [bookmarks](#-bookmarks).\nCached content is rendered in the web browser along with comments and notes.\nInternal and external links are easily accessible directly in the terminal,\nproviding a convenient, distraction-free approach for browsing collections\nof bookmarks.\n\n```bash\n❯ nb browse text:formats/markdown/123\n❯nb · text : formats / markdown / 123 · ↓ · edit | +\nDaring Fireball: Markdown (daringfireball.net)\n\nhttps://daringfireball.net/projects/markdown/\n\nRelated\n\n  • https://en.wikipedia.org/wiki/Markdown\n\nComments\n\nSee also:\n\n  • [[text:formats/org]]\n  • [[cli:apps/nb]]\n\nTags\n\n#markup #plain-text\n\nContent\n\nDaring Fireball: Markdown\n\nDownload\n\nMarkdown 1.0.1 (18 KB) — 17 Dec 2004\n\nIntroduction\n\nMarkdown is a text-to-HTML conversion tool for web writers. Markdown allows\nyou to write using an easy-to-read, easy-to-write plain text format, then\nconvert it to structurally valid XHTML (or HTML).\n```\n\nNotes, bookmarks, files in text-based formats, source code,\nWord `.docx` documents, and\n[Open Document](https://en.wikipedia.org/wiki/OpenDocument) `.odt`\nfiles are converted into HTML and rendered in the browser. Use the down\narrow (`↓`) link to view or download the original file.\n\n#### `browse edit`\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg  src=\"https://xwmx.github.io/misc/nb/images/gui-terminal-browse-edit.png\"\n        alt=\"nb browse edit\"\n        width=\"500\"\u003e\n\u003c/div\u003e\n\nItems in text formats can be edited within terminal and GUI web browsers using\nthe `edit` link on the item page or by opening the item with\n[`nb browse edit`](#browse) / [`nb b e`](#browse),\nwhich automatically resizes the form to fit the current terminal window:\n\n```bash\n❯ nb browse edit text:formats/markdown/123\n❯nb · text : formats / markdown / 123 · ↓ · editing · - | +\n\n[# Daring Fireball: Markdown (daringfireball.net)         ]\n[                                                         ]\n[\u003chttps://daringfireball.net/projects/markdown/\u003e          ]\n[                                                         ]\n[## Related                                               ]\n[                                                         ]\n[- \u003chttps://en.wikipedia.org/wiki/Markdown\u003e               ]\n[                                                         ]\n[## Comments                                              ]\n[                                                         ]\n[See also:                                                ]\n[                                                         ]\n[- [[text:formats/org]]                                   ]\n[- [[cli:apps/nb]]                                        ]\n[                                                         ]\n[## Tags                                                  ]\n[                                                         ]\n\n[save] · last: 2021-01-01 01:00:00\n```\n\nTerminal web browsers provide different editing workflows.\n[`w3m`](https://en.wikipedia.org/wiki/W3m) opens items in your `$EDITOR`,\nthen returns you back to the browser to save changes and continue browsing.\nEdits in [`links`](https://en.wikipedia.org/wiki/Links_(web_browser))\nare performed directly in the browser.\n\nSyntax highlighting, block selection, and other\n[advanced editor features](#browse---gui-editing)\nare available with [`nb browse --gui`](#browse).\n\n#### `browse add`\n\nAdd an item within the browser using the `+` link or\n[`nb browse add`](#browse) / [`nb b a`](#browse).\nPass a notebook, folder, and / or filename selector to create a new note\nin that location:\n\n```bash\n❯ nb browse add text:formats/\n❯nb · text : formats / +\n\n[                                                   ]\n[                                                   ]\n[                                                   ]\n[                                                   ]\n[                                                   ]\n[                                                   ]\n[                                                   ]\n[                                                   ]\n[                                                   ]\n[                                                   ]\n\n[add]\n```\n\n[`nb browse add`](#browse) includes options for quickly pre-populating\nnew notes with content:\n\n```bash\n❯ nb browse add --title \"Example Title\" --content \"Example content.\" --tags tag1,tag2\n❯nb · home : +\n\n[# Example Title                                    ]\n[                                                   ]\n[#tag1 #tag2                                        ]\n[                                                   ]\n[Example content.                                   ]\n[                                                   ]\n[                                                   ]\n[                                                   ]\n[                                                   ]\n[                                                   ]\n\n[add]\n```\n\n#### `browse delete`\n\nUse the `-` link on the [`nb browse edit`](#browse) page or\n[`nb browse delete`](#browse) / [`nb b d`](#browse)\nto delete an item:\n\n```bash\n❯ nb browse delete example:4\n❯nb · example : 4 · ↓ · edit · - | +\n\n              deleting\n\n[4] example_file.md \"Example Title\"\n\n              [delete]\n\n```\n\n#### `browse` Search\n\n[`nb browse`](#browse) includes a search field powered by\n[`nb search`](#search)\nthat can be used to search the current notebook or folder.\nSearch queries are treated as command line arguments for\n[`nb search`](#search),\nproviding the ability to perform `AND` and `OR` queries.\nUse the\n[`-q \u003cquery\u003e`](#browse) / [`--query \u003cquery\u003e`](#browse)\noption to open [`nb browse`](#browse) to\nthe results page for a search:\n\n```bash\n# open to a list of items containing \"example\" in the current notebook\n❯ nb browse --query \"example\"\n❯nb · home\n\nsearch: [example             ]\n\n[home:321] Test Title\n[home:654] Sample Title\n[home:789] Demo Title\n\n# using shortcut alias and short option\n❯ nb b -q \"example\"\n❯nb · home\n\nsearch: [example             ]\n\n[home:321] Test Title\n[home:654] Sample Title\n[home:789] Demo Title\n```\n\nSearch for [#tags](#-tagging) with the\n[`-t`](#browse) / [`--tag`](#browse) / [`--tags`](#browse) options:\n\n```bash\n# open to a list of items tagged with \"#tag2\" in the current notebook\n❯ nb browse --tag tag2\n❯nb · home\n\nsearch: [#tag2               ]\n\n[home:654] Sample Title\n[home:789] Demo Title\n\n# using shortcut alias and short option\n❯ nb b -t tag2\n❯nb · home\n\nsearch: [#tag2               ]\n\n[home:654] Sample Title\n[home:789] Demo Title\n```\n\nFor more information about search options, see [Search](#-search) and\n[`nb search`](#search).\n\n#### `browse --gui`\n\nTo open any [`nb browse`](#browse) view in\nthe system's primary GUI web browser,\nadd the [`nb browse --gui`](#browse) / [`nb b -g`](#browse) option:\n\n```bash\n# open the item with id 123 in the \"sample\" notebook in the system's primary GUI browser\nnb browse sample:123 --gui\n\n# open the folder named \"example\" in the system's primary GUI browser,\n# short option\nnb browse example/ -g\n\n# open the current notebook in the system's primary GUI browser,\n# shortcut alias and short option\nnb b -g\n```\n\n##### `browse --gui` Editing\n\nBy default,\n[`nb browse --gui`](#browse)\nuses the browser's default `\u003ctextarea\u003e` for editing items.\n\n[Ace](https://ace.c9.io/) is a text editor for GUI web browsers\nthat provides advanced text editing functionality,\nincluding block selection and\n[syntax highlighting](#gui-web-syntax-highlighting).\n\nTo use Ace as the editor for [`nb browse --gui`](#browse),\nadd the following line to your `~/.nbrc` file:\n\n```bash\nexport NB_ACE_ENABLED=1\n```\n\nThe next time a form is loaded in [`nb browse`](#browse),\n`nb` will automatically download\n(from [GitHub](https://github.com/ajaxorg/ace-builds/)),\ninstall,\nand enable the Ace editor in\n[`nb browse edit --gui`](#browse) and [`nb browse add --gui`](#browse).\n\n#### `browse` Portability\n\n[`nb browse`](#browse) depends on\neither [`socat`](https://www.kali.org/tools/socat/)\nor\n[`ncat`](https://nmap.org/ncat/) (available as part of\nthe `ncat` or `nmap` package in most package managers) and\n[`pandoc`](https://pandoc.org/). When neither `socat` nor `ncat` is\navailable and the Bash version is 5.2 or higher, [`nb browse`](#browse)\nfalls back to a pure Bash implementation that supports all features\nexcept the Ace editor. When only `pandoc` is available,\nthe current note is rendered and\n\u003ca href=\"#-linking\"\u003e[[wiki-style links]]\u003c/a\u003e\ngo to unrendered, original files.\nWhen `socat`,`ncat`, or Bash 5.2+ is available without `pandoc`,\nfiles in plain text formats are rendered with the original markup unconverted.\nIf neither `ncat`, `socat`, Bash 5.2+, nor `pandoc` is available,\n[`nb browse`](#browse) falls back to the default behavior of [`nb show`](#show).\n\nWhen `nb` is installed on Windows,\n`socat` ([MSYS](https://packages.msys2.org/package/socat),\n[Cygwin](https://cygwin.com/packages/summary/socat.html)) is recommended.\n\n#### `browse` Privacy\n\n[`nb browse`](#browse) is completely local and self-contained within `nb`,\nfrom the CSS and JavaScript\nall the way down through the HTTP request parsing and response building,\nwith no imports, libraries, frameworks, or third-party code\noutside of the few binary dependencies\n(`bash`, `git`, `ncat` / `socat`, `pandoc`),\nthe Linux / Unix environment,\nand the optional [Ace editor](#ace-editor).\n\nTerminal web browsers don't use JavaScript, so visits from them are not\nvisible to some web analytics tools.\n[`nb browse`](#browse) includes a number of additional features\nto enhance privacy and avoid leaking information:\n\n- Page content is cached locally within each bookmark file,\n  making it readable in terminal and GUI web browsers\n  without requesting the page again or needing to be connected to the internet.\n- `\u003cimg\u003e` tags in bookmarked content are removed to avoid requests.\n- Outbound links are automatically rewritten to use an\n  [exit page redirect](https://geekthis.net/post/hide-http-referer-headers/#exit-page-redirect)\n  to mitigate leaking information via the\n  [referer header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer).\n- All pages include the `\u003cmeta name=\"referrer\" content=\"no-referrer\" /\u003e` tag.\n- Links include a `rel=\"noopener noreferrer\"` attribute.\n- `lynx` is opened with the `-noreferer` option.\n\n#### `browse` AsciiDoc\n\nTo [`browse`](#browse) items in [AsciiDoc](https://asciidoc.org/) format,\ninstall [`asciidoctor`](https://asciidoctor.org/).\n\n#### Shortcut Alias: `nb b`\n\n[`nb browse`](#browse) can also be used with the alias [`nb b`](#browse):\n\n```bash\n# open the current notebook in the terminal web browser\nnb b\n\n# open the item with id 123 in the \"example\" notebook using the terminal web browser\nnb b example:123\n\n# open the notebook named \"sample\" in the GUI web browser\nnb b sample: -g\n```\n\nFor more information, see [`nb browse`](#browse).\n\n### 🌄 Images\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#browse\"\u003e\u003ccode\u003enb browse\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#import\"\u003e\u003ccode\u003enb import\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#open\"\u003e\u003ccode\u003enb open\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#show\"\u003e\u003ccode\u003enb show\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\n`nb` can be used to view, organize, browse, reference, and work with images in\nterminals,\nweb browsers,\nand GUI applications.\n\n#### Image Items\n\n[Import](#%EF%B8%8F-import--export) images with [`nb import`](#import):\n\n```bash\n# import the image file \"example.png\" into the current notebook\nnb import example.png\n\n# import an image file from a URL into the current notebook\nnb import https://raw.githubusercontent.com/xwmx/nb/master/docs/images/nb.png\n\n# nb import \"sample.jpg\" into the \"demo\" folder in the \"example\" notebook\nnb import sample.jpg example:demo/\n```\n\nImported images are displayed with [`🌄` indicators](#indicators) in\n[lists](#listing--filtering):\n\n```bash\n❯ nb\nhome\n----\n[5] Example Five\n[4] 🌄 example-image.png\n[3] Example Three\n[2] Example Two\n[1] Example One\n```\n\nImported image items can be opened in the system GUI application for\nthe item's file type using [`nb open`](#open):\n\n```bash\n# open the image \"example-image.png\" in the system GUI photo viewer\nnb open example-image.png\n\n# open the image with id \"4\" in the system GUI photo viewer\nnb 4 o\n```\n\nImage items can be viewed in web browsers with [`nb browse`](#browse),\nproviding a convenient mechanism for\n[browsing](#-browsing) notebooks and folders containing image collections.\n\n[`nb browse`](#browse) renders image items within in an `\u003cimg\u003e` tag\non the item page. Open the item page for an image item by passing a\n[selector](#-selectors) to [`nb browse`](#browse), optionally including the\n[`-g`](#browse) / [`--gui`](#browse) option\nto open the page in the system GUI web browser:\n\n```bash\n# open item with id \"123\" in the terminal web browser\nnb browse 123\n\n# open item with id \"456\" in the \"example\" notebook in the GUI web browser\nnb browse example:456 --gui\n\n# open item \"example:456\" in the GUI web browser, alternative\nnb example:456 b -g\n```\n\nThe original file can be viewed or downloaded from the item page\nby either clicking the image item or using the down arrow (`↓`) link.\n\n[`nb browse --gui`](#browse---gui) displays images in any GUI web browser.\nSome terminal web browsers, such as [`w3m`](http://w3m.sourceforge.net/),\ncan be configured to display images.\n\n[`nb show`](#show) can display images directly in the terminal with\nsupported tools and configurations, including:\n\n- [`catimg`](https://github.com/posva/catimg)\n- [Chafa](https://github.com/hpjansson/chafa)\n- [ImageMagick](https://imagemagick.org/) with a terminal that\n  supports [sixels](https://en.wikipedia.org/wiki/Sixel)\n- [`imgcat`](https://www.iterm2.com/documentation-images.html) with\n  [iTerm2](https://www.iterm2.com/)\n- [kitty's `icat` kitten](https://sw.kovidgoyal.net/kitty/kittens/icat.html)\n- [`termvisage`](https://github.com/AnonymouX47/termvisage)\n- [`timg`](https://github.com/hzeller/timg)\n- [`viu`](https://github.com/atanunq/viu)\n\nA preferred image viewer tool can be set with the\n[`$NB_IMAGE_TOOL`](#nb_image_tool) variable in your `~/.nbrc` file,\nwhich can be opened in your editor with [`nb settings edit`](#settings).\n\n#### Inline Images\n\nImages can be referenced and rendered inline within\nnotes, bookmarks, and other items.\n\nTo reference an image in the same notebook,\nspecify the image's relative path within the notebook:\n\n```markdown\n# reference \"example.jpg\" from markdown\n![](example.jpg)\n\n# reference \"demo.png\" in the \"sample\" folder from markdown\n![](sample/demo.png)\n```\n\nImages in any notebook can be referenced using the `--original` URL,\nobtainable from the image's [`nb browse`](#browse) item page\nby either clicking the image item or using the down arrow (`↓`) link.\n\n```markdown\n# reference \"example.jpg\" in the \"home\" notebook with the --original URL\n![](http://localhost:6789/--original/home/example.jpg)\n```\n\nImage references in content are rendered inline within web browsers with\n[`nb browse`](#browse) and [`nb show --render`](#show).\n\n`\u003cimg\u003e` tags are stripped from bookmarked content when rendering to HTML.\nInline images can still be used in other bookmark sections like\n[`## Comment`](#-comment).\n\n### 🗂 Zettelkasten\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\nZettelkasten (German: \"slip box\") is a method of note-taking and\npersonal knowledge management modeled around a few key features:\n\n- Notes are taken liberally on index cards.\n- Each note is numbered for easy reference.\n- Index cards are organized into boxes.\n- Index cards can reference other index cards.\n- Cards can include tags and other metadata.\n\nSince `nb` works directly on plain text files\norganized in normal system directories in normal git repositories,\n`nb` is a very close digital analogue to physical zettelkasten note-taking.\n\n|    Zettelkasten   |                       `nb`                      |\n|:-----------------:|:-----------------------------------------------:|\n| index cards       | [notes](#-notes) \u0026 [bookmarks](#-bookmarks)     |\n| numbering         | ids \u0026 [selectors](#-selectors)                  |\n| slip boxes        | [notebooks](#-notebooks)                        |\n| tags              | [#tags](#-tagging)                              |\n| metadata          | [front matter](#front-matter)                   |\n| cross-references  |  \u003ca href=\"#-linking\"\u003e[[wiki-style links]]\u003c/a\u003e   |\n| fast note-taking  | [`nb add`](#adding)/[`nb \u003curl\u003e`](#-bookmarks)   |\n\nFor more information about Zettelkasten, see\n[Wikipedia](https://en.wikipedia.org/wiki/Zettelkasten).\n\n### 📂 Folders\n\n\u003cp\u003e\n  \u003csup\u003e\n    \u003ca href=\"#overview\"\u003e↑\u003c/a\u003e ·\n    \u003ca href=\"#add\"\u003e\u003ccode\u003enb add\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#browse\"\u003e\u003ccode\u003enb browse\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#folders\"\u003e\u003ccode\u003enb folders\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#list\"\u003e\u003ccode\u003enb list\u003c/code\u003e\u003c/a\u003e,\n    \u003ca href=\"#ls\"\u003e\u003ccode\u003enb ls\u003c/code\u003e\u003c/a\u003e\n  \u003c/sup\u003e\n\u003c/p\u003e\n\nItems can be organized in folders.\nTo add a note to a folder,\ncall [`nb add`](#add) with the folder's relative path within the notebook\nfollowed by a slash:\n\n```bash\n# add a new note in the folder named \"example\"\nnb add example/\n\n# add a new note in the folder named \"demo\" in \"example\"\nnb add example/demo/\n```\n\n`nb` automatically creates any intermediate folders as needed.\n\nFolders can be created directly using [`nb add folder`](#add),\n[`nb folders add`](#folders), and [`nb add --type folder`](#add):\n\n```bash\n# create a new folder named \"sample\"\nnb add folder sample\n\n# create a new folder named \"sample\", alternative\nnb folders add sample\n\n# create a new folder named \"demo\"\nnb add demo --type folder\n\n# create a folder named \"example\" containing a folder named \"test\"\nnb add example/test --type folder\n```\n\nTo list the items in a folder, pass the folder relative path to\n`nb`,\n[`nb ls`](#ls),\n[`nb list`](#list),\nor [`nb browse`](#browse)\nwith a trailing slash:\n\n```bash\n❯ nb example/demo/\nhome\n----\n[example/demo/3] Title Three\n[example/demo/2] Title Two\n[example/demo/1] Title One\n```\n\nFolders can also be identified by the folder'","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwmx%2Fnb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxwmx%2Fnb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwmx%2Fnb/lists"}