dsh-cubox
Cubox sync plugin for DeepSeek Harness: scheduled sync, AI daily brief from your prompt template into Obsidian, per-card markdown export — via the /c/api/cli endpoints
- Stars
- 0
- Language
- TypeScript
- Created
- Aug 23, 2026
- Updated
- Sep 13, 2026
Introduction
dsh-cubox
English | 中文
Cubox sync for DeepSeek Harness: scheduled sync of your Cubox collection, with an AI daily brief generated from your own prompt template and written straight into Obsidian — via the same /c/api/cli endpoints the official cubox-cli uses. Agent tools plus a web settings panel.
Features
- Scheduled sync — a timer pulls your latest bookmarks into a local cache (
~/.dsh/dsh-cubox-cache.json) every N minutes (default 60, configurable; 0 disables the timer). Manual sync anytime withcubox_sync. - AI daily brief — write your own prompt template (e.g. "今日收藏简报",
{collection}is replaced with the formatted collection for the sync window: title / source / summary / annotations). When an LLM key is configured, every sync generates a brief into the output dir —今日收藏简报-YYYY-MM-DD.mdfor a 1-day sync,最近N日收藏简报-YYYY-MM-DD.mdfor wider windows (each window gets its own file). - Markdown export — set
outputDirand optionally keep one markdown file per card (frontmatter + title + description + Cubox/original links + annotations, same layout as the official Cubox Obsidian plugin). ToggleexportCardsoff to write only the AI brief. - Query —
cubox_cardsfilters by keyword, time window, annotated/starred/read status. - flomo annotation sync — after each sync, newly created / changed annotations (highlights + thoughts) are pushed to flomo as a daily digest (card title + link + annotations). It reuses the
~/.dsh/dsh-flomo.jsoncredentials (no new secret), keeps a local dedup ledger (~/.dsh/.cubox-flomo-annotations-sent) so nothing is pushed twice, only pushes annotations older than N minutes (default 60) to avoid half-typed notes, replaces every ASCII#in the body with the full-width#(#123still reads as#123; flomo only turns an ASCII#wordinto a tag) and appends only the configured tag, auto-splits long digests across memos, and can targetflomo/ local markdown / Notion with an optional LLM rewrite ({digest}prompt). - Config & status —
cubox_config/cubox_status/cubox_flomo; credentials persist to~/.dsh/dsh-cubox.json(mode 0600), secrets never echoed. - Settings panel — Settings → Cubox: paste the API-extension link, set the sync interval, pick the local export folder (OS folder chooser), toggle per-card export, edit the AI brief prompt and LLM settings (OpenAI-compatible, defaults to DeepSeek), and configure / manually push the flomo annotation digest.
Install
# after publishing to GitHub (repo tagged with the `dsh-plugin` topic)
dsh plugin --profile web add github:zhengjy01/dsh-cubox
# local development
dsh plugin --profile web add link:/path/to/dsh-cubox
Restart dsh web. The plugin ships pre-built — lib/index.js is plain ESM.
Current release: v0.2.0 (Releases · npm).
Configure
-
Open Cubox preferences → Extensions & Automation → API Extension → enable it and copy your unique link (e.g.
https://cubox.pro/c/api/save/abcd12345). -
Give the link to the plugin — either in the settings panel (Settings → Cubox), or just ask the agent:
帮我配置 Cubox,API 链接是 https://cubox.pro/c/api/save/abcd12345The agent calls
cubox_configto persist it.cubox.prois the default server;cubox.ccis the international instance (auto-detected from the link). -
(Optional) Set the export dir + AI brief: choose the local folder, paste an OpenAI-compatible API key (DeepSeek by default), and edit the prompt template.
{collection}is replaced with today's collection list.
Then:
同步一下今天的收藏 → cubox_sync (days=1)
查一下收藏里关于 LLM 的文章 → cubox_cards (keyword="LLM")
The API link and the LLM key are credentials — anyone holding them can read (and modify) your Cubox data or spend your LLM quota. They are stored in
~/.dsh/dsh-cubox.json(mode 0600). To rotate, refresh in the Cubox API-extension page, then re-configure.
Tools
| Tool | Purpose |
|---|---|
cubox_status | Connection & cache status |
cubox_config | Set / clear apiLink, server, token, syncMinutes, outputDir, exportCards, llm*, plus the digest options flomoEnabled / exportDest / flomoTag / flomoMinAgeMinutes / usePrompt / exportPrompt / notion* |
cubox_sync | Pull the last N days (default today) into the local cache + export markdown + AI brief + digest push |
cubox_cards | Query the collection (keyword / days / annotated / starred / read) |
cubox_flomo | Push new / changed annotations to flomo now (days window / force bypass min age / tag override) |
Notes
- The public Cubox "open API" only accepts saves; reads go through the internal
/c/api/cli/*family (same endpoints as the official cubox-cli). - The sync cache is a plain JSON snapshot (cards + today's annotations, deduped by id, newest first) — agents can answer "what did I save" without extra round trips.
- License: MIT