Skip to content

Releases: qnnp-me/wpops

v0.4.2

Choose a tag to compare

@qnnp-me qnnp-me released this 04 Oct 17:33

Fixed

  • wpops commands 现在按 spec 声明的动作工作:commands / commands list 输出人类可读概览(组/动作/写操作标记),commands show 或 commands --json 输出机器可读 JSON;未知动作按用法错误处理(退出码 2)。此前无论带不带动作都只输出 JSON。
  • 多个查询参数此前被静默丢弃(声明了下划线键、而 CLI 存的是连字符键):media list --media-type/--mime-type、pages list --menu-order、users list --role 已修复。
  • 本地命令(sites / completion / help <未知组>)的用法错误现在也返回退出码 2(此前为 1),与文档约定一致。
  • users 的别名 user 补进 lib/spec.js:此前能用但不进补全/帮助,且 --all user ... 写操作不触发 --yes 护栏。
  • 未配置站点时不再抛 Invalid URL,改为可读提示「未配置站点地址(先运行 wpops setup…)」(退出码 1)。
  • sites rm/rename 增加站点名校验,避免 ../ 之类的路径穿越。
  • User-Agent 从写死的 wpops/0.2 改为读取实际包版本,不再随发版漂移。
  • 非数字 id(如 posts get abc)现在本地直接报用法错误(退出码 2),不再拼出 .../NaN 去撞服务端 404。覆盖 posts/pages/content/media/分类/评论/用户/菜单/菜单项/修订/区块/导航。
  • --all-pages 不再强制 per_page=100,会尊重调用方的 --per-page。
  • content <rest_base> list 现在套用通用筛选键(--orderby/--order/--author/--after/--before/--slug/--parent/--menu-order/--exclude/--include/--offset),此前自定义类型只透传 --search/--status。
  • --quiet / --output <文件> 现在也覆盖直接写 stdout 的输出(如 posts export <id> 不带 --file 时的正文)。
  • statuses 等无子动作的组拒绝多余动作,不再静默忽略。
  • app-passwords list 对非数组响应容错。

Changed

  • wpops settings --help 补齐实际支持的开关(--from-file、--start-of-week、--language、--page-for-posts、--default-post-format、--default-ping-status、--default-comment-status)。
  • wpops health --help / commands --json 现在也反映 health <test> 这个动作。

完整对比:v0.4.1...v0.4.2

v0.4.1

Choose a tag to compare

@qnnp-me qnnp-me released this 04 Oct 17:08

[0.4.1] - 2026-10-05

Changed

  • 恢复 postinstall:安装时即把内置 skill 复制到发现目录(0.4.0 曾移除)。pnpm 10+ 需一次性 pnpm approve-builds -g wpops 批准该脚本(非交互);也可用 wpops setup / wpops install-skill 兜底。配置目录仍为用户级稳定目录(见 0.4.0)。

v0.4.0

Choose a tag to compare

@qnnp-me qnnp-me released this 04 Oct 16:58

[0.4.0] - 2026-10-05

