owlp-cli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOwlPay Wallet Pro CLI agent skill.
OwlPay Wallet Pro CLI agent skill.
Installation & First Use
安装与首次使用
Prerequisites
前置要求
Node.js ≥ 20.12.0 and npm must be available. Verify with .
node -v && npm -v需安装Node.js ≥ 20.12.0及npm。可通过以下命令验证:
bash
node -v && npm -vInstall
安装
bash
owlp -V # check if already installedIf the command is not found:
bash
npm install -g @owlpay/owlp-cli
owlp -V # should print "OwlPay Wallet Pro CLI v0.5.13" or laterbash
owlp -V # 检查是否已安装若命令未找到:
bash
npm install -g @owlpay/owlp-cli
owlp -V # 应显示 "OwlPay Wallet Pro CLI v0.5.13" 或更高版本First-Run Checklist
首次运行检查清单
After installation, check readiness (capture the output — see § Output Discipline below):
bash
RESULT=$(owlp status --json 2>/dev/null) && echo "$RESULT" | jq '.data | {account: .account.ready, wallets: .wallets.ready, kyc: .kyc.ready}'Then follow this decision tree:
| Condition | Action | Agent-automatable? |
|---|---|---|
| Two-step flow: (1) run | Partially — agent runs the commands; human opens browser and reads the passcode |
| Security-sensitive. Strongly recommend the user run | Requires explicit user consent |
| Only needed for fiat withdrawal (off-ramp). Crypto transfers work without KYC. If needed: (1) run | Partially — agent runs the commands; human completes verification in browser |
After resolving all states, re-run the status check above — all sections should show .
falseready: trueImportant: For account setup, use the two-step flow above instead of . For KYC, use the two-step + flow instead of asking the user to run manually.
owlp onboard --jsonowlp auth loginkyc submit --jsonkyc wait --jsonowlp kyc submit安装完成后,检查就绪状态(捕获输出——见下文「输出规范」章节):
bash
RESULT=$(owlp status --json 2>/dev/null) && echo "$RESULT" | jq '.data | {account: .account.ready, wallets: .wallets.ready, kyc: .kyc.ready}'随后按照以下决策树操作:
| 条件 | 操作 | 可由Agent自动完成? |
|---|---|---|
| 两步流程:(1) 运行 | 部分可自动完成——Agent执行命令,用户需打开浏览器并读取验证码 |
| 安全敏感操作。强烈建议用户在TTY环境中自行运行 | 需用户明确同意 |
| 仅法币提现(离场)时需要。加密货币转账无需KYC。若需完成:(1) 运行 | 部分可自动完成——Agent执行命令,用户需在浏览器中完成验证 |
解决所有状态后,重新运行上述状态检查命令——所有部分应显示。
falseready: true重要提示:账户设置请使用上述两步式流程,而非。KYC请使用两步式 + 流程,而非要求用户手动运行。
owlp onboard --jsonowlp auth loginkyc submit --jsonkyc wait --jsonowlp kyc submitEnvironment
环境配置
Two environments: prod (default) and stage. Resolution precedence:
- flag (per-command override)
--stage - (persistent)
~/.owlpay-wallet-pro/config.json - Default ()
prod
bash
RESULT=$(owlp env get --json 2>/dev/null) && echo "$RESULT" | jq '.data | {env, source}' # Show current env
owlp env set stage # Persist env to config.json
owlp env set prod # Switch back to prod
RESULT=$(owlp balance --stage --json 2>/dev/null) && echo "$RESULT" | jq -r '.data[] | "\(.symbol): \(.balance)"' # One-off stage overrideWhen running in , a 3-line banner is emitted to stderr on first output (suppressed for subcommands and mode, which instead prepends a NDJSON line).
stageenv--json{"type":"meta.env",...}Global flags available on every command:
- — machine-readable output (always use when parsing programmatically)
--json - — use stage environment instead of the persisted / default env
--stage - — use a specific wallet instead of the default
--wallet <name> - — verbose logging to stderr
--debug
支持两种环境:prod(默认)和stage。优先级顺序:
- 标志(单命令覆盖)
--stage - (持久化配置)
~/.owlpay-wallet-pro/config.json - 默认值()
prod
bash
RESULT=$(owlp env get --json 2>/dev/null) && echo "$RESULT" | jq '.data | {env, source}' # 查看当前环境
owlp env set stage # 将环境持久化到config.json
owlp env set prod # 切换回prod环境
RESULT=$(owlp balance --stage --json 2>/dev/null) && echo "$RESULT" | jq -r '.data[] | "\(.symbol): \(.balance)"' # 单次临时切换到stage环境在环境运行时,首次输出会向stderr发送3行横幅(子命令和模式下会被抑制,改为前置格式的NDJSON行)。
stageenv--json{"type":"meta.env",...}所有命令均支持全局标志:
- —— 机器可读输出(程序化解析时必须使用)
--json - —— 使用stage环境而非持久化/默认环境
--stage - —— 使用指定钱包而非默认钱包
--wallet <name> - —— 向stderr输出详细日志
--debug
Network Requirements
网络要求
Commands fall into two categories based on whether they need to reach the OwlPay API:
Offline (local file I/O only — work in any environment):
, , , , , , , , , ,
-Venv getenv setauth logoutwallet createwallet importwallet listwallet renamewallet switchwallet export-keywallet resetOnline (hits OwlPay API — fails with / exit code 4 when unreachable):
, , , , , , , , , , , ,
NETWORK_ERRORauth loginauth statusstatusbalancesendtx listtx detailchainstokenscountriesverifykyc statuskyc submitIf your execution environment restricts outbound network access (sandboxed CI, air-gapped containers, etc.), only offline commands will succeed. Online commands that cannot resolve will throw with exit code 4.
wallet-pro.owlting.comNetworkError命令根据是否需要连接OwlPay API分为两类:
离线命令(仅本地文件I/O操作——可在任何环境下运行):
, , , , , , , , , ,
-Venv getenv setauth logoutwallet createwallet importwallet listwallet renamewallet switchwallet export-keywallet reset在线命令(需调用OwlPay API——无法连接时会返回错误/退出码4):
, , , , , , , , , , , ,
NETWORK_ERRORauth loginauth statusstatusbalancesendtx listtx detailchainstokenscountriesverifykyc statuskyc submit若执行环境限制出站网络访问(如沙箱CI、离线容器等),仅离线命令可成功执行。无法解析的在线命令会抛出错误,退出码为4。
wallet-pro.owlting.comNetworkErrorOutput Discipline (MANDATORY)
输出规范(强制执行)
NEVER run as a standalone Bash command. This is the single most common agent mistake with this CLI. When you run it bare, the full JSON envelope (often 30–80 lines) floods the conversation as unreadable noise.
owlp ... --jsonEvery invocation MUST use this pattern:
owlp ... --jsonbash
RESULT=$(owlp <command> --json 2>/dev/null) && echo "$RESULT" | jq '<filter>'Examples of correct usage:
bash
undefined绝不能直接运行作为独立Bash命令。这是Agent使用该CLI时最常见的错误。直接运行会导致完整JSON包(通常30-80行)以不可读的形式充斥对话。
owlp ... --json所有调用必须遵循以下模式:
owlp ... --jsonbash
RESULT=$(owlp <command> --json 2>/dev/null) && echo "$RESULT" | jq '<filter>'正确用法示例:
bash
undefined✓ Correct — only the parsed summary appears in the conversation
✓ 正确——仅解析后的摘要会出现在对话中
RESULT=$(owlp status --json 2>/dev/null) && echo "$RESULT" | jq '.data | {account: .account.ready, kyc: .kyc.ready, wallets: .wallets.ready}'
RESULT=$(owlp balance --json 2>/dev/null) && echo "$RESULT" | jq -r '.data[] | "(.chain) (.symbol): (.balance)"'
RESULT=$(owlp wallet list --json 2>/dev/null) && echo "$RESULT" | jq -r '.data.wallets[] | .name'
**All of these are WRONG — do not use:**
```bashRESULT=$(owlp status --json 2>/dev/null) && echo "$RESULT" | jq '.data | {account: .account.ready, kyc: .kyc.ready, wallets: .wallets.ready}'
RESULT=$(owlp balance --json 2>/dev/null) && echo "$RESULT" | jq -r '.data[] | "(.chain) (.symbol): (.balance)"'
RESULT=$(owlp wallet list --json 2>/dev/null) && echo "$RESULT" | jq -r '.data.wallets[] | .name'
**以下用法均错误——请勿使用:**
```bash✗ WRONG — bare command, JSON floods conversation
✗ 错误——直接运行命令,JSON内容充斥对话
owlp status --json
owlp status --json 2>/dev/null
owlp balance --json
owlp balance --json 2>/dev/null
owlp wallet list --json
Rules:
1. **Capture to a variable** — `RESULT=$(owlp ... --json 2>/dev/null)` (stderr silenced to suppress banners / debug noise).
2. **Parse with jq in the same Bash call** — `echo "$RESULT" | jq -r '...'` to extract only the fields you need.
3. **Present as natural language** — after parsing, summarize the result conversationally per § Agent Output Guidelines. Never paste raw JSON in your reply.owlp status --json
owlp status --json 2>/dev/null
owlp balance --json
owlp balance --json 2>/dev/null
owlp wallet list --json
规则:
1. **捕获到变量中** —— `RESULT=$(owlp ... --json 2>/dev/null)`(抑制stderr输出以屏蔽横幅/调试信息)。
2. **在同一Bash调用中用jq解析** —— `echo "$RESULT" | jq -r '...'`仅提取所需字段。
3. **以自然语言呈现** —— 解析后,根据「Agent输出指南」以对话式语言总结结果。绝不要在回复中粘贴原始JSON。JSON Response Envelope
JSON响应格式
All regular responses are wrapped:
--jsonjson
{
"success": true,
"env": "prod",
"data": { ... }
}When parsing, access fields via :
.data.<field>bash
RESULT=$(owlp balance --json 2>/dev/null) && echo "$RESULT" | jq -r '.data[] | "\(.chain) \(.symbol): \(.balance)"'Event-stream commands (, , registration) emit NDJSON instead: one line, then one JSON line per event, then a line. Parse line-by-line, not as a single object. See and for details.
sendkyc submitonboard{"type":"meta.env",...}{"type":"complete","result":...}send.mdkyc.md所有常规响应均包含以下外层结构:
--jsonjson
{
"success": true,
"env": "prod",
"data": { ... }
}解析时通过访问字段:
.data.<field>bash
RESULT=$(owlp balance --json 2>/dev/null) && echo "$RESULT" | jq -r '.data[] | "\(.chain) \(.symbol): \(.balance)"'事件流命令(, , 注册)会输出NDJSON格式:首先是一行,然后是每行一个事件的JSON,最后是一行。需逐行解析,而非作为单个对象。详情见和。
sendkyc submitonboard{"type":"meta.env",...}{"type":"complete","result":...}send.mdkyc.mdAuthentication
身份验证
Must login before using commands that hit the API.
Agent mode (preferred): Use the two-step flow — see Installation & First Use → First-Run Checklist above. Do not call as an agent; it blocks on browser interaction.
owlp onboard --jsonowlp auth loginHuman mode:
bash
owlp auth login # Interactive (opens browser — human only)
owlp auth logout # Clear local session (keeps wallets)
RESULT=$(owlp auth status --json 2>/dev/null) && echo "$RESULT" | jq '.data | {loggedIn, email, workspace: .workspace.name}'env getchainstokenscountriesverify使用需调用API的命令前必须登录。
Agent模式(推荐):使用两步式流程——见上文「安装与首次使用 → 首次运行检查清单」。请勿以Agent身份调用;该命令会阻塞等待浏览器交互。
owlp onboard --jsonowlp auth login人工模式:
bash
owlp auth login # 交互式(打开浏览器——仅适用于人工操作)
owlp auth logout # 清除本地会话(保留钱包)
RESULT=$(owlp auth status --json 2>/dev/null) && echo "$RESULT" | jq '.data | {loggedIn, email, workspace: .workspace.name}'env getchainstokenscountriesverifyCommand Reference
命令参考
Read the relevant file before executing a command:
- — Environment management (get/set, config.json)
skills/commands/env.md - —
skills/commands/auth.md/auth login/auth logoutauth status - — Guided setup (account + wallet + KYC)
skills/commands/onboard.md - — Wallet create, import/restore, list, rename, switch, export-key, reset
skills/commands/wallet.md - — Balance queries across chains and tokens
skills/commands/balance.md - — Transaction history, filters, pagination, and detail
skills/commands/tx.md - — Send tokens (preview + submit), NDJSON event stream
skills/commands/send.md - — Supported chains and tokens
skills/commands/chains.md - — Address verification and chain auto-detection
skills/commands/verify.md - — Countries allowed for individual registration
skills/commands/countries.md - — KYC status check and browser-assisted submission
skills/commands/kyc.md - — Unified readiness dashboard (account, KYC, wallets)
skills/commands/status.md - —
skills/commands/reset.md(active env) /owlp reset(everything)owlp reset --all
执行命令前请阅读对应文档:
- —— 环境管理(获取/设置,config.json)
skills/commands/env.md - ——
skills/commands/auth.md/auth login/auth logoutauth status - —— 引导式设置(账户 + 钱包 + KYC)
skills/commands/onboard.md - —— 钱包创建、导入/恢复、列表、重命名、切换、导出密钥、重置
skills/commands/wallet.md - —— 跨链及多币种余额查询
skills/commands/balance.md - —— 交易历史、筛选、分页及详情
skills/commands/tx.md - —— 代币转账(预览 + 提交),NDJSON事件流
skills/commands/send.md - —— 支持的链及代币
skills/commands/chains.md - —— 地址验证及链自动检测
skills/commands/verify.md - —— 允许个人注册的国家/地区
skills/commands/countries.md - —— KYC状态检查及浏览器辅助提交
skills/commands/kyc.md - —— 统一就绪仪表盘(账户、KYC、钱包)
skills/commands/status.md - ——
skills/commands/reset.md(当前环境)/owlp reset(全部重置)owlp reset --all
Onboarding Flow
引导式注册流程
See Installation & First Use → First-Run Checklist above for the agent-friendly onboarding sequence.
For a guided flow that handles account creation, wallet setup, and optionally KYC in one command, use . In TTY mode it is fully interactive; in agent mode () it supports a two-invocation passcode flow — see for the agent workflow. KYC can be skipped with or by declining the interactive prompt — it is only needed for fiat deposit/withdrawal.
owlp onboard--jsonskills/commands/onboard.md--skip-kycAgent友好型注册流程见上文「安装与首次使用 → 首次运行检查清单」。
如需通过单个命令完成账户创建、钱包设置及可选KYC的引导式流程,可使用。在TTY模式下为全交互式;在Agent模式()下支持两步验证码流程——详情见中的Agent工作流。可通过或拒绝交互式提示跳过KYC——仅法币存/提时需要KYC。
owlp onboard--jsonskills/commands/onboard.md--skip-kycCommon Agent Workflows
常见Agent工作流
Reminder: everycall below must follow § Output Discipline — capture to a variable, parse with jq, never expose raw JSON.owlp ... --json
提醒:以下所有调用必须遵循「输出规范」——捕获到变量中,用jq解析,绝不要暴露原始JSON。owlp ... --json
Send Token
代币转账
bash
undefinedbash
undefined1. Verify destination address (auto-detects chain)
1. 验证目标地址(自动检测链)
RESULT=$(owlp verify <address> --json 2>/dev/null) && echo "$RESULT" | jq '.data'
RESULT=$(owlp verify <address> --json 2>/dev/null) && echo "$RESULT" | jq '.data'
2. Confirm token is supported on that chain
2. 确认该链支持对应代币
RESULT=$(owlp tokens --chain <chain> --json 2>/dev/null) && echo "$RESULT" | jq -r '.data[] | .symbol'
RESULT=$(owlp tokens --chain <chain> --json 2>/dev/null) && echo "$RESULT" | jq -r '.data[] | .symbol'
3. Check you have sufficient balance
3. 检查余额是否充足
RESULT=$(owlp balance --chain <chain> --json 2>/dev/null) && echo "$RESULT" | jq -r '.data[] | "(.symbol): (.balance)"'
RESULT=$(owlp balance --chain <chain> --json 2>/dev/null) && echo "$RESULT" | jq -r '.data[] | "(.symbol): (.balance)"'
4. Preview the transfer and estimated fees (no --confirm)
4. 预览转账及预估手续费(不加--confirm)
RESULT=$(owlp send --to <address> --amount <n> --token <symbol> --chain <chain> --json 2>/dev/null) && echo "$RESULT" | jq '.data'
RESULT=$(owlp send --to <address> --amount <n> --token <symbol> --chain <chain> --json 2>/dev/null) && echo "$RESULT" | jq '.data'
5. Execute the transfer
5. 执行转账
RESULT=$(owlp send --to <address> --amount <n> --token <symbol> --chain <chain> --confirm --json 2>/dev/null) && echo "$RESULT" | jq '.data'
RESULT=$(owlp send --to <address> --amount <n> --token <symbol> --chain <chain> --confirm --json 2>/dev/null) && echo "$RESULT" | jq '.data'
6. Confirm transaction appears in history
6. 确认交易已出现在历史记录中
RESULT=$(owlp tx list --type send --json 2>/dev/null) && echo "$RESULT" | jq -r '.data[] | "(.id) (.type) (.amount) (.symbol)"'
RESULT=$(owlp tx list --type send --json 2>/dev/null) && echo "$RESULT" | jq -r '.data[] | "(.id) (.type) (.amount) (.symbol)"'
7. Poll for final state using the transaction ID (envelope: data.type, data.detail.*)
7. 使用交易ID轮询最终状态(响应格式:data.type, data.detail.*)
RESULT=$(owlp tx detail <id> --json 2>/dev/null) && echo "$RESULT" | jq '.data.detail.state'
RESULT=$(owlp tx detail <id> --json 2>/dev/null) && echo "$RESULT" | jq '.data.detail.state'
Poll until data.detail.state === "completed" && data.detail.order.blockchain_transaction.state === "confirmed"
轮询直至data.detail.state === "completed" && data.detail.order.blockchain_transaction.state === "confirmed"
(send envelope only — see skills/commands/tx.md for per-type field tables)
(仅转账响应格式——见skills/commands/tx.md中的各类型字段表)
undefinedundefinedCheck KYC Before Off-Ramp
法币提现前检查KYC状态
bash
RESULT=$(owlp kyc status --json 2>/dev/null) && echo "$RESULT" | jq '{status: .data.status, verified: .data.verified}'bash
RESULT=$(owlp kyc status --json 2>/dev/null) && echo "$RESULT" | jq '{status: .data.status, verified: .data.verified}'status == "verified" && verified == true — ready for fiat withdrawal
status == "verified" && verified == true —— 可进行法币提现
any other status — off-ramp not available
其他任何状态 —— 无法进行法币提现
undefinedundefinedAgent Output Guidelines
Agent输出指南
When presenting command results to the user, follow these principles:
- Natural language first. Summarize results conversationally, as if reporting to a colleague. Do not paste raw JSON output. Use lists or tables only when data volume makes prose hard to scan — the choice is yours.
- Event streams: report the outcome, not the journey. For commands that emit NDJSON event streams (,
send,onboard), wait for the final result and summarize it once. Do not narrate each intermediate event.kyc submit - Errors: include the code and a next step. When a command fails, mention the error code (e.g. ) and suggest what the user can do about it. Each command's documentation describes its common errors.
INSUFFICIENT_GAS - Sensitive operations: warn before executing. Before running ,
wallet create, orwallet import, explain the risks (mnemonic loss, private key exposure) and ask the user to confirm. Do not execute the command first and warn after.wallet export-key - Respect the command's section. Individual command docs may include an
## Agent Responsesection with specific guidance on what to highlight and how to present results. Follow those instructions; they override these general principles where they differ.## Agent Response
向用户展示命令结果时,请遵循以下原则:
- 优先使用自然语言。以对话式语言总结结果,如同向同事汇报。请勿粘贴原始JSON输出。仅当数据量过大导致 prose 难以阅读时才使用列表或表格——可自行判断。
- 事件流:报告最终结果,而非过程。对于输出NDJSON事件流的命令(,
send,onboard),等待最终结果后一次性总结。无需叙述每个中间事件。kyc submit - 错误:包含错误码及下一步建议。命令失败时,提及错误码(如)并建议用户可采取的措施。每个命令的文档均描述了常见错误。
INSUFFICIENT_GAS - 敏感操作:执行前警告。执行,
wallet create或wallet import前,解释风险(助记词丢失、私钥暴露)并请求用户确认。请勿先执行命令再警告。wallet export-key - 遵循命令的「Agent响应」章节。单个命令文档可能包含「Agent响应」章节,提供关于需突出显示内容及呈现方式的具体指导。请遵循这些说明;若与通用原则冲突,以章节说明为准。
Data Storage
数据存储
Local files under :
~/.owlpay-wallet-pro/- — persisted env (
config.json), root level, shared across envs{"env":"prod"|"stage"} - ,
prod/auth.json— session tokens + workspace (env-scoped)stage/auth.json - ,
prod/wallets.json— addresses + mnemonics (env-scoped)stage/wallets.json
Private keys never leave the client. The API only sees signed transactions.
本地文件存储于目录下:
~/.owlpay-wallet-pro/- —— 持久化环境配置(
config.json),根目录,跨环境共享{"env":"prod"|"stage"} - ,
prod/auth.json—— 会话令牌 + 工作区(按环境划分)stage/auth.json - ,
prod/wallets.json—— 地址 + 助记词(按环境划分)stage/wallets.json
私钥绝不会离开客户端。API仅能看到签名后的交易。