openquok-core
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese| Property | Value |
|---|---|
| name | openquok |
| description | AI-ready social scheduling: CLI-first |
| allowed-tools | Bash(openquok:*) |
| 属性 | 值 |
|---|---|
| 名称 | openquok |
| 描述 | 支持AI的社交内容调度:优先使用CLI工具 |
| 允许使用的工具 | Bash(openquok:*) |
⚠️ Three Hard Rules (Read First)
⚠️ 三条硬性规则(请先阅读)
Rule 0 — Global CLI (once per new chat session). This skill never installs the binary; only copies these instructions under and does not bump the global on the host (nor does restarting the gateway). Only at the start of a new chat session — not before every call — run once, tell the user the version reported. Ask whether they want to upgrade to the latest ; if yes, run in the environment the agent uses for shell commands, then again.
npx skills add.agents/skills/openquokopenquokopenquok --version@openquok/auto-clinpm install -g @openquok/auto-cli@latestopenquok --versionRule 1 — Authenticate before anything. All () commands that call the API fail without valid credentials.
@openquok/auto-cliopenquokRule 2 — Every value passed to / (or to media/ fields in payloads) MUST come from workspace upload via or . Bare local paths () and arbitrary external URLs pasted into are not a substitute: providers expect media that was stored through Openquok’s upload API (with stable + storage ). Always:
-m--mediaimage--jsonopenquok uploadopenquok upload-from-urlimage.jpg-midpathbash
RESULT=$(openquok upload <file>)
MEDIA=$(echo "$RESULT" | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create ... -m "$MEDIA" ...If you see anywhere below, treat it as shorthand for "the + (or ) from ", passed as the JSON array form above — never a raw local filename or ad-hoc URL alone.
-m "something.jpg"idpathfilePathopenquok upload something.jpg规则0 — 全局CLI(每次新会话执行一次)。本技能不会安装二进制文件;仅会将这些说明复制到目录下,不会更新主机上全局安装的版本(网关重启也不会)。仅在新会话开始时——并非每次调用前——执行一次,告知用户返回的版本号。询问用户是否要升级到最新版本的;如果用户同意,在代理用于执行Shell命令的环境中运行,然后再次执行。
npx skills add.agents/skills/openquokopenquokopenquok --version@openquok/auto-clinpm install -g @openquok/auto-cli@latestopenquok --version规则1 — 先认证再操作。所有调用API的()命令,若无有效凭据都会执行失败。
@openquok/auto-cliopenquok规则2 — 传递给/(或负载中的media/字段)的所有值,必须来自通过或上传到工作区的资源。直接使用本地路径(如)或随意粘贴到中的外部URL均不满足要求:平台仅接受通过Openquok上传API存储的媒体资源(带有稳定的和存储)。请始终遵循以下流程:
-m--media--jsonimageopenquok uploadopenquok upload-from-urlimage.jpg-midpathbash
RESULT=$(openquok upload <file>)
MEDIA=$(echo "$RESULT" | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create ... -m "$MEDIA" ...如果在下方看到,请将其视为“返回的 + (或)”的简写,需以上述JSON数组形式传递——绝不能直接使用原始本地文件名或临时URL。
-m "something.jpg"openquok upload something.jpgidpathfilePath⚠️ Authentication Required
⚠️ 必须先完成认证
You MUST authenticate before running any command that hits the API. All commands fail without valid credentials.(see Rule 0: check version once at session start, not before every command).
openquokBefore doing anything else, check auth status:
bash
openquok auth:statusIf not authenticated, choose one path:
在运行任何调用API的命令前,必须完成认证。若无有效凭据,所有命令都会执行失败(参见规则0:仅在会话开始时检查一次版本,而非每次命令前)。
openquok在进行任何操作前,先检查认证状态:
bash
openquok auth:status若未认证,可选择以下方式之一:
API Key:
API密钥:
bash
export OPENQUOK_API_KEY=opo_your_key_herebash
export OPENQUOK_API_KEY=opo_your_key_hereor persist:
或持久化存储:
openquok auth:login --apiKey "opo_…"
Create the key in the [Openquok dashboard](https://www.openquok.com/) (signed-in workspace → developer / API settings).openquok auth:login --apiKey "opo_…"
在[Openquok控制台](https://www.openquok.com/)创建密钥(登录工作区 → 开发者/API设置)。OAuth2 device flow (remote browser; use --json
from agents)
--jsonOAuth2设备流(远程浏览器;代理需使用--json
)
--jsonUse when the user can complete a browser step on phone or desktop while the CLI (or agent) keeps polling.
Agents: never invent a verification URL or user code. Run the real command and use only values from its output:
bash
openquok auth:login --jsonThe first JSON object includes (link with prefilled). Give the user that exact link — not a bare URL and not a made-up code.
verification_uri_complete?code=/device/verifyWhat the user does in the browser (two steps):
Do NOT proceed with any other commands until authentication is confirmed ( succeeds).
openquok auth:status当用户可在手机或桌面端完成浏览器操作,同时CLI(或代理)保持轮询时使用此方式。
代理注意:绝不要自行生成验证URL或用户代码。执行真实命令并仅使用其输出中的值:
bash
openquok auth:login --json第一个JSON对象包含(预填充的链接)。请将该精确链接提供给用户——不要提供裸的URL或虚构的代码。
verification_uri_complete?code=/device/verify用户在浏览器中的操作步骤(两步):
在认证确认成功前(执行成功),请勿进行任何其他命令。
openquok auth:statusCore Workflow
核心工作流
The fundamental pattern for using the Openquok CLI ( from ):
openquok@openquok/auto-cli- Authenticate — Verify or set up authentication (see above).
- Discover — List integrations and read each channel’s rules, limits, and allow-listed tools.
- Fetch — Call when a provider exposes dynamic data (playlists, pages, etc.).
integrations:trigger - Prepare — Upload media (/
upload) when the post needs images or video. In chat agents (Telegram, OpenClaw, etc.), if the user wants an image but has not given you a file on the host or a directupload-from-urlimage URL forhttps://, ask them for the file or a direct image URL before creating the post withupload-from-url.-m - Post — Create posts and flip status (,
posts:create).posts:status - Analyze — Use and
analytics:platformwith aanalytics:post/7/30day window.90 - Resolve — If per-post analytics indicates a missing provider release id, run , then
posts:missing.posts:connect --release-id
bash
undefined使用Openquok CLI(提供的命令)的基础流程:
@openquok/auto-cliopenquok- 认证 — 验证或设置认证信息(参见上文)。
- 发现 — 列出集成项并查看每个渠道的规则、限制和允许使用的工具。
- 获取 — 当平台暴露动态数据(如播放列表、页面等)时,调用。
integrations:trigger - 准备 — 若帖子需要图片或视频,先上传媒体资源(/
upload)。在聊天代理(如Telegram、OpenClaw等)中,若用户想要添加图片但未提供主机上的文件或可用于upload-from-url的直接upload-from-url图片URL,请先向用户索要文件或直接图片URL,再使用https://创建帖子。-m - 发布 — 创建帖子并切换状态(、
posts:create)。posts:status - 分析 — 使用和
analytics:platform,选择7/30/90天的统计窗口。analytics:post - 解决问题 — 若单帖分析显示缺少平台发布ID,执行,再执行
posts:missing。posts:connect --release-id
bash
undefined1. Authenticate
1. 认证
openquok auth:status
openquok auth:status
If not authenticated (agents): openquok auth:login --json # or API key above
若未认证(代理):执行openquok auth:login --json # 或使用上文的API密钥
2. Discover
2. 发现
openquok integrations:list
openquok integrations:settings <integration-uuid>
openquok integrations:list
openquok integrations:settings <integration-uuid>
3. Fetch (if needed)
3. 获取(若需要)
openquok integrations:trigger <integration-uuid> <method> -d '{"key":"value"}'
openquok integrations:trigger <integration-uuid> <method> -d '{"key":"value"}'
4. Prepare
4. 准备
openquok upload ./image.jpg
openquok upload ./image.jpg
5. Post (media: see Rule 2 — build JSON from upload response)
5. 发布(媒体:参见规则2 — 从上传响应构建JSON)
RESULT=$(openquok upload ./image.jpg)
MEDIA=$(echo "$RESULT" | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create -c "Content" -s "2026-01-01T12:00:00Z" -i "<integration-uuid>" -m "$MEDIA"
RESULT=$(openquok upload ./image.jpg)
MEDIA=$(echo "$RESULT" | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create -c "内容" -s "2026-01-01T12:00:00Z" -i "<integration-uuid>" -m "$MEDIA"
6. Analyze
6. 分析
openquok analytics:platform <integration-uuid> -d 30
openquok analytics:post <post-id> -d 7
openquok analytics:platform <integration-uuid> -d 30
openquok analytics:post <post-id> -d 7
7. Resolve (when the product surfaces a missing release / analytics gap)
7. 解决问题(当产品提示缺少发布信息/分析数据缺口时)
openquok posts:missing <post-id>
openquok posts:connect <post-id> --release-id "<provider-release-id>"
---openquok posts:missing <post-id>
openquok posts:connect <post-id> --release-id "<provider-release-id>"
---Essential Commands
核心命令
Authentication
认证
Option 1: API key (recommended for agents / OpenClaw / CI)
bash
export OPENQUOK_API_KEY=opo_your_api_key_here
openquok auth:login --apiKey "opo_…" # optional: write ~/.openquok/credentials.json
openquok auth:statusOption 2: OAuth2 device flow
Agents (OpenClaw, Hermes, CI, SSH, any non-interactive host): use only — it prints the device payload and polling result on stdout, does not open a browser on the agent machine, and matches what you must forward to the user (see Authentication Required)
--jsonbash
openquok auth:login --json
openquok auth:status
openquok auth:logoutHumans on a local machine with a TTY: you may use without (instructions on stderr; optional browser open after Enter). Do not suggest bare interactive login for remote agents — they should use or an API key.
openquok auth:login--json--jsonDevice-flow tokens are stored in . Stored credentials take priority over when both are set; run if you need the env var to win.
~/.openquok/credentials.jsonOPENQUOK_API_KEYauth:logoutSee Authentication Required for the full browser flow and troubleshooting Invalid or expired code.
Optional overrides
bash
export OPENQUOK_API_URL=https://api.openquok.com
export OPENQUOK_AUTH_SERVER=https://cli-auth.openquok.comUse a local (for example ) when developing .
OPENQUOK_AUTH_SERVERhttp://localhost:3111agent/server选项1:API密钥(推荐代理/OpenClaw/CI使用)
bash
export OPENQUOK_API_KEY=opo_your_api_key_here
openquok auth:login --apiKey "opo_…" # 可选:写入~/.openquok/credentials.json
openquok auth:status选项2:OAuth2设备流
代理(OpenClaw、Hermes、CI、SSH或任何非交互式主机):仅使用——它会在标准输出中打印设备负载和轮询结果,不会在代理机器上打开浏览器,且与你必须转发给用户的内容一致(参见必须先完成认证)
--jsonbash
openquok auth:login --json
openquok auth:status
openquok auth:logout本地机器上的人类用户(带TTY): 可以不带执行(标准错误输出会显示说明;按Enter后可选择打开浏览器)。请勿建议远程代理使用无参数的交互式登录——它们应使用或API密钥。
--jsonopenquok auth:login--json设备流令牌存储在中。当同时设置了存储凭据和时,存储凭据优先级更高;若需要环境变量生效,请执行。
~/.openquok/credentials.jsonOPENQUOK_API_KEYauth:logout有关完整浏览器流程和“无效或过期代码”问题的排查,请参见必须先完成认证。
可选配置覆盖
bash
export OPENQUOK_API_URL=https://api.openquok.com
export OPENQUOK_AUTH_SERVER=https://cli-auth.openquok.com开发时,可使用本地(例如)。
agent/serverOPENQUOK_AUTH_SERVERhttp://localhost:3111Integration discovery
集成项发现
bash
openquok integrations:list
openquok integrations:settings <integration-uuid>
openquok integrations:trigger <integration-uuid> <method-name> [--data '<json>' | -d '<json>']New channels are connected in the Openquok web app; the CLI consumes the integration UUIDs returned by .
integrations:listbash
openquok integrations:list
openquok integrations:settings <integration-uuid>
openquok integrations:trigger <integration-uuid> <method-name> [--data '<json>' | -d '<json>']新渠道需在Openquok网页应用中连接;CLI会使用返回的集成项UUID。
integrations:listCreating posts
创建帖子
bash
undefinedbash
undefinedSimple post (schedule time is required unless --json)
简单帖子(除非使用--json,否则必须指定调度时间)
openquok posts:create -c "Content" -s "2026-01-01T12:00:00Z" -i "<integration-uuid>"
openquok posts:create -c "内容" -s "2026-01-01T12:00:00Z" -i "<integration-uuid>"
Draft
草稿
openquok posts:create -c "Content" -s "2026-01-01T12:00:00Z" -t draft -i "<integration-uuid>"
openquok posts:create -c "内容" -s "2026-01-01T12:00:00Z" -t draft -i "<integration-uuid>"
Post with media (upload each file first — Rule 2)
带媒体的帖子(先上传每个文件——规则2)
MEDIA=$(jq -s 'add'
<(openquok upload ./img1.jpg | jq '[{id: .data.id, path: (.data.path // .data.filePath)}]')
<(openquok upload ./img2.jpg | jq '[{id: .data.id, path: (.data.path // .data.filePath)}]')) openquok posts:create -c "Content" -m "$MEDIA" -s "2026-01-01T12:00:00Z" -i "<integration-uuid>"
<(openquok upload ./img1.jpg | jq '[{id: .data.id, path: (.data.path // .data.filePath)}]')
<(openquok upload ./img2.jpg | jq '[{id: .data.id, path: (.data.path // .data.filePath)}]')) openquok posts:create -c "Content" -m "$MEDIA" -s "2026-01-01T12:00:00Z" -i "<integration-uuid>"
MEDIA=$(jq -s 'add'
<(openquok upload ./img1.jpg | jq '[{id: .data.id, path: (.data.path // .data.filePath)}]')
<(openquok upload ./img2.jpg | jq '[{id: .data.id, path: (.data.path // .data.filePath)}]')) openquok posts:create -c "内容" -m "$MEDIA" -s "2026-01-01T12:00:00Z" -i "<integration-uuid>"
<(openquok upload ./img1.jpg | jq '[{id: .data.id, path: (.data.path // .data.filePath)}]')
<(openquok upload ./img2.jpg | jq '[{id: .data.id, path: (.data.path // .data.filePath)}]')) openquok posts:create -c "内容" -m "$MEDIA" -s "2026-01-01T12:00:00Z" -i "<integration-uuid>"
Thread-style body (repeated -c); optional repeated -m pairs with leading segments (see agent/README.md
)
agent/README.md线程式内容(重复使用-c;可重复使用-m与前置内容段配对,参见agent/README.md
)
agent/README.mdMAIN=$(openquok upload ./main.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
C1=$(openquok upload ./comment1.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create
-c "Main post" -m "$MAIN"
-c "First reply" -m "$C1"
-s "2026-01-01T12:00:00Z"
-i "<integration-uuid>"
-c "Main post" -m "$MAIN"
-c "First reply" -m "$C1"
-s "2026-01-01T12:00:00Z"
-i "<integration-uuid>"
MAIN=$(openquok upload ./main.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
C1=$(openquok upload ./comment1.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create
-c "主帖" -m "$MAIN"
-c "第一条回复" -m "$C1"
-s "2026-01-01T12:00:00Z"
-i "<integration-uuid>"
-c "主帖" -m "$MAIN"
-c "第一条回复" -m "$C1"
-s "2026-01-01T12:00:00Z"
-i "<integration-uuid>"
Multi-channel (comma-separated integration UUIDs)
多渠道(逗号分隔的集成项UUID)
openquok posts:create -c "Content" -s "2026-01-01T12:00:00Z" -i "<uuid-a>,<uuid-b>"
openquok posts:create -c "内容" -s "2026-01-01T12:00:00Z" -i "<uuid-a>,<uuid-b>"
Per-channel bodies
按渠道设置内容
openquok posts:create
-s "2026-01-01T12:00:00Z"
-i "<uuid-a>,<uuid-b>"
--bodiesByIntegrationId '{"<uuid-a>":"Short","<uuid-b>":"Longer caption"}'
-s "2026-01-01T12:00:00Z"
-i "<uuid-a>,<uuid-b>"
--bodiesByIntegrationId '{"<uuid-a>":"Short","<uuid-b>":"Longer caption"}'
openquok posts:create
-s "2026-01-01T12:00:00Z"
-i "<uuid-a>,<uuid-b>"
--bodiesByIntegrationId '{"<uuid-a>":"简短内容","<uuid-b>":"较长说明"}'
-s "2026-01-01T12:00:00Z"
-i "<uuid-a>,<uuid-b>"
--bodiesByIntegrationId '{"<uuid-a>":"简短内容","<uuid-b>":"较长说明"}'
Platform-specific JSON (merge into each selected integration unless overridden)
平台特定JSON(会合并到每个选中的集成项中,除非被覆盖)
openquok posts:create
-c "Content"
-s "2026-01-01T12:00:00Z"
--settings '{"post_type":"post"}'
-i "<integration-uuid>"
-c "Content"
-s "2026-01-01T12:00:00Z"
--settings '{"post_type":"post"}'
-i "<integration-uuid>"
openquok posts:create
-c "内容"
-s "2026-01-01T12:00:00Z"
--settings '{"post_type":"post"}'
-i "<integration-uuid>"
-c "内容"
-s "2026-01-01T12:00:00Z"
--settings '{"post_type":"post"}'
-i "<integration-uuid>"
Full payload from disk (must match POST /public/posts — see Technical Concepts)
从磁盘加载完整负载(必须匹配POST /public/posts格式——参见技术概念)
openquok posts:create --json ./post.json
undefinedopenquok posts:create --json ./post.json
undefinedManaging posts
帖子管理
bash
undefinedbash
undefinedDefaults: 30 local calendar days before today through 30 after (override with --start/--end or --startDate/--endDate)
默认范围:今天之前30天到之后30天的本地日历时间(可使用--start/--end或--startDate/--endDate覆盖)
openquok posts:list
openquok posts:list --start "2026-01-01T00:00:00Z" --end "2026-02-01T00:00:00Z"
openquok posts:list
openquok posts:list --start "2026-01-01T00:00:00Z" --end "2026-02-01T00:00:00Z"
Flip draft ↔ scheduled using a post row id from posts:list
使用posts:list返回的帖子ID切换草稿↔已调度状态
openquok posts:status <post-id> --status draft
openquok posts:status <post-id> -s schedule
openquok posts:delete <post-id>
undefinedopenquok posts:status <post-id> --status draft
openquok posts:status <post-id> -s schedule
openquok posts:delete <post-id>
undefinedAnalytics
数据分析
bash
openquok analytics:platform <integration-uuid> # default 7 days
openquok analytics:platform <integration-uuid> -d 30
openquok analytics:platform <integration-uuid> --days 90
openquok analytics:post <post-id>
openquok analytics:post <post-id> -d 30--days-dTypical stdout is JSON you can slice with (followers, impressions, engagement, per-post likes, etc.).
jqMissing release id
When the product reports a missing provider release id for a published row, link analytics by listing candidates then connecting one:
bash
openquok analytics:post <post-id>
openquok posts:missing <post-id>
openquok posts:connect <post-id> --release-id "<provider-release-id>"
openquok analytics:post <post-id>bash
openquok analytics:platform <integration-uuid> # 默认7天
openquok analytics:platform <integration-uuid> -d 30
openquok analytics:platform <integration-uuid> --days 90
openquok analytics:post <post-id>
openquok analytics:post <post-id> -d 30--days-d标准输出通常是可使用处理的JSON数据(包含粉丝数、曝光量、互动量、单帖点赞数等)。
jq缺少发布ID
当产品提示已发布帖子缺少平台发布ID时,先列出候选ID再关联以修复分析数据:
bash
openquok analytics:post <post-id>
openquok posts:missing <post-id>
openquok posts:connect <post-id> --release-id "<provider-release-id>"
openquok analytics:post <post-id>Media upload
媒体上传
Always prefer workspace uploads before referencing media in posts (Rule 2). Many networks reject media that was not ingested through your Openquok workspace.
bash
openquok upload ./image.jpg
openquok upload-from-url "https://cdn.example.com/banner.png"Supported formats follow the backend upload policy (images, video, audio, documents — see product docs). Responses include and or ; build for .
data.iddata.pathdata.filePath[{id, path}]-mAfter , sanity-check stdout with (fail closed if or path is missing). Remote images must use so the API mirrors bytes into your workspace (Rule 2); do not paste bare CDN URLs into .
openquok uploadjqidopenquok upload-from-url-m在帖子中引用媒体前,请始终优先使用工作区上传(规则2)。许多平台会拒绝未通过Openquok工作区导入的媒体资源。
bash
openquok upload ./image.jpg
openquok upload-from-url "https://cdn.example.com/banner.png"支持的格式遵循后端上传策略(图片、视频、音频、文档——参见产品文档)。响应包含**和或**;需构建格式用于参数。
data.iddata.pathdata.filePath[{id, path}]-m执行**后,请使用检查标准输出(若或path缺失则终止操作)。远程图片必须使用**,以便API将字节镜像到你的工作区(规则2);请勿直接将CDN URL粘贴到中。
openquok uploadjqidopenquok upload-from-url-mCommon patterns
常见模式
Pattern 1: Discover and use integration tools
模式1:发现并使用集成工具
Tool names and payloads are provider-specific. For Openquok today, focus on Threads and Instagram (standalone vs business ). Inspect from , then call only for those allow-listed methods.
instagram-standaloneinstagram-businessoutput.toolsintegrations:settingsintegrations:triggerThreads — list UUID, inspect tools, trigger when present:
bash
TH_ID=$(openquok integrations:list | jq -r '.[] | select(.identifier=="threads") | .id')
openquok integrations:settings "$TH_ID"工具名称和负载是平台特定的。当前Openquok主要支持Threads和Instagram(独立版 vs 商业版)。查看返回的,仅调用其中允许的方法。
instagram-standaloneinstagram-businessintegrations:settingsoutput.toolsThreads — 列出UUID、查看工具、触发可用方法:
bash
TH_ID=$(openquok integrations:list | jq -r '.[] | select(.identifier=="threads") | .id')
openquok integrations:settings "$TH_ID"Replace METHOD with a name from output.tools[].methodName; adjust -d to match dataSchema.
将METHOD替换为output.tools[].methodName中的名称;调整-d以匹配dataSchema。
openquok integrations:trigger "$TH_ID" METHOD -d '{}'
**Instagram — standalone (Instagram Login) vs business (Facebook Page):**
```bash
IG_STANDALONE_ID=$(openquok integrations:list | jq -r '.[] | select(.identifier=="instagram-standalone") | .id')
openquok integrations:settings "$IG_STANDALONE_ID"
IG_BUSINESS_ID=$(openquok integrations:list | jq -r '.[] | select(.identifier=="instagram-business") | .id')
openquok integrations:settings "$IG_BUSINESS_ID"Replace and the JSON with values from and for that channel. Some channels may expose an empty array until the product adds more allow-listed calls.
METHOD-doutput.tools[].methodNamedataSchematoolsopenquok integrations:trigger "$TH_ID" METHOD -d '{}'
**Instagram — 独立版(Instagram登录)vs 商业版(Facebook主页):**
```bash
IG_STANDALONE_ID=$(openquok integrations:list | jq -r '.[] | select(.identifier=="instagram-standalone") | .id')
openquok integrations:settings "$IG_STANDALONE_ID"
IG_BUSINESS_ID=$(openquok integrations:list | jq -r '.[] | select(.identifier=="instagram-business") | .id')
openquok integrations:settings "$IG_BUSINESS_ID"将和后的JSON替换为对应渠道和中的值。部分渠道可能在产品添加更多允许调用的方法前,数组为空。
METHOD-doutput.tools[].methodNamedataSchematoolsPattern 2: Upload media before posting
模式2:先上传媒体再发布帖子
bash
VIDEO=$(openquok upload ./video.mp4 | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
THUMB=$(openquok upload ./thumbnail.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
MEDIA=$(jq -s 'add' <(echo "$VIDEO") <(echo "$THUMB"))
openquok posts:create \
-c "Check out my video!" \
-m "$MEDIA" \
-s "2026-01-01T12:00:00Z" \
-i "<integration-uuid>"bash
VIDEO=$(openquok upload ./video.mp4 | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
THUMB=$(openquok upload ./thumbnail.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
MEDIA=$(jq -s 'add' <(echo "$VIDEO") <(echo "$THUMB"))
openquok posts:create \
-c "看看我的视频!" \
-m "$MEDIA" \
-s "2026-01-01T12:00:00Z" \
-i "<integration-uuid>"Pattern 3: Multi-segment thread (Threads)
模式3:多段线程帖(Threads)
-ddelaySecondsbash
INTRO=$(openquok upload ./intro.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
P1=$(openquok upload ./point1.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "Thread starter (1/3)" -m "$INTRO" \
-c "Point one (2/3)" -m "$P1" \
-c "Conclusion (3/3)" \
-s "2026-01-01T12:00:00Z" \
-d 60000 \
-i "<integration-uuid>"-ddelaySecondsbash
INTRO=$(openquok upload ./intro.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
P1=$(openquok upload ./point1.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "线程帖开头(1/3)" -m "$INTRO" \
-c "观点一(2/3)" -m "$P1" \
-c "结论(3/3)" \
-s "2026-01-01T12:00:00Z" \
-d 60000 \
-i "<integration-uuid>"Pattern 3b: X-style thread (one image per segment; as guardrails)
模式3b:X风格线程帖(每段一张图;作为防护措施)
Same CLI shape as Pattern 3: every segment that needs a picture must use media from a real (or ) result — never a bare filename.
openquok uploadupload-from-urlbash
INTRO=$(openquok upload ./intro.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
P1=$(openquok upload ./point1.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
P2=$(openquok upload ./point2.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
OUTRO=$(openquok upload ./outro.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "Thread starter (1/4)" -m "$INTRO" \
-c "Point one (2/4)" -m "$P1" \
-c "Point two (3/4)" -m "$P2" \
-c "Conclusion (4/4)" -m "$OUTRO" \
-s "2026-01-01T12:00:00Z" \
-d 2000 \
-i "<integration-uuid>"Use the integration UUID for the channel you are posting to (). If the user only described images in chat without providing files or URLs, stop and collect assets first (see Prepare in Core Workflow).
integrations:listCLI格式与模式3相同:每个需要图片的内容段,必须使用来自真实(或)结果的媒体——绝不能直接使用文件名。
openquok uploadupload-from-urlbash
INTRO=$(openquok upload ./intro.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
P1=$(openquok upload ./point1.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
P2=$(openquok upload ./point2.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
OUTRO=$(openquok upload ./outro.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "线程帖开头(1/4)" -m "$INTRO" \
-c "观点一(2/4)" -m "$P1" \
-c "观点二(3/4)" -m "$P2" \
-c "结论(4/4)" -m "$OUTRO" \
-s "2026-01-01T12:00:00Z" \
-d 2000 \
-i "<integration-uuid>"请使用目标渠道的集成项UUID(通过获取)。若用户仅在聊天中描述了图片但未提供文件或URL,请先收集资源再继续(参见核心工作流中的准备步骤)。
integrations:listPattern 4: Campaign via JSON file
模式4:通过JSON文件发起营销活动
Use the shape. Example skeleton:
POST /public/postsbash
cat > campaign.json << 'EOF'
{
"scheduledAt": "2026-01-01T12:00:00.000Z",
"status": "scheduled",
"body": "Default caption",
"integrationIds": ["<uuid-a>", "<uuid-b>"],
"bodiesByIntegrationId": {
"<uuid-a>": "Short version for channel A",
"<uuid-b>": "Longer version for channel B"
},
"media": [
{ "id": "<from upload>", "path": "<from upload>" }
],
"providerSettingsByIntegrationId": {
"<uuid-a>": {},
"<uuid-b>": {}
}
}
EOF
openquok posts:create --json ./campaign.jsonFill and per-integration settings using / .
mediauploadintegrations:settings使用****格式。示例框架:
POST /public/postsbash
cat > campaign.json << 'EOF'
{
"scheduledAt": "2026-01-01T12:00:00.000Z",
"status": "scheduled",
"body": "默认说明",
"integrationIds": ["<uuid-a>", "<uuid-b>"],
"bodiesByIntegrationId": {
"<uuid-a>": "渠道A的简短版本",
"<uuid-b>": "渠道B的较长版本"
},
"media": [
{ "id": "<来自上传>", "path": "<来自上传>" }
],
"providerSettingsByIntegrationId": {
"<uuid-a>": {},
"<uuid-b>": {}
}
}
EOF
openquok posts:create --json ./campaign.json使用/填充和按集成项设置的内容。
uploadintegrations:settingsmediaPattern 5: Validate length before posting
模式5:发布前验证内容长度
bash
#!/usr/bin/env bash
INTEGRATION_ID="<integration-uuid>"
CONTENT="Your post content here"
SETTINGS_JSON=$(openquok integrations:settings "$INTEGRATION_ID")
MAX_LENGTH=$(echo "$SETTINGS_JSON" | jq '.output.maxLength')
if [ "${#CONTENT}" -gt "$MAX_LENGTH" ]; then
echo "Content exceeds $MAX_LENGTH chars, truncating..."
CONTENT="${CONTENT:0:$((MAX_LENGTH - 3))}..."
fi
openquok posts:create \
-c "$CONTENT" \
-s "2026-01-01T12:00:00Z" \
-i "$INTEGRATION_ID"bash
#!/usr/bin/env bash
INTEGRATION_ID="<integration-uuid>"
CONTENT="你的帖子内容"
SETTINGS_JSON=$(openquok integrations:settings "$INTEGRATION_ID")
MAX_LENGTH=$(echo "$SETTINGS_JSON" | jq '.output.maxLength')
if [ "${#CONTENT}" -gt "$MAX_LENGTH" ]; then
echo "内容超过$MAX_LENGTH字符,正在截断..."
CONTENT="${CONTENT:0:$((MAX_LENGTH - 3))}..."
fi
openquok posts:create \
-c "$CONTENT" \
-s "2026-01-01T12:00:00Z" \
-i "$INTEGRATION_ID"Pattern 6: Batch scheduling
模式6:批量调度
bash
#!/usr/bin/env bash
DATES=("2026-02-14T09:00:00Z" "2026-02-15T09:00:00Z" "2026-02-16T09:00:00Z")
CONTENT=("Monday motivation" "Tuesday tips" "Wednesday wisdom")
for i in "${!DATES[@]}"; do
MEDIA=$(openquok upload "post-${i}.jpg" | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "${CONTENT[$i]}" \
-s "${DATES[$i]}" \
-i "<integration-uuid>" \
-m "$MEDIA"
donebash
#!/usr/bin/env bash
DATES=("2026-02-14T09:00:00Z" "2026-02-15T09:00:00Z" "2026-02-16T09:00:00Z")
CONTENT=("周一动力" "周二技巧" "周三智慧")
for i in "${!DATES[@]}"; do
MEDIA=$(openquok upload "post-${i}.jpg" | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "${CONTENT[$i]}" \
-s "${DATES[$i]}" \
-i "<integration-uuid>" \
-m "$MEDIA"
donePattern 7: Error handling and retry
模式7:错误处理与重试
bash
#!/usr/bin/env bash
CONTENT="Your post content"
INTEGRATION_ID="<integration-uuid>"
DATE="2026-01-01T12:00:00Z"
MAX_RETRIES=3
for attempt in $(seq 1 "$MAX_RETRIES"); do
if openquok posts:create -c "$CONTENT" -s "$DATE" -i "$INTEGRATION_ID"; then
echo "Post created successfully"
break
fi
echo "Attempt $attempt failed"
if [ "$attempt" -lt "$MAX_RETRIES" ]; then
sleep $((2 ** attempt))
else
exit 1
fi
donebash
#!/usr/bin/env bash
CONTENT="你的帖子内容"
INTEGRATION_ID="<integration-uuid>"
DATE="2026-01-01T12:00:00Z"
MAX_RETRIES=3
for attempt in $(seq 1 "$MAX_RETRIES"); do
if openquok posts:create -c "$CONTENT" -s "$DATE" -i "$INTEGRATION_ID"; then
echo "帖子创建成功"
break
fi
echo "第$attempt次尝试失败"
if [ "$attempt" -lt "$MAX_RETRIES" ]; then
sleep $((2 ** attempt))
else
exit 1
fi
doneTechnical concepts
技术概念
Integration tools workflow
集成工具工作流
- List tools — →
integrations:settings(output.tools[],methodName,description).dataSchema - Call a tool — .
integrations:trigger <uuid> <methodName> [-d '<json object>'] - Use the result — Response shape is ; contents vary by provider method.
{ "output": ... }
Allow-listed tools today are scoped to Meta: Threads (), Instagram (Instagram Login / standalone) (), and Instagram (Facebook Page / business) (). Method names and payloads differ per channel — always read for the live list before calling .
threadsinstagram-standaloneinstagram-businessintegrations:settingsoutput.toolsintegrations:trigger- 列出工具 — →
integrations:settings(包含output.tools[]、methodName、description)。dataSchema - 调用工具 — 。
integrations:trigger <uuid> <methodName> [-d '<json object>'] - 使用结果 — 响应格式为;内容因平台方法而异。
{ "output": ... }
当前允许使用的工具仅限于Meta平台:Threads()、Instagram(Instagram登录/独立版)()和Instagram(Facebook主页/商业版)()。方法名称和负载因渠道而异——调用前,请务必查看返回的实时列表。
threadsinstagram-standaloneinstagram-businessintegrations:triggerintegrations:settingsoutput.toolsProvider settings
平台设置
Openquok merges CLI JSON into for every UUID. For multi-segment posts, the CLI also synthesizes a per-integration array (message + ) from repeated / .
--settingsproviderSettingsByIntegrationId-irepliesdelaySeconds-c-dAuthoritative field names for a channel come from and the dashboard composer.
integrations:settingsOpenquok会将CLI的JSON合并到每个指定的UUID对应的**中。对于多段帖子,CLI还会从重复的/合成每个集成项对应的**数组(包含消息和)。
--settings-iproviderSettingsByIntegrationId-c-drepliesdelaySeconds渠道的权威字段名称来自和控制台编辑器。
integrations:settingsThreading and media
线程帖与媒体
Repeated builds the root (first segment) plus threaded in provider settings. Media for those segments is supplied via repeated / JSON as documented in and covered by CLI tests under .
-cbodyreplies-mmediaagent/README.mdagent/tests/e2e/重复使用会构建根(第一段)和线程化的(平台设置中)。这些内容段的媒体通过重复使用或JSON提供,具体文档参见,CLI测试用例在目录下。
-cbodyreplies-mmediaagent/README.mdagent/tests/e2e/Dates
日期
- Schedule / create: /
-s— ISO-8601 string (required for flag-based--scheduledAt).posts:create - List: /
--start(aliases--end/--startDate).--endDate - Defaults for : ±30 local calendar days from today, serialized to ISO timestamps.
posts:list
- 调度/创建:/
-s— ISO-8601格式字符串(基于标志的--scheduledAt命令必填)。posts:create - 列表:/
--start(别名--end/--startDate)。--endDate - 默认范围:今天前后各30天的本地日历时间,序列化为ISO时间戳。
posts:list
Upload response
上传响应
Typical shape (envelope may include / depending on route):
successmessagejson
{
"data": {
"id": "media-id",
"path": "storage/path/or/url",
"filePath": "alternate-field-name"
}
}Always prefer that tolerates vs .
jqpathfilePath典型格式(根据路由不同,信封可能包含/):
successmessagejson
{
"data": {
"id": "media-id",
"path": "storage/path/or/url",
"filePath": "备用字段名"
}
}请始终使用可兼容和的命令。
pathfilePathjqJSON mode vs flags
JSON模式 vs 标志
Flags — fast path for one body, optional uploads, optional .
--settings--json-jPOST /public/postsbodiesByIntegrationIdproviderSettingsByIntegrationIdmedia标志 — 适用于单内容、可选上传、可选的快速路径。
--settings--json-jPOST /public/postsbodiesByIntegrationIdproviderSettingsByIntegrationIdmediaPlatform-specific examples
平台特定示例
Always run for the exact JSON your workspace expects. The snippets below are illustrative.
openquok integrations:settings <uuid>请始终执行获取工作区所需的精确JSON格式。以下代码片段仅作示例参考。
openquok integrations:settings <uuid>Threads (Meta)
Threads(Meta)
Text-only:
bash
openquok posts:create \
-c "Launch post" \
-s "2026-01-01T12:00:00Z" \
-i "<threads-uuid>"With image (Rule 2): At publish time the backend turns each stored object key into a public URL and Meta’s servers fetch that URL for the Threads media container. Prefer JPEG or PNG; SVG is rejected in ().
https://threadsProviderassertThreadsSupportedMediabash
test -f ./hero.jpg && test -s ./hero.jpg
IMAGE=$(openquok upload ./hero.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "Shipped today 🚀" \
-m "$IMAGE" \
-s "2026-01-01T12:00:00Z" \
-i "<threads-uuid>"纯文本帖:
bash
openquok posts:create \
-c "发布帖" \
-s "2026-01-01T12:00:00Z" \
-i "<threads-uuid>"带图片(规则2): 发布时后端会将每个存储对象密钥转换为公开URL,Meta服务器会获取该URL作为Threads媒体容器。优先使用JPEG或PNG格式;中SVG会被拒绝()。
https://threadsProviderassertThreadsSupportedMediabash
test -f ./hero.jpg && test -s ./hero.jpg
IMAGE=$(openquok upload ./hero.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "今日发布 🚀" \
-m "$IMAGE" \
-s "2026-01-01T12:00:00Z" \
-i "<threads-uuid>"Instagram — standalone (instagram-standalone
)
instagram-standaloneInstagram — 独立版(instagram-standalone
)
instagram-standaloneUse the integration UUID whose is (Instagram Login product).
identifierinstagram-standalonebash
IMAGE=$(openquok upload ./image.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "Caption #hashtag" \
-s "2026-01-01T12:00:00Z" \
--settings '{"post_type":"post"}' \
-m "$IMAGE" \
-i "<instagram-standalone-uuid>"
STORY=$(openquok upload ./story.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "" \
-s "2026-01-01T12:00:00Z" \
--settings '{"post_type":"story"}' \
-m "$STORY" \
-i "<instagram-standalone-uuid>"使用为的集成项UUID(对应Instagram登录产品)。
identifierinstagram-standalonebash
IMAGE=$(openquok upload ./image.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "说明 #话题" \
-s "2026-01-01T12:00:00Z" \
--settings '{"post_type":"post"}' \
-m "$IMAGE" \
-i "<instagram-standalone-uuid>"
STORY=$(openquok upload ./story.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "" \
-s "2026-01-01T12:00:00Z" \
--settings '{"post_type":"story"}' \
-m "$STORY" \
-i "<instagram-standalone-uuid>"Instagram — business (instagram-business
)
instagram-businessInstagram — 商业版(instagram-business
)
instagram-businessUse the integration UUID whose is (Page-linked professional account). Confirm and other keys with for that row.
identifierinstagram-businesspost_typeintegrations:settingsbash
IMAGE=$(openquok upload ./image.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "Caption #hashtag" \
-s "2026-01-01T12:00:00Z" \
--settings '{"post_type":"post"}' \
-m "$IMAGE" \
-i "<instagram-business-uuid>"使用为的集成项UUID(关联主页的专业账号)。请通过确认该渠道的和其他字段。
identifierinstagram-businessintegrations:settingspost_typebash
IMAGE=$(openquok upload ./image.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create \
-c "说明 #话题" \
-s "2026-01-01T12:00:00Z" \
--settings '{"post_type":"post"}' \
-m "$IMAGE" \
-i "<instagram-business-uuid>"Extra recommendations
额外建议
If you generate images or video elsewhere (hosted URLs), mirrors them into the workspace so Rule 2 stays satisfied without a manual download step. For local renders, remains the simplest path.
openquok upload-from-urlopenquok upload ./fileExternal media CLIs can still fit upstream of when their output is a stable URL you are allowed to fetch.
upload-from-urlhttps://若你在其他地方生成了图片或视频(托管URL),**会将其镜像到工作区,无需手动下载即可满足规则2。对于本地渲染的资源,**仍是最简单的方式。
openquok upload-from-urlopenquok upload ./file当外部媒体CLI的输出是稳定且可获取的URL时,仍可在之前使用它们。
https://upload-from-urlSupporting resources
支持资源
In this repo (agent / CLI):
- agent/README.md — Command reference, media flags, , e2e test naming.
posts:status
Threads publish behavior (server implementation):
- — How media is resolved to public URLs (
backend/integrations/providers/threadsProvider.ts), reachability checks, SVG blocked,resolvePublicMediaUrl/ carousel /createSingleMediaContentGraph calls, and error formatting. When debugging “unknown” Meta errors, confirm the public URL returns non-empty image bytes (notthreads_publish).Content-Length: 0
本仓库中(agent/CLI):
- agent/README.md — 命令参考、媒体标志、、端到端测试命名规则。
posts:status
Threads发布行为(服务器实现):
- — 媒体如何解析为公开URL(
backend/integrations/providers/threadsProvider.ts)、可达性检查、SVG被阻止、resolvePublicMediaUrl/轮播/createSingleMediaContentGraph调用、错误格式化。调试“未知”Meta错误时,请确认公开媒体URL返回非空图片字节(而非threads_publish)。Content-Length: 0
Common gotchas
常见陷阱
- Not authenticated — Run (or export
openquok auth:login --json) before API commands. For OpenClaw/Telegram, prefer an API key; for OAuth, share onlyOPENQUOK_API_KEYfrom stdout (never fabricate codes).verification_uri_complete - OAuth "Invalid or expired code" — The user code is missing from the auth server (expired ~15m, typo, or agent invented the link). Re-run while the CLI polls; use the prefilled
openquok auth:login --jsonURL. Signing in at openquok.com alone does not validate the device code — that happens only after step 1 succeeds and the browser redirects to openquok.com.verification_uri_complete - Wrong integration UUID — Refresh with ; IDs are per workspace.
integrations:list - Settings mismatch — Check for required fields.
integrations:settings - Media skipped upload — Rule 2: every / JSON
-mentry needsmedia[]+idfrompath/upload.upload-from-url - Chat said “with an image” but no file arrived — Do not schedule with until you have a file or direct image URL (see Prepare in Core Workflow). Empty or placeholder uploads break Threads (and other providers) at publish time.
-m - Upload succeeded but object is empty — If publish fails with vague Threads / Graph errors, curl the logged public media URL: means storage has no bytes (bad upload source or agent wrote an empty file). Fix the asset and re-upload.
Content-Length: 0 - Shell JSON quoting — Prefer single quotes around JSON literals: .
--settings '{"post_type":"post"}' - Missing schedule — Flag-based requires
posts:createunless-ssupplies--json.scheduledAt - Unknown tool — only runs methods listed under
integrations:trigger.output.tools - Character limits — Read from
output.maxLength.integrations:settings - Provider gaps — may be empty for a Meta channel until a method is allow-listed; do not assume a tool exists without checking
output.tools.integrations:settings - Thread delay units — on
-dis milliseconds, not minutes.posts:create - Analytics window — Only ,
7, or30days.90 - Env vs disk credentials — Stored login wins over until
OPENQUOK_API_KEY.auth:logout - Stale global CLI — If fails with verification_uri … expected cli-auth.openquok.com, upgrade:
auth:login(need ≥ 0.0.6 fornpm install -g @openquok/auto-cli@latestverify URLs).www.openquok.comand gateway restarts do not changenpx skills add; reinstall the npm package on the agent host.openquok --version
- 未认证 — 在执行API命令前,请运行(或导出
openquok auth:login --json)。对于OpenClaw/Telegram,优先使用API密钥;对于OAuth,仅分享标准输出中的OPENQUOK_API_KEY(绝不要编造代码)。verification_uri_complete - OAuth“无效或过期代码” — 用户代码未在认证服务器上找到(过期约15分钟、输入错误或代理生成了错误链接)。在CLI轮询时重新运行;使用预填充的
openquok auth:login --jsonURL。仅在openquok.com登录无法验证设备代码——只有步骤1成功且浏览器重定向到openquok.com后,验证才会完成。verification_uri_complete - 错误的集成项UUID — 使用刷新;ID是每个工作区独有的。
integrations:list - 设置不匹配 — 查看确认必填字段。
integrations:settings - 媒体未上传 — 规则2:每个/JSON
-m条目都需要来自media[]/upload的upload-from-url+id。path - 聊天中提到“带图片”但未提供文件 — 在获取到文件或直接图片URL前,不要使用调度帖子(参见核心工作流中的准备步骤)。空或占位符上传会导致Threads(及其他平台)发布失败。
-m - 上传成功但对象为空 — 若发布时出现模糊的Threads/Graph错误,请curl日志中的公开媒体URL:****意味着存储中没有字节(上传源错误或代理写入了空文件)。修复资源后重新上传。
Content-Length: 0 - Shell JSON引用 — 优先使用单引号包裹JSON字面量:。
--settings '{"post_type":"post"}' - 缺少调度时间 — 基于标志的命令需要
posts:create,除非-s提供了--json。scheduledAt - 未知工具 — 仅能运行
integrations:trigger中列出的方法。output.tools - 字符限制 — 从的
integrations:settings获取限制。output.maxLength - 平台功能缺口 — Meta渠道的可能为空,直到添加了允许调用的方法;不要在未检查
output.tools的情况下假设工具存在。integrations:settings - 线程帖延迟单位 — 中的
posts:create单位是毫秒,而非分钟。-d - 分析窗口 — 仅支持7、30或90天。
- 环境变量 vs 磁盘凭据 — 存储的登录信息优先级高于,直到执行
OPENQUOK_API_KEY。auth:logout - 全局CLI版本过时 — 若失败并提示verification_uri … expected cli-auth.openquok.com,请升级:
auth:login(npm install -g @openquok/auto-cli@latest验证URL需要≥0.0.6版本)。www.openquok.com和网关重启不会改变npx skills add;请在代理主机上重新安装npm包。openquok --version
Quick reference
快速参考
bash
undefinedbash
undefinedAuthenticate first (agents: --json or API key; humans locally may omit --json)
先认证(代理:使用--json或API密钥;本地人类用户可省略--json)
openquok auth:status
openquok auth:login --json
openquok auth:logout
export OPENQUOK_API_KEY=opo_...
openquok auth:status
openquok auth:login --json
openquok auth:logout
export OPENQUOK_API_KEY=opo_...
Discovery
发现
openquok integrations:list
openquok integrations:settings <uuid>
openquok integrations:trigger <uuid> <method> -d '{}'
openquok integrations:list
openquok integrations:settings <uuid>
openquok integrations:trigger <uuid> <method> -d '{}'
Media (Rule 2)
媒体(规则2)
openquok upload ./file
openquok upload-from-url "https://…"
openquok upload ./file
openquok upload-from-url "https://…"
Posting
发布
openquok posts:create -c "text" -s "2026-01-01T12:00:00Z" -i "<uuid>"
openquok posts:create -c "text" -s "2026-01-01T12:00:00Z" -t draft -i "<uuid>"
openquok posts:create -c "text" -s "2026-01-01T12:00:00Z" -i "<uuid>" -m "$(openquok upload ./img.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')"
openquok posts:create -c "main" -c "reply" -s "2026-01-01T12:00:00Z" -i "<uuid>"
openquok posts:create --json ./post.json
openquok posts:create -c "文本" -s "2026-01-01T12:00:00Z" -i "<uuid>"
openquok posts:create -c "文本" -s "2026-01-01T12:00:00Z" -t draft -i "<uuid>"
openquok posts:create -c "文本" -s "2026-01-01T12:00:00Z" -i "<uuid>" -m "$(openquok upload ./img.jpg | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')"
openquok posts:create -c "主帖" -c "回复" -s "2026-01-01T12:00:00Z" -i "<uuid>"
openquok posts:create --json ./post.json
Management
管理
openquok posts:list
openquok posts:status <post-id> --status draft
openquok posts:status <post-id> -s schedule
openquok posts:delete <post-id>
openquok posts:list
openquok posts:status <post-id> --status draft
openquok posts:status <post-id> -s schedule
openquok posts:delete <post-id>
Analytics & recovery
分析与恢复
openquok analytics:platform <uuid> -d 30
openquok analytics:post <post-id> -d 7
openquok posts:missing <post-id>
openquok posts:connect <post-id> --release-id "<id>"
openquok analytics:platform <uuid> -d 30
openquok analytics:post <post-id> -d 7
openquok posts:missing <post-id>
openquok posts:connect <post-id> --release-id "<id>"
Help
帮助
openquok --help
openquok posts:create --help
undefinedopenquok --help
openquok posts:create --help
undefined