Yourtion49 downloadsTalk to a Feishu bot, and it lands in your vault as a diary.
Talk to a Feishu bot, and it lands in your Obsidian vault as a diary. No server required — everything goes through Feishu's official open platform APIs (WebSocket long connection).
Also available as a standalone CLI — npx feishu-diary writes the same diary into any local directory, no Obsidian needed (see CLI usage).
FeishuDiary/YYYY/YYYY-MM.md (one file per month, one ## day section per day), with messages in the same minute sharing one timestamp headingdocs/DECISIONS.md)This plugin connects to the following endpoints on your machine:
open.feishu.cn — Feishu Open Platform: send/receive messages, download message resources, manage the app you ownaccounts.feishu.cn — scan-to-create-app device authorization (only when you use the QR setup)msg-frontier.feishu.cn — WebSocket long connection for receiving messagesYour App Secret is stored in Obsidian's SecretStorage, never in plugin data files. The bot only recognizes the first user who messages it (or the user who scanned the QR code) — no contact permissions are requested.
The bot service is off by default and toggled per machine via "在本机启用" (Enable on this machine) — the switch is stored locally and never synced with your vault, so multi-machine vaults only listen on the machines you choose.
The same pipeline ships as an npm package (feishu-diary) for headless environments — a home server, a NAS, a Raspberry Pi, or simply anywhere without Obsidian:
npx feishu-diary init # scan a QR code to create the Feishu app, then publish it
# (link provided) — writes ~/.feishu-diary.json (mode 600)
npx feishu-diary # runs with zero arguments, reading that config file
Prefer explicit credentials? Everything is overridable (args > env > config file > defaults):
npx feishu-diary --app-id cli_xxx --app-secret yyy --dir ~/diary
# or via environment variables (a .env file works too, see --env-file)
FEISHU_APP_ID=cli_xxx FEISHU_APP_SECRET=yyy npx feishu-diary --dir ~/diary
Run npx feishu-diary --help for the full option list; the config file fields and URL hooks are documented in docs/config.md. Notes:
<dir>/YYYY/YYYY-MM.md (one file per month) with the same data contract as the plugin (append-only, atomic writes, attachments under <dir>/attachments/)<dir>/.feishu-diary-state.json — back up the directory and you've backed up everything<dir>/.trash/ (recoverable) instead of the system trash"hooks": {...}) or as a hooks.json next to your diary — matching links get routed to your own commands, the original message still lands in the diary, each matched URL runs your command (URL appended as the last argument, no shell), and the command's stdout is appended to the day's file. Podcast downloads, doc archiving, whatever you script. See --help for the formatRequires Node.js ≥ 18.
pnpm install
pnpm run lint && pnpm run fmt:check
pnpm test
pnpm run build # produces main.js (plugin) + dist/cli.cjs (npm CLI)
pnpm run release # bump version (package/manifest/versions) + commit + tag, all in one
Channel verification and onboarding scripts live in scripts/p0/README.md; design decisions in docs/DECISIONS.md.
对着飞书机器人说话,内容落进本地 Obsidian 库——不依赖服务器,全部走飞书官方开放 API(WebSocket 长连接)。也提供独立 CLI 版(npx feishu-diary),无需 Obsidian,可跑在任意有 Node 的机器上,写入任意本地目录。
## 日 段),同分钟消息共享时间戳段头npx feishu-diary init # 扫码创建飞书应用(确认页也可复用已有应用),按提示发布后
# 生成 ~/.feishu-diary.json(含凭据与主人 open_id,权限 600)
npx feishu-diary # 零参数启动,自动读该配置文件
也支持显式传参/环境变量(优先级 参数 > 环境变量 > 配置文件 > 默认,--env-file 可加载 .env):
npx feishu-diary --app-id cli_xxx --app-secret yyy --dir ~/diary
FEISHU_APP_ID=cli_xxx FEISHU_APP_SECRET=yyy npx feishu-diary --dir ~/diary
<dir>/.feishu-diary-state.json<dir>/.trash/(可恢复),不走系统废纸篓"hooks" 字段或日记目录的 hooks.json——命中规则的链接自动交给自定义命令处理,原文照常记日记,命令 stdout 追加进当天日记(URL 作为命令最后一个参数,不经 shell);配置格式见 npx feishu-diary --helpnpx feishu-diary --helpMIT