Dnote:程序员的命令行笔记工具

天天

发布于290天前
龙猫也是猫
今天跟大家分享一个超级实用的工具——Dnote。先不扯那些高大上的概念,直接说人话:这就是一个让你在终端里记笔记的工具,特别适合我们这些天天敲代码的人。

## 为啥要用 Dnote?

你是不是也有这样的困扰:

- 写代码的时候突然想记个知识点,打开笔记软件又怕打断思路
- 收藏了一堆代码片段,用的时候死活找不到
- 在服务器上工作,想记个东西还得切出去

Dnote 就是为了解决这些痛点而生的。它是专门为程序员设计的命令行笔记工具,让你不用离开终端就能快速记录和查找信息。



https://appstore.lazycat.cloud/#/shop/detail/xyz.mxue.dnote


## 使用攻略

应用安装后,需要先注册一个用户

![image.png](https://dl.playground.lazycat.cloud/guidelines/496/2d01e71f-d7cb-49d4-9360-ff4af5e1a8e8.png "image.png")
登录后进入主页

![image.png](https://dl.playground.lazycat.cloud/guidelines/496/1cdb9a51-93aa-4f4a-9ef5-a24fe2ec547f.png "image.png")

这时候你相当于有了服务端。打开命令行工具,ssh进去懒猫
先执行命令:curl -s https://www.getdnote.com/install | sh

![image.png](https://dl.playground.lazycat.cloud/guidelines/496/bcf6bc7d-9079-4cab-8221-e9ea67865295.png "image.png")

第一次运行 CLI 之后在 ~/.config/dnote/dnoterc 中生成配置文件
默认的配置文件信息如下
editor: nvim
apiEndpoint: https://api.getdnote.com
需要更改将 apiEndpoint: https://api.getdnote.com 改为 apiEndpoint: https://dnote.设备名.heiyu.space/api

![image.png](https://dl.playground.lazycat.cloud/guidelines/496/03a76565-7883-46c7-8ca4-3e7b8cb662ef.png "image.png")
创建一个叫 "工作" 的笔记本
dnote add 工作 

![image.png](https://dl.playground.lazycat.cloud/guidelines/496/48540b82-c8c5-438c-b6f5-420d3b206973.png "image.png")

快速记录代码片段

```bash
# 记录一个有用的命令
dnote add linux "查看端口占用: netstat -tlnp | grep :8080"

# 记录多行内容
dnote add react "
useState 的基本用法:
const [count, setCount] = useState(0);
setCount(count + 1);
"
```
查看所有笔记本

```bash
dnote ls
```

![image.png](https://dl.playground.lazycat.cloud/guidelines/496/4f96d757-e0b0-4c18-a1ba-b9a25fe716c5.png "image.png")
会显示你所有的笔记本和每个本子里有多少条笔记。
 

Dnote 支持全文搜索,当你的笔记多了之后,这个功能就是救命稻草。

```bash
# 搜索包含 "docker" 的所有笔记
dnote find docker

# 搜索多个关键词
dnote find "react hooks"
```
 
### 删除笔记

```bash
# 删除 linux 笔记本中的第 2 条笔记
dnote remove linux 2
```
 

## 总结

Dnote 是一个简单实用的工具。它不会打断你的工作流程,让你能专注于编程本身。虽然功能不复杂,但解决的都是程序员的实际痛点。
 

评论

0

暂无评论

说点什么呢~
收藏
0
0
0