Changed

  • 配置目录默认改到用户级稳定目录(Windows %APPDATA%\wpops,其他 $XDG_CONFIG_HOME/wpops 或 ~/.config/wpops)——不再默认放包目录,升级/重装不再丢配置。WPOPS_HOME 仍可覆盖。
  • 首次运行自动迁移旧版包目录内的 .env / sites/*.env 到新目录(旧文件保留);unix 下收紧配置权限(目录 0700 / 文件 0600)。
  • 移除 postinstall:安装不再触发包管理器的「构建脚本/脚本确认」(pnpm 等);内置 skill 改为 wpops setup 安装 + 首次运行时静默刷新。
  • 新增 AGENTS.md(仓库贡献者指引)。

v0.3.1

Choose a tag to compare

@qnnp-me qnnp-me released this 04 Oct 16:45

[0.3.1] - 2026-10-05

Changed

  • 内置 skill 的 frontmatter 增加 license: MIT(符合 agentskills.io 规范);仓库增加 agent-skills topic,便于 gh skill 发现。

v0.3.0

Choose a tag to compare

@qnnp-me qnnp-me released this 04 Oct 14:37

[0.3.0] - 2026-10-04

Added

  • 发布安全(两步走):内容创建未指定 --status 时显式按草稿创建(不再依赖服务端默认);新增 posts / pages / content 的 publish <id> 与 unpublish <id>。
  • export <id> --file <文件> 导出原始正文、import <id> --from-file <文件> 从文件导入正文,便于安全改版式。
  • 草稿/待审等非公开状态的内容写操作会回显后台编辑/预览链接;--dry-run 显示结果状态(如 将创建 posts(status=draft))。
  • 非阻断风险提示(stderr,--yes 或 --quiet 静默):修改已发布内容的正文(附 wpops revisions restore 回滚命令)、settings update、菜单位置绑定与删除菜单。

Changed

  • README / 内置 skill 增加“发布安全(两步走)”、revisions 回滚,以及页面构建器(Elementor/SiteOrigin 等)不要用 REST 改 post_content 的注意事项。
  • 版本 0.2.0 → 0.3.0。

v0.2.0

Choose a tag to compare

@qnnp-me qnnp-me released this 04 Oct 14:26

[0.2.0] - 2026-10-04

Added

  • 导航菜单一级命令:
    • wpops menus list|get|create|update|delete;用 --locations header,mobile 把菜单绑定到主题位置。
    • wpops menu-items list|get|create|update|delete,支持 --menus、--menu-order、--parent、--status、--type、--object、--object-id、--url、--target、--classes、--description、--attr-title、--xfn;delete 真正执行需 --force。
  • 核心 REST 覆盖大幅扩展:
    • content / terms:任意 show_in_rest 的 CPT / 自定义分类(按 rest_base)。
    • search 跨内容搜索;settings 读取/更新站点设置;types / taxonomies / statuses 自省。
    • revisions(list/get/delete/restore)、blocks(可复用区块)、navigation、templates、template-parts、global-styles。
    • widgets / sidebars、app-passwords(创建时明文只打印一次)。
    • comments create;plugins delete <plugin> --force;media sideload --url(从 URL 导入)、media edit-image(裁剪/旋转)。
    • abilities(list/get/run)、health(list/)、batch(仅 POST/PUT/PATCH/DELETE)。
  • CLI 能力:--all-pages 自动翻页;--fields / --csv / --table 输出投影;--quiet;--output <文件>;--site a,b;--timeout / --retries;sites show|rm|rename;completion bash|zsh|fish|powershell;help <组>。
  • 单一事实来源 lib/spec.js:组/动作/写操作/别名一处声明,派生 wpops help、wpops <组> --help、wpops commands --json、--all 写操作护栏(isMutation)与 shell 补全,避免文档与代码漂移。
  • wpops commands --json:机器可读命令清单(组/动作/是否写操作/全局开关),供 agent 现查现用。
  • 命令分发抽到 lib/run.js(导出可测试的 dispatch);新增 spec/help/dispatch 一致性测试,任何组或别名漏分发都会测试失败。
  • 所有菜单写命令支持 --dry-run;--all 护栏识别菜单与所有新写操作。
  • 注:/menus、/menu-items 由站点插件提供;abilities、health 也需对应插件。

Fixed

  • delete 的 --dry-run 现在是真预览:预览不再要求 --force(菜单/菜单项/分类/用户与文章/媒体 行为对齐);真正执行删除仍需 --force。
  • 菜单端点不存在(rest_no_route)时给出"需插件"的友好提示,便于排障。
  • JSON 文件输入容忍 UTF-8 BOM(Windows 重定向/记事本常见),--data / --requests-file / --from-file 等不再因 BOM 解析失败。
  • batch 明确拒绝 GET(核心 /batch/v1 只支持 POST/PUT/PATCH/DELETE),并兼容裸数组与 {"requests":[...]} 两种写法。

Changed

  • 用法/参数错误统一处理:stderr 打印「错误 + 精简用法 + wpops <组> --help 提示」,退出码 2;运行期错误仍为 1;显式 --help 仍走 stdout、退出码 0;--all 遇用法错误立即中止(不逐站重复)。
  • 内置 skill 改为自洽薄索引:只保留安全流程、能力索引与"现查现用"指引,不再引用其他 skill;精确字段改为运行时向 CLI(--help / commands --json / raw OPTIONS)查询。
  • README 命令清单/能力表补充上述用法,并说明 --dry-run 预览与 --force 的关系,以及"帮助由 spec 生成、不会漂移"。

v0.1.1

Choose a tag to compare

@qnnp-me qnnp-me released this 04 Oct 13:37

新增

  • wpops --version / -v 显示版本
  • 安装脚本支持一行流,不在仓库内时自动 git clone:
    iwr -useb .../install.ps1 | iex(Windows)、curl -fsSL .../install.sh | sh(macOS/Linux)

修复

  • npm bin 路径(去掉 ./ 前缀),确保发布后正确生成 wpops 命令

文档

  • README:一键安装、配置向导、一行流安装说明
  • 新增 CHANGELOG.md

安装:

npm i -g wpops
wpops setup

v0.1.0 - 首次发布

Choose a tag to compare

@qnnp-me qnnp-me released this 04 Oct 13:37

首次发布。

  • 连接与权限体检:wpops doctor(失败返回非 0)
  • 内容增删改查:文章 / 页面 / 媒体 / 分类 / 标签 / 评论 / 用户
  • 插件:列出 / 安装 / 启用 / 停用;主题:列出 / 切换
  • 多站点:sites/ 档案、-s <名字> 指定、--all 批量
  • 安全:--dry-run 预览、--all 写操作需 --yes、失败自动重试
  • 配置向导 wpops setup;内置 agent skill;npm postinstall 自动安装 skill
  • npm:https://www.npmjs.com/package/wpops

安装:

npm i -g wpops
wpops setup