Using wemol-cli
Overview
INLINECODE0 is the operational client for Wemol modules and flows. Use it to discover modules/flows, inspect real input schemas, submit jobs, track execution, and recover outputs.
Primary rule:
- - Prefer executing CLI commands and reading real output over assumptions.
This SKILL.md is now self-sufficient for normal operation. references/ and examples/ are secondary for edge cases and domain-specific patterns.
When To Use
Use when:
- - user asks for a biology/chemistry/AI workflow that may map to Wemol modules or flows
- task requires live module params, job status, logs, outputs, downloads
- session/host/lang/install behavior affects task execution
Do not use when:
- - task is SDK/CLI source implementation work
- user only asks for static code edits unrelated to running CLI
Quick Start
When context is unknown:
CODEBLOCK0
If authentication error appears, stop and run:
CODEBLOCK1
If interactive login is not possible (non-TTY), use:
CODEBLOCK2
Quick Reference
| Situation | Required Action | Avoid |
|---|
| User asks capability but no ID | INLINECODE4 / flow search first | guessing module/flow by name only |
| Any submit intent |
fetch schema (
--params-json or
flow get) first | building payload from natural language |
| Flow submit | enforce task-keyed JSON | flat JSON submit |
|
job output missing/empty |
job tasks then
job download | concluding job failed immediately |
| Auth/session issue |
login /
account /
host /
lang checks | continuing API probes while unauthenticated |
| User asks “need update?” | run update workflow and conclude directly | asking user to compare versions manually |
Command Routing (Default)
- - Capability request, no module ID:
-
wemol-cli module search <keywords...>
- - Catalog browsing/filtering:
-
wemol-cli module list ...
- - Pipeline/workflow request:
-
wemol-cli flow search <keywords...> then
wemol-cli flow get <flow_id>
- - Need exact module payload:
-
wemol-cli module get <module_id> --params-json
- - Need flow payload shape:
-
wemol-cli flow get <flow_id> --params-template
- - Submitted job, need progress:
-
wemol-cli job status <job_id> and
wemol-cli job progress <job_id>
-
wemol-cli job tasks <job_id>
-
wemol-cli job diagnose <job_id> then
wemol-cli job download <job_id>
- - Historical run, unknown
job_id:
-
wemol-cli job list ... or INLINECODE29
Core Commands And Rules
Global Options
CODEBLOCK3
Environment equivalents:
- - INLINECODE30
- INLINECODE31
- INLINECODE32
Rules:
- - Prefer persisted
host --set and cached login for routine work. - Use
--host / --session-id for one-off overrides. - Use
--user-agent only when explicit routing/debugging requires it. - INLINECODE37 exists on root and command groups (
module, flow, job, host, lang, account); some leaf commands also support it depending on version.
Host / Language / Session / Account
CODEBLOCK4
Rules:
- -
module get and module get --params-json follow current language. - use
account to confirm active identity and resource summary. - use
logout to clear current host session before relogin/switch account.
Module Discovery And Inspection
CODEBLOCK5
Rules:
- -
module list and module search currently return enabled modules. - INLINECODE50 is repeatable and uses AND semantics.
- INLINECODE51 includes tag matching.
- Before submit, always read
--params-json; do not guess keys/types/options.
Flow Discovery And Inspection
CODEBLOCK6
Rules:
- -
flow list --tag is repeatable and uses AND semantics. - INLINECODE54 includes tag matching.
- INLINECODE55 is source of truth for task names and nested input keys.
- use
--params-template whenever payload structure is uncertain.
Job Submit
Module submit:
CODEBLOCK7
Flow submit:
CODEBLOCK8
Rules:
- - Select exactly one target:
--module-id / --module-name / --flow-id / --flow-name. - INLINECODE61 is module-only; do not use with flow submit.
- INLINECODE62 and
--params-file are mutually exclusive. - INLINECODE64 supports repeatable
--tag; CLI auto-adds Wemol CLI source tag. - Module payload keys must match
--params-json field values exactly. - Flow payload must be task-keyed JSON (
{"Task Name": {"Input": value}}). - File args accept local file path; CLI uploads automatically.
- For file args, check
format / value_formats from --params-json before submit. - For
MultipleChoice, send array even for one option (for example {"Numbering Scheme":["imgt"]}).
Job Read / Track / Diagnose
CODEBLOCK9
Rules:
- - use
job list for status/history filters; job search for topic/module keyword recovery. - INLINECODE77 defaults to
--until done; use --until terminal to stop on Done/Abort/Cancel. - INLINECODE81 is preferred when
status is too coarse. - INLINECODE83 gives focused suggestions and executable
next_commands.
Logs / Output / Download
CODEBLOCK10
Rules:
- -
job output normally requires --task-id; if missing, run job tasks first. - If output key missing or empty-data style errors (
DBDataNull/similar) appear, try job download before declaring failure. - download resume is enabled by default with
.wemol-download-manifest.json. - INLINECODE91 disables state reuse.
- summary includes skipped artifacts and transient/permanent failures.
Hard Rules (Must Follow)
- 1. No guessed payload keys
- - Never infer submit keys from natural language.
- Always derive from
module get --params-json or flow get.
- 2. No flow flat JSON submit
- - Flow submit must be task-keyed.
- If user gives flat JSON, fix structure first, then ask missing values.
- 3. No blind retry
- - On validation error, re-read schema and payload shape first.
- On
JobModuleTaskMaxNumLimit, treat as capacity/quota issue, not payload formatting.
- 4. No premature failure conclusion
- -
job output failure is not equal to job failure. - Try
job tasks + job download.
- 5. No auth-ignore probing
- - After auth-required error, login/session handling comes first.
- 6. No update-question deflection
- - For “需要更新吗 / latest?” do comparison work yourself, do not tell user to compare.
Detection Triggers (Auto-Branch)
When these signals appear, branch automatically:
- -
Authentication required / DBUserNoLogin / session null:
- branch to session handling (
login,
account,
host,
lang) before further task commands.
- - user message contains
flow_id / --flow-id / flow submit / pipeline submit:
- branch to flow-shape validation (
flow get, optional
--params-template) before accepting payload.
- - output errors contain
Output '<name>' was not found or empty-data style (DBDataNull, DBDataNotFound):
- branch to artifact recovery (
job download) before failure conclusion.
- - submit error contains
JobModuleTaskMaxNumLimit:
- branch to capacity/quota diagnosis, not payload rewrite.
- - user asks
需要更新吗 / latest / should I update:
- branch to version/update decision workflow.
Version / Update Decision Workflow
When user asks whether update is needed:
- 1. Check installed version:
CODEBLOCK11
- 2. Compare against known baseline:
- - this skill baseline is
v1.0.0 (minimum) - if operating in this repo, also read repo CLI version from INLINECODE120
- 3. Decision:
- - installed
< v1.0.0 -> update required - installed
< repo version -> update required - installed
== repo version (or >= v1.0.0 and no higher trusted source available) -> no mandatory update from local evidence
- 4. Upstream check:
- - if channel access is available, check official release channel directly
- if blocked, report explicit blocker and what was checked
Allowed final statements:
- - INLINECODE125
- INLINECODE126
- INLINECODE127
Response Contract
When answering operational questions, include:
- - what was checked (exact command(s))
- observed key evidence (version/status/error marker)
- decision/result category (for example update required / no update required / blocked)
- next concrete command when action is needed
Do not return generic uncertainty without evidence.
When To Read References (Secondary)
Use references for extra depth, not for basic operation:
- -
references/install.md: installer, PATH/security, cross-platform details - INLINECODE129 : auth/session/host/lang/account nuances
- INLINECODE130 : deeper module filtering/schema patterns
- INLINECODE131 : flow payload troubleshooting patterns
- INLINECODE132 : advanced diagnose/download behavior
- INLINECODE133 : output ambiguity interpretation
Example Triggers
Use examples when task matches known pattern:
- - antibody numbering: INLINECODE134
- protein descriptors: INLINECODE135
- ADMET CSV: INLINECODE136
- MHC-I minimal output: INLINECODE137
- history recovery: INLINECODE138
- flow submit + download: INLINECODE139
- run-limit error: INLINECODE140
Completion Checklist
Before concluding:
- - Are command and payload shapes confirmed from live CLI output?
- If submit happened, were keys copied from schema (not guessed)?
- If output unclear, did you try
job tasks/job download before declaring failure? - If asked about update, did you run the full update decision workflow and return a direct conclusion?
Self-Check Scorecard (Pass/Fail)
Run this quick scorecard before sending the final answer:
- 1. Evidence check (Pass/Fail)
- - Did I run or quote concrete command evidence (
--version, status, error marker, etc.)?
- 2. Decision check (Pass/Fail)
- - Did I provide an explicit result category (for example update required / no update required / blocked with reason)?
- 3. Actionability check (Pass/Fail)
- - If action is needed, did I provide the exact next command?
- 4. Deflection check (Pass/Fail)
- - Did I avoid pushing core comparison/diagnosis work back to the user?
If any item is Fail, revise the response before sending.
使用 wemol-cli
概述
wemol-cli 是 Wemol 模块和流程的操作客户端。用于发现模块/流程、检查实时输入模式、提交作业、跟踪执行和恢复输出。
主要规则:
- - 优先执行 CLI 命令并读取实际输出,而非依赖假设。
本 SKILL.md 文件已足够支撑常规操作。references/ 和 examples/ 目录为次要参考,用于处理边缘情况和特定领域模式。
使用时机
在以下情况使用:
- - 用户询问可能映射到 Wemol 模块或流程的生物学/化学/AI 工作流
- 任务需要实时模块参数、作业状态、日志、输出、下载
- 会话/主机/语言/安装行为影响任务执行
在以下情况不使用:
- - 任务是 SDK/CLI 源码实现工作
- 用户仅要求与运行 CLI 无关的静态代码编辑
快速入门
当上下文未知时:
bash
wemol-cli --help
wemol-cli --version
wemol-cli host
wemol-cli lang
wemol-cli module search antibody
如果出现身份验证错误,请停止并运行:
bash
wemol-cli login
如果无法进行交互式登录(非 TTY),请使用:
bash
wemol-cli login --username --password
快速参考
| 情况 | 所需操作 | 避免 |
|---|
| 用户询问能力但无 ID | 先执行 module search / flow search | 仅凭名称猜测模块/流程 |
| 任何提交意图 |
先获取模式(--params-json 或 flow get) | 从自然语言构建负载 |
| 流程提交 | 强制使用任务键 JSON | 扁平 JSON 提交 |
| job output 缺失/为空 | 先执行 job tasks 再执行 job download | 立即断定作业失败 |
| 身份验证/会话问题 | 检查 login / account / host / lang | 在未认证状态下继续 API 探测 |
| 用户询问需要更新吗? | 运行更新工作流并直接得出结论 | 要求用户手动比较版本 |
命令路由(默认)
- wemol-cli module search
- wemol-cli module list ...
- wemol-cli flow search 然后 wemol-cli flow get
- wemol-cli module get --params-json
- wemol-cli flow get --params-template
- wemol-cli job status id> 和 wemol-cli job progress id>
- wemol-cli job tasks
- wemol-cli job diagnose id> 然后 wemol-cli job download id>
- wemol-cli job list ... 或 wemol-cli job search ...
核心命令和规则
全局选项
bash
wemol-cli --host ...
wemol-cli --session-id ...
wemol-cli --user-agent ...
wemol-cli --timeout ...
wemol-cli --secure ...
wemol-cli --verbose ...
wemol-cli --doc
环境变量等效项:
- - WEMOLHOST
- WEMOLSESSIONID
- WEMOLUSER_AGENT
规则:
- - 日常工作中优先使用持久化的 host --set 和缓存的登录。
- 一次性覆盖使用 --host / --session-id。
- 仅在需要显式路由/调试时使用 --user-agent。
- --doc 存在于根命令和命令组(module、flow、job、host、lang、account)上;某些叶命令也支持它,具体取决于版本。
主机 / 语言 / 会话 / 账户
bash
wemol-cli host
wemol-cli host --set https://wemol.wecomput.com
wemol-cli lang
wemol-cli lang --set en
wemol-cli lang --set cn
wemol-cli account
wemol-cli logout
规则:
- - module get 和 module get --params-json 遵循当前语言设置。
- 使用 account 确认活动身份和资源摘要。
- 在重新登录/切换账户前,使用 logout 清除当前主机会话。
模块发现和检查
bash
wemol-cli module search antibody numbering
wemol-cli module list --name antibody --tag Biologics --tag Antibody --limit 20 --offset 0
wemol-cli module list --sort updated_at --desc true
wemol-cli module get
wemol-cli module get --params-json
wemol-cli module get id> --params-json --method name>
规则:
- - module list 和 module search 当前返回已启用的模块。
- module list --tag 可重复使用,采用 AND 语义。
- module search 包含标签匹配。
- 提交前,始终读取 --params-json;不要猜测键/类型/选项。
流程发现和检查
bash
wemol-cli flow search antibody pipeline
wemol-cli flow list --name antibody --tag Featured --tag Humanization --limit 20 --offset 0
wemol-cli flow list --sort updated_at --desc true
wemol-cli flow get
wemol-cli flow get --params-template
规则:
- - flow list --tag 可重复使用,采用 AND 语义。
- flow search 包含标签匹配。
- flow get 是任务名称和嵌套输入键的权威来源。
- 当负载结构不确定时,使用 --params-template。
作业提交
模块提交:
bash
wemol-cli job submit --module-id id> --method name> --params {Input:value}
wemol-cli job submit --module-name --params-file params.json
cat params.json | wemol-cli job submit --module-id --params @-
流程提交:
bash
wemol-cli job submit --flow-id --params-file flow-params.json
wemol-cli job submit --flow-name --params {Task A:{Input:value}}
cat flow-params.json | wemol-cli job submit --flow-id --params @-
规则:
- - 精确选择一个目标:--module-id / --module-name / --flow-id / --flow-name。
- --method 仅用于模块;不要与流程提交一起使用。
- --params 和 --params-file 互斥。
- job submit 支持可重复的 --tag;CLI 自动添加 Wemol CLI 源标签。
- 模块负载键必须与 --params-json 的 field 值完全匹配。
- 流程负载必须是任务键 JSON({Task Name: {Input: value}})。
- 文件参数接受本地文件路径;CLI 自动上传。
- 对于文件参数,在提交前检查 --params-json 中的 format / value_formats。
- 对于 MultipleChoice,即使只有一个选项也发送数组(例如 {Numbering Scheme:[imgt]})。
作业读取 / 跟踪 / 诊断
bash
wemol-cli job list --status Done --tag Wemol CLI --limit 20 --offset 0
wemol-cli job search antibody numbering
wemol-cli job status
wemol-cli job progress
wemol-cli job get
wemol-cli job wait
wemol-cli job wait --until terminal --interval 5
wemol-cli job tasks
wemol-cli job diagnose
wemol-cli job cancel
规则: