使用 xwmx/nb

#安装

1
2
3
4
5
6
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install --lts
npm install -g nb.sh
sudo "$(which nb)" completions install # install Bash and Zsh completion scripts (recommended)

#用法

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
nb add
nb <url>
nb edit <id>
nb show <id>
nb open <id>
nb list
nb search <query>
nb browse
nb notebooks add <name>
nb settings
nb help

#用途

  • 命令行记笔记、为链接加书签、支持 Backlink
  • 可同步至 GitHub,备份方便

ref:

  1. https://github.com/xwmx/nb
  2. https://xwmx.github.io/nb/
  3. https://github.com/nvm-sh/nvm#installing-and-updating