oxygen-wf
v0.0.7
Published
> **Beta** — 面向 workflow 自动化实例的终端客户端。管理工作流、执行记录、凭证与空间/项目。
Downloads
1,167
Readme
oxygen-wf
Beta — 面向 workflow 自动化实例的终端客户端。管理工作流、执行记录、凭证与空间/项目。
轻量、仅依赖 @oclif/core,通过浏览器 SSO 登录后调用实例 REST API(/rest),面向人类、脚本与 AI Agent。
安装
# 零安装直接运行
npx oxygen-wf workflow list
# 或全局安装
npm install -g oxygen-wf
pnpm add -g oxygen-wf登录
首次调用 API 前,通过浏览器 SSO 登录一次:
oxygen-wf login登录凭证保存在 ~/.oxygen-wf/config.json(权限 0600)。若主配置不存在,会依次回退读取旧版配置:
~/.oxygen-workflows/config.json~/.workflow-cli/config.json~/.oxygen-cli/config.json
也可通过环境变量跳过登录(适合 CI / Agent):
WORKFLOW_SSO_COOKIE:直接提供 SSO CookieWORKFLOW_URL:覆盖实例地址(默认https://oxygenflow.jd.com)
常用命令
脚本与 Agent 场景建议加 --json 输出结构化结果;写操作需加 --confirm。
# 元信息与诊断
oxygen-wf info --json
oxygen-wf doctor --json
# 工作流
oxygen-wf workflow list --json
oxygen-wf workflow export <id> --file=workflow.json
oxygen-wf workflow create --file=workflow.json --confirm --json
oxygen-wf workflow update <id> --file=updated.json --confirm --json
oxygen-wf workflow copy <id> --confirm --json
oxygen-wf workflow run <id> --json
oxygen-wf workflow activate <id> --confirm --json
oxygen-wf workflow deactivate <id> --confirm --json
oxygen-wf workflow archive <id> --confirm --json
oxygen-wf workflow unarchive <id> --confirm --json
oxygen-wf workflow delete <id> --confirm --json
# 空间/项目
oxygen-wf project list --json
oxygen-wf project list --personalSpace --json
oxygen-wf project get <id> --json
# 执行记录
oxygen-wf execution list --json
oxygen-wf execution get <id> --json
oxygen-wf execution delete <id> --confirm --json
# 凭证
oxygen-wf credential list --json
oxygen-wf credential get <id> --json
oxygen-wf credential delete <id> --confirm --json| Topic | 子命令 |
|-------|--------|
| — | login、info、doctor |
| workflow | list、export、create、update、copy、run、activate、deactivate、archive、unarchive、delete |
| project | list、get |
| execution | list、get、delete |
| credential | list、get、delete |
完整列表:oxygen-wf --help;各子命令详情:oxygen-wf workflow --help
Agent 集成
- SKILL:
skills/oxygen-wf/SKILL.md - 能力清单:
capabilities.json(22 条命令,与 CLI 一一对应)
也可通过 oxygen-cli 安装与管理:
oxygen-cli install oxygen-wf
oxygen-cli skill show oxygen-wf开发
pnpm install
pnpm verify # typecheck + lint + test + build说明
本包通过 SSO Cookie 调用 workflow 自动化平台 REST API(/rest)。
