From e6348782c98393e65c8e1c23befb9bb354c7bc1d Mon Sep 17 00:00:00 2001 From: wqx1999 Date: Thu, 5 Nov 2026 12:17:38 +0100 Subject: [PATCH] feat(litman): add litman plugin litman (https://litman.dev) is an open-source local literature manager driven by the `lit` command. This skill-only plugin gets it installed and connected to ZCode; everything else stays in litman. - One skill, `litman-setup`: checks for litman, asks the user before installing, runs the official one-line installer, then `lit install-skill --agent zcode`. - No hooks, MCP servers, UI or credentials. README in English and Chinese, with network access, commands and file writes listed. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BsBCXm7NYUzJW4bBwavgsJ --- .../litman/.zcode-plugin/plugin.json | 25 ++++++++ external_plugins/litman/LICENSE | 21 +++++++ external_plugins/litman/README.md | 59 +++++++++++++++++++ external_plugins/litman/README_CN.md | 50 ++++++++++++++++ .../litman/skills/litman-setup/SKILL.md | 59 +++++++++++++++++++ marketplace.json | 23 ++++++++ 6 files changed, 237 insertions(+) create mode 100644 external_plugins/litman/.zcode-plugin/plugin.json create mode 100644 external_plugins/litman/LICENSE create mode 100644 external_plugins/litman/README.md create mode 100644 external_plugins/litman/README_CN.md create mode 100644 external_plugins/litman/skills/litman-setup/SKILL.md diff --git a/external_plugins/litman/.zcode-plugin/plugin.json b/external_plugins/litman/.zcode-plugin/plugin.json new file mode 100644 index 00000000..46441564 --- /dev/null +++ b/external_plugins/litman/.zcode-plugin/plugin.json @@ -0,0 +1,25 @@ +{ + "name": "litman", + "version": "0.1.0", + "skills": "./skills", + "description": "Set up litman, a local literature manager driven by your AI assistant: installs litman with your consent and connects its skills to ZCode.", + "description_i18n": { + "en": "Set up litman, a local literature manager driven by your AI assistant: installs litman with your consent and connects its skills to ZCode.", + "zh-CN": "接入 litman(由 AI 助手打理的本地文献库):经你同意后安装 litman,并把它的 skill 接入 ZCode。" + }, + "author": { + "name": "Qingxin Wang", + "url": "https://litman.dev" + }, + "homepage": "https://litman.dev", + "repository": "https://github.com/wqx1999/litman", + "license": "MIT", + "keywords": [ + "litman", + "literature", + "papers", + "pdf", + "reference-manager", + "research" + ] +} diff --git a/external_plugins/litman/LICENSE b/external_plugins/litman/LICENSE new file mode 100644 index 00000000..178adf49 --- /dev/null +++ b/external_plugins/litman/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Qingxin Wang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/external_plugins/litman/README.md b/external_plugins/litman/README.md new file mode 100644 index 00000000..2192dd9b --- /dev/null +++ b/external_plugins/litman/README.md @@ -0,0 +1,59 @@ +# litman for ZCode + +[中文](./README_CN.md) + +[litman](https://litman.dev) keeps every paper you read on your own computer and +lets your AI assistant do the filing. This plugin connects it to ZCode: when +litman is missing, the agent offers to install it, then hands over to litman's +own skills. + +litman is a separate open-source program ([GitHub](https://github.com/wqx1999/litman), +AGPL-3.0). It works without this plugin; the plugin only installs it and +connects it to ZCode. + +## Use + +In any session, ask about litman or your literature library, for example +"set up litman for me". Or type `/litman` in the input box and pick +`$litman-setup` under Skills. + +The `litman-setup` skill: + +1. Runs `lit --version`. If litman and its skills are already there, it hands + over to them. +2. Otherwise asks whether to install litman, and installs it only after a clear + yes, with the official one-line installer. +3. Runs `lit install-skill --agent zcode`, which copies litman's skills to + `~/.agents/skills`. +4. If you have no library yet, asks where to keep it and runs `lit init`. + +ZCode may load litman's skills only in a new session. The agent can open your +library as a new ZCode workspace with `lit agent zcode`. + +## Skills + +| Skill | Entry | Purpose | +| --- | --- | --- | +| `litman-setup` | `$litman-setup`, or triggered by context | Check, install and connect litman | + +## What it does on your machine + +- **Network**: downloads the installer from `get.litman.dev`. The installer + installs [uv](https://github.com/astral-sh/uv), a Python runtime managed by + uv, and litman from PyPI. Callers in mainland China are served a version of + the installer that downloads from mirrors reachable there. +- **Commands**: the installer, and `lit` commands (`lit --version`, + `lit install-skill`, `lit vault list`, `lit init`, `lit agent`). ZCode asks + for approval as usual. +- **Files**: uv and litman under your home directory (`~/.local/bin` and uv's + tool directory); the installer adds that directory to your `PATH` if needed + and creates a litman shortcut. litman's skills go to `~/.agents/skills`; your + library goes to the folder you choose. +- **No** hooks, MCP servers, model or API services of its own, or credentials. + +## License + +The plugin is MIT-licensed and bundles no third-party code. litman is +AGPL-3.0; uv is MIT / Apache-2.0. + +Questions and bugs: [litman issues](https://github.com/wqx1999/litman/issues). diff --git a/external_plugins/litman/README_CN.md b/external_plugins/litman/README_CN.md new file mode 100644 index 00000000..b4f95709 --- /dev/null +++ b/external_plugins/litman/README_CN.md @@ -0,0 +1,50 @@ +# litman ZCode 插件 + +[English](./README.md) + +[litman](https://litman.dev) 把你读过的每篇论文都存在你自己的电脑上,归档交给 +AI 助手来做。本插件把它接入 ZCode:没装 litman 时,agent 会问你要不要装,装好后 +交给 litman 自己的 skill。 + +litman 是独立的开源程序([GitHub](https://github.com/wqx1999/litman),AGPL-3.0), +不装本插件也能用;插件只负责把它装上、接入 ZCode。 + +## 使用 + +在任意会话里提到 litman 或你的文献库即可,例如「帮我装 litman」;也可以在输入框打 +`/litman`,在「技能」里选 `$litman-setup`。 + +`litman-setup` skill 的流程: + +1. 运行 `lit --version`。已经装好 litman 和它的 skill,就直接交给它们。 +2. 没装就先问你要不要装,你明确同意后才用官方一行安装命令安装。 +3. 运行 `lit install-skill --agent zcode`,把 litman 的 skill 复制到 + `~/.agents/skills`。 +4. 还没有文献库时,问你放在哪,再运行 `lit init`。 + +ZCode 可能要在新会话里才加载 litman 的 skill。agent 可以用 `lit agent zcode` +把你的文献库作为新的 ZCode 工作区打开。 + +## Skills + +| Skill | 入口 | 用途 | +| --- | --- | --- | +| `litman-setup` | `$litman-setup`,或按上下文自动触发 | 检查、安装并接入 litman | + +## 会在你的电脑上做什么 + +- **网络访问**:从 `get.litman.dev` 下载安装脚本。安装脚本会安装 + [uv](https://github.com/astral-sh/uv)、由 uv 管理的 Python 运行时,以及 PyPI 上的 + litman。从中国大陆访问时,拿到的安装脚本会改从大陆可访问的镜像下载。 +- **命令执行**:安装脚本,以及 `lit` 命令(`lit --version`、`lit install-skill`、 + `lit vault list`、`lit init`、`lit agent`)。ZCode 照常弹出审批。 +- **文件写入**:uv 和 litman 装在你的用户目录下(`~/.local/bin` 和 uv 的工具目录); + 需要时安装脚本会把该目录加进 `PATH`,并创建 litman 快捷方式。litman 的 skill + 写到 `~/.agents/skills`;文献库放在你选的文件夹。 +- **没有** Hook、MCP 服务、自带的模型或 API 服务,也不涉及任何凭据。 + +## 许可证 + +本插件使用 MIT 许可证,不含第三方代码。litman 使用 AGPL-3.0;uv 使用 MIT / Apache-2.0。 + +问题和 bug:[litman issues](https://github.com/wqx1999/litman/issues)。 diff --git a/external_plugins/litman/skills/litman-setup/SKILL.md b/external_plugins/litman/skills/litman-setup/SKILL.md new file mode 100644 index 00000000..d0531e20 --- /dev/null +++ b/external_plugins/litman/skills/litman-setup/SKILL.md @@ -0,0 +1,59 @@ +--- +name: litman-setup +description: Install litman, the local literature manager, and connect it to ZCode. Use when the user mentions litman, `lit`, or their literature vault (文献库) and litman's own `lit-library` skill is not available, or when a `lit` command is not found. +--- + +# litman setup + +litman (https://litman.dev) is a local literature manager driven by the `lit` +command. This skill only gets litman installed and connected to ZCode. After +that, litman's own skills (`lit-library`, `lit-reading`) do the real work. + +## 1. Check + +Run `lit --version`. + +- It works and the `lit-library` skill is available: stop here and follow + `lit-library` / `lit-reading`. +- It works but there is no `lit-library` skill: go to step 4. +- `lit` is not found: go to step 2. + +## 2. Ask + +Ask the user, in their language, whether to install litman. One or two +sentences: litman is a local literature manager, and installing it runs the +official installer from get.litman.dev. Do not install without a clear yes. + +## 3. Install + +Run the official one-line installer for this system: + +- macOS / Linux: `curl -LsSf https://get.litman.dev/install.sh | sh` +- Windows (PowerShell): `powershell -ExecutionPolicy ByPass -c "irm https://get.litman.dev/install.ps1 | iex"` + +ZCode may not see the new PATH until it restarts, so `lit` can still be "not +found" right after installing. Then call it by its full path: +`~/.local/bin/lit`, on Windows `%USERPROFILE%\.local\bin\lit.exe` (if the +installer printed another directory, use that one). + +## 4. Connect to ZCode + +Run `lit install-skill --agent zcode` (with the full path if needed). It copies +litman's skills to `~/.agents/skills`, where ZCode finds them. If it reports +out-of-date copies, run it again with `--force`. + +## 5. Vault + +Run `lit vault list`. If no vault is registered, ask the user where to keep +their library, then run `lit init ""` (it creates +`/literature_vault` and makes it the active vault). + +## 6. Hand over + +Tell the user litman is ready. Do not list or explain `lit` commands from +memory: litman's own skills cover them, and `lit --help` lists them. + +ZCode may load the new skills only in a new session: if `lit-library` is still +not available here, offer to run `lit agent zcode`, which opens the active +vault as a ZCode workspace, where litman's skills are available. From then on +use `lit-library` / `lit-reading`. diff --git a/marketplace.json b/marketplace.json index 76d6d9be..37e3934f 100644 --- a/marketplace.json +++ b/marketplace.json @@ -1499,6 +1499,29 @@ "image-to-video", "mcp" ] + }, + { + "name": "litman", + "source": "./external_plugins/litman", + "description": "Set up litman, a local literature manager driven by your AI assistant: installs litman with your consent and connects its skills to ZCode.", + "description_i18n": { + "en": "Set up litman, a local literature manager driven by your AI assistant: installs litman with your consent and connects its skills to ZCode.", + "zh-CN": "接入 litman(由 AI 助手打理的本地文献库):经你同意后安装 litman,并把它的 skill 接入 ZCode。" + }, + "version": "0.1.0", + "author": { + "name": "Qingxin Wang", + "url": "https://litman.dev" + }, + "category": "productivity", + "keywords": [ + "litman", + "literature", + "papers", + "pdf", + "reference-manager", + "research" + ] } ] } \ No newline at end of file