用命令行快速操作 nowen-note 笔记库。
cd packages/nowen-cli
npm install
npm run build首次使用需要配置服务器地址和凭据:
npx nowen-cli config set --url http://localhost:3001 --username admin --password admin123nowen-cli notebooks list # 列出笔记本
nowen-cli notebooks create <名称> # 创建笔记本nowen-cli notes list # 列出笔记
nowen-cli notes get <id> # 获取笔记
nowen-cli notes create <标题> # 创建笔记
nowen-cli notes update <id> # 更新笔记
nowen-cli notes delete <id> # 删除笔记nowen-cli search <关键词> # 搜索笔记nowen-cli tags list # 列出标签nowen-cli tasks list # 列出任务
nowen-cli tasks create <标题> # 创建任务nowen-cli ai ask <问题> # 知识库问答nowen-cli notes create "学习笔记" --notebook "学习" --content "今天学习了 React"nowen-cli search "React useEffect"nowen-cli ai ask "什么是 useMemo?"CLI 工具可以集成到自动化脚本中:
#!/bin/bash
# 每天自动创建日记
DATE=$(date +%Y-%m-%d)
nowen-cli notes create "$DATE 日记" --notebook "日记"- OpenAPI 接入指南 — REST API
- SDK 使用教程 — TypeScript SDK
- MCP Server 教程 — AI 集成
本教程基于 nowen-note v1.1.18 编写。