openquok-core

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
PropertyValue
nameopenquok
descriptionAI-ready social scheduling: CLI-first
@openquok/auto-cli
(install ≥ 0.0.6 globally — skills do not upgrade npm), posts, integrations, media; complements stacks like OpenClaw.
allowed-toolsBash(openquok:*)

属性
名称openquok
描述支持AI的社交内容调度:优先使用CLI工具
@openquok/auto-cli
(需全局安装**≥0.0.6**版本——技能不会升级npm),支持发布、集成、媒体管理;可与OpenClaw等技术栈互补。
允许使用的工具Bash(openquok:*)

⚠️ Three Hard Rules (Read First)

⚠️ 三条硬性规则(请先阅读)

Rule 0 — Global CLI (once per new chat session). This skill never installs the binary;
npx skills add
only copies these instructions under
.agents/skills/
and does not bump the global
openquok
on the host (nor does restarting the gateway). Only at the start of a new chat session — not before every
openquok
call — run
openquok --version
once, tell the user the version reported. Ask whether they want to upgrade to the latest
@openquok/auto-cli
; if yes, run
npm install -g @openquok/auto-cli@latest
in the environment the agent uses for shell commands, then
openquok --version
again.
Rule 1 — Authenticate before anything. All
@openquok/auto-cli
(
openquok
) commands that call the API fail without valid credentials.
Rule 2 — Every value passed to
-m
/
--media
(or to media/
image
fields in
--json
payloads) MUST come from workspace upload via
openquok upload
or
openquok upload-from-url
.
Bare local paths (
image.jpg
) and arbitrary external URLs pasted into
-m
are not a substitute: providers expect media that was stored through Openquok’s upload API (with stable
id
+ storage
path
). Always:
bash
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
-m "something.jpg"
anywhere below, treat it as shorthand for "the
id
+
path
(or
filePath
) from
openquok upload something.jpg
", passed as the JSON array form above — never a raw local filename or ad-hoc URL alone.

规则0 — 全局CLI(每次新会话执行一次)。本技能不会安装二进制文件;
npx skills add
仅会将这些说明复制到
.agents/skills/
目录下,不会更新主机上全局安装的
openquok
版本(网关重启也不会)。仅在新会话开始时——并非每次调用
openquok
前——执行一次
openquok --version
,告知用户返回的版本号。询问用户是否要升级到最新版本的
@openquok/auto-cli
;如果用户同意,在代理用于执行Shell命令的环境中运行
npm install -g @openquok/auto-cli@latest
,然后再次执行
openquok --version
规则1 — 先认证再操作。所有调用API的
@openquok/auto-cli
openquok
)命令,若无有效凭据都会执行失败。
规则2 — 传递给
-m
/
--media
(或
--json
负载中的media/
image
字段)的所有值,必须来自通过
openquok upload
openquok upload-from-url
上传到工作区的资源
。直接使用本地路径(如
image.jpg
)或随意粘贴到
-m
中的外部URL均不满足要求:平台仅接受通过Openquok上传API存储的媒体资源(带有稳定的
id
和存储
path
)。请始终遵循以下流程:
bash
RESULT=$(openquok upload <file>)
MEDIA=$(echo "$RESULT" | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create ... -m "$MEDIA" ...
如果在下方看到
-m "something.jpg"
,请将其视为“
openquok upload something.jpg
返回的
id
+
path
(或
filePath
)”的简写,需以上述JSON数组形式传递——绝不能直接使用原始本地文件名或临时URL。

⚠️ Authentication Required

⚠️ 必须先完成认证

You MUST authenticate before running any
openquok
command that hits the API.
All commands fail without valid credentials.(see Rule 0: check version once at session start, not before every command).
Before doing anything else, check auth status:
bash
openquok auth:status
If not authenticated, choose one path:
在运行任何调用API的
openquok
命令前,必须完成认证
。若无有效凭据,所有命令都会执行失败(参见规则0:仅在会话开始时检查一次版本,而非每次命令前)。
在进行任何操作前,先检查认证状态:
bash
openquok auth:status
若未认证,可选择以下方式之一:

API Key:

API密钥:

bash
export OPENQUOK_API_KEY=opo_your_key_here
bash
export OPENQUOK_API_KEY=opo_your_key_here

or 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)

OAuth2设备流(远程浏览器;代理需使用
--json

Use 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 --json
The first JSON object includes
verification_uri_complete
(link with
?code=
prefilled). Give the user that exact link — not a bare
/device/verify
URL and not a made-up code.
What the user does in the browser (two steps):
Do NOT proceed with any other commands until authentication is confirmed (
openquok auth:status
succeeds).

当用户可在手机或桌面端完成浏览器操作,同时CLI(或代理)保持轮询时使用此方式。
代理注意:绝不要自行生成验证URL或用户代码。执行真实命令并仅使用其输出中的值:
bash
openquok auth:login --json
第一个JSON对象包含
verification_uri_complete
(预填充
?code=
的链接)。请将该精确链接提供给用户——不要提供裸的
/device/verify
URL或虚构的代码。
用户在浏览器中的操作步骤(两步):
在认证确认成功前(
openquok auth:status
执行成功),请勿进行任何其他命令

Core Workflow

核心工作流

The fundamental pattern for using the Openquok CLI (
openquok
from
@openquok/auto-cli
):
  1. Authenticate — Verify or set up authentication (see above).
  2. Discover — List integrations and read each channel’s rules, limits, and allow-listed tools.
  3. Fetch — Call
    integrations:trigger
    when a provider exposes dynamic data (playlists, pages, etc.).
  4. Prepare — Upload media (
    upload
    /
    upload-from-url
    ) 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 direct
    https://
    image URL for
    upload-from-url
    , ask them for the file or a direct image URL before creating the post with
    -m
    .
  5. Post — Create posts and flip status (
    posts:create
    ,
    posts:status
    ).
  6. Analyze — Use
    analytics:platform
    and
    analytics:post
    with a
    7
    /
    30
    /
    90
    day window.
  7. Resolve — If per-post analytics indicates a missing provider release id, run
    posts:missing
    , then
    posts:connect --release-id
    .
bash
undefined
使用Openquok CLI(
@openquok/auto-cli
提供的
openquok
命令)的基础流程:
  1. 认证 — 验证或设置认证信息(参见上文)。
  2. 发现 — 列出集成项并查看每个渠道的规则、限制和允许使用的工具。
  3. 获取 — 当平台暴露动态数据(如播放列表、页面等)时,调用
    integrations:trigger
  4. 准备 — 若帖子需要图片或视频,先上传媒体资源(
    upload
    /
    upload-from-url
    )。在聊天代理(如Telegram、OpenClaw等)中,若用户想要添加图片但未提供主机上的文件或可用于
    upload-from-url
    的直接
    https://
    图片URL,请先向用户索要文件或直接图片URL,再使用
    -m
    创建帖子。
  5. 发布 — 创建帖子并切换状态(
    posts:create
    posts:status
    )。
  6. 分析 — 使用
    analytics:platform
    analytics:post
    ,选择7/30/90天的统计窗口。
  7. 解决问题 — 若单帖分析显示缺少平台发布ID,执行
    posts:missing
    ,再执行
    posts:connect --release-id
bash
undefined

1. 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:status
Option 2: OAuth2 device flow
Agents (OpenClaw, Hermes, CI, SSH, any non-interactive host): use
--json
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)
bash
openquok auth:login --json
openquok auth:status
openquok auth:logout
Humans on a local machine with a TTY: you may use
openquok auth:login
without
--json
(instructions on stderr; optional browser open after Enter). Do not suggest bare interactive login for remote agents — they should use
--json
or an API key.
Device-flow tokens are stored in
~/.openquok/credentials.json
. Stored credentials take priority over
OPENQUOK_API_KEY
when both are set; run
auth:logout
if you need the env var to win.
See 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.com
Use a local
OPENQUOK_AUTH_SERVER
(for example
http://localhost:3111
) when developing
agent/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或任何非交互式主机):仅使用
--json
——它会在标准输出中打印设备负载和轮询结果,不会在代理机器上打开浏览器,且与你必须转发给用户的内容一致(参见必须先完成认证
bash
openquok auth:login --json
openquok auth:status
openquok auth:logout
本地机器上的人类用户(带TTY): 可以不带
--json
执行
openquok auth:login
(标准错误输出会显示说明;按Enter后可选择打开浏览器)。请勿建议远程代理使用无参数的交互式登录——它们应使用
--json
或API密钥。
设备流令牌存储在
~/.openquok/credentials.json
中。当同时设置了存储凭据和
OPENQUOK_API_KEY
时,存储凭据优先级更高
;若需要环境变量生效,请执行
auth:logout
有关完整浏览器流程和“无效或过期代码”问题的排查,请参见必须先完成认证
可选配置覆盖
bash
export OPENQUOK_API_URL=https://api.openquok.com
export OPENQUOK_AUTH_SERVER=https://cli-auth.openquok.com
开发
agent/server
时,可使用本地
OPENQUOK_AUTH_SERVER
(例如
http://localhost:3111
)。

Integration 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:list
.
bash
openquok integrations:list
openquok integrations:settings <integration-uuid>
openquok integrations:trigger <integration-uuid> <method-name> [--data '<json>' | -d '<json>']
新渠道需在Openquok网页应用中连接;CLI会使用
integrations:list
返回的集成项UUID。

Creating posts

创建帖子

bash
undefined
bash
undefined

Simple 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>"
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>"

Thread-style body (repeated -c); optional repeated -m pairs with leading segments (see
agent/README.md
)

线程式内容(重复使用-c;可重复使用-m与前置内容段配对,参见
agent/README.md

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 "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>"

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"}'
openquok posts:create
-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>"
openquok posts:create
-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
undefined
openquok posts:create --json ./post.json
undefined

Managing posts

帖子管理

bash
undefined
bash
undefined

Defaults: 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>
undefined
openquok posts:status <post-id> --status draft openquok posts:status <post-id> -s schedule
openquok posts:delete <post-id>
undefined

Analytics

数据分析

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
/
-d
must be 7, 30, or 90 (enforced by the CLI).
Typical stdout is JSON you can slice with
jq
(followers, impressions, engagement, per-post likes, etc.).
Missing 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
必须为73090(CLI强制执行)。
标准输出通常是可使用
jq
处理的JSON数据(包含粉丝数、曝光量、互动量、单帖点赞数等)。
缺少发布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
data.id
and
data.path
or
data.filePath
; build
[{id, path}]
for
-m
.
After
openquok upload
, sanity-check stdout with
jq
(fail closed if
id
or path is missing). Remote images must use
openquok upload-from-url
so the API mirrors bytes into your workspace (Rule 2); do not paste bare CDN URLs into
-m
.

在帖子中引用媒体前,请始终优先使用工作区上传(规则2)。许多平台会拒绝未通过Openquok工作区导入的媒体资源。
bash
openquok upload ./image.jpg
openquok upload-from-url "https://cdn.example.com/banner.png"
支持的格式遵循后端上传策略(图片、视频、音频、文档——参见产品文档)。响应包含**
data.id
data.path
data.filePath
**;需构建
[{id, path}]
格式用于
-m
参数。
执行**
openquok upload
后,请使用
jq
检查标准输出(若
id
或path缺失则终止操作)。远程图片必须使用
openquok upload-from-url
**,以便API将字节镜像到你的工作区(规则2);请勿直接将CDN URL粘贴到
-m
中。

Common 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
instagram-standalone
vs business
instagram-business
). Inspect
output.tools
from
integrations:settings
, then call
integrations:trigger
only for those allow-listed methods.
Threads — 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主要支持ThreadsInstagram(独立版
instagram-standalone
vs 商业版
instagram-business
)。查看
integrations:settings
返回的
output.tools
,仅调用其中允许的方法。
Threads — 列出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
METHOD
and the
-d
JSON with values from
output.tools[].methodName
and
dataSchema
for that channel. Some channels may expose an empty
tools
array until the product adds more allow-listed calls.
openquok 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"
METHOD
-d
后的JSON替换为对应渠道
output.tools[].methodName
dataSchema
中的值。部分渠道可能在产品添加更多允许调用的方法前,
tools
数组为空。

Pattern 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)

-d
is milliseconds between follow-up segments (converted to
delaySeconds
on the wire); default 5000 ms if omitted.
bash
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>"
-d
参数的单位是毫秒(在传输时会转换为
delaySeconds
);若省略则默认5000毫秒。
bash
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
openquok upload
(or
upload-from-url
) result — never a bare filename.
bash
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 (
integrations:list
). If the user only described images in chat without providing files or URLs, stop and collect assets first (see Prepare in Core Workflow).
CLI格式与模式3相同:每个需要图片的内容段,必须使用来自真实
openquok upload
(或
upload-from-url
)结果的媒体——绝不能直接使用文件名。
bash
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(通过
integrations:list
获取)。若用户仅在聊天中描述了图片但未提供文件或URL,请先收集资源再继续(参见核心工作流中的准备步骤)。

Pattern 4: Campaign via JSON file

模式4:通过JSON文件发起营销活动

Use the
POST /public/posts
shape. Example skeleton:
bash
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.json
Fill
media
and per-integration settings using
upload
/
integrations:settings
.
使用**
POST /public/posts
**格式。示例框架:
bash
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
使用
upload
/
integrations:settings
填充
media
和按集成项设置的内容。

Pattern 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"
done
bash
#!/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"
done

Pattern 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
done

bash
#!/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
done

Technical concepts

技术概念

Integration tools workflow

集成工具工作流

  1. List tools
    integrations:settings
    output.tools[]
    (
    methodName
    ,
    description
    ,
    dataSchema
    ).
  2. Call a tool
    integrations:trigger <uuid> <methodName> [-d '<json object>']
    .
  3. Use the result — Response shape is
    { "output": ... }
    ; contents vary by provider method.
Allow-listed tools today are scoped to Meta: Threads (
threads
), Instagram (Instagram Login / standalone) (
instagram-standalone
), and Instagram (Facebook Page / business) (
instagram-business
). Method names and payloads differ per channel — always read
integrations:settings
for the live
output.tools
list before calling
integrations:trigger
.
  1. 列出工具
    integrations:settings
    output.tools[]
    (包含
    methodName
    description
    dataSchema
    )。
  2. 调用工具
    integrations:trigger <uuid> <methodName> [-d '<json object>']
  3. 使用结果 — 响应格式为
    { "output": ... }
    ;内容因平台方法而异。
当前允许使用的工具仅限于Meta平台:Threads
threads
)、Instagram(Instagram登录/独立版)
instagram-standalone
)和Instagram(Facebook主页/商业版)
instagram-business
)。方法名称和负载因渠道而异——调用
integrations:trigger
前,请务必查看
integrations:settings
返回的实时
output.tools
列表。

Provider settings

平台设置

Openquok merges CLI
--settings
JSON into
providerSettingsByIntegrationId
for every
-i
UUID. For multi-segment posts, the CLI also synthesizes a per-integration
replies
array (message +
delaySeconds
) from repeated
-c
/
-d
.
Authoritative field names for a channel come from
integrations:settings
and the dashboard composer.
Openquok会将CLI的
--settings
JSON合并到每个
-i
指定的UUID对应的**
providerSettingsByIntegrationId
中。对于多段帖子,CLI还会从重复的
-c
/
-d
合成每个集成项对应的
replies
**数组(包含消息和
delaySeconds
)。
渠道的权威字段名称来自
integrations:settings
和控制台编辑器。

Threading and media

线程帖与媒体

Repeated
-c
builds the root
body
(first segment) plus threaded
replies
in provider settings. Media for those segments is supplied via repeated
-m
/ JSON
media
as documented in
agent/README.md
and covered by CLI tests under
agent/tests/e2e/
.
重复使用
-c
会构建根
body
(第一段)和线程化的
replies
(平台设置中)。这些内容段的媒体通过重复使用
-m
或JSON
media
提供,具体文档参见
agent/README.md
,CLI测试用例在
agent/tests/e2e/
目录下。

Dates

日期

  • Schedule / create:
    -s
    /
    --scheduledAt
    — ISO-8601 string (required for flag-based
    posts:create
    ).
  • List:
    --start
    /
    --end
    (aliases
    --startDate
    /
    --endDate
    ).
  • Defaults for
    posts:list
    : ±30 local calendar days from today, serialized to ISO timestamps.
  • 调度/创建:
    -s
    /
    --scheduledAt
    — ISO-8601格式字符串(基于标志的
    posts:create
    命令必填)。
  • 列表:
    --start
    /
    --end
    (别名
    --startDate
    /
    --endDate
    )。
  • posts:list
    默认范围:今天前后各30天的本地日历时间,序列化为ISO时间戳。

Upload response

上传响应

Typical shape (envelope may include
success
/
message
depending on route):
json
{
  "data": {
    "id": "media-id",
    "path": "storage/path/or/url",
    "filePath": "alternate-field-name"
  }
}
Always prefer
jq
that tolerates
path
vs
filePath
.
典型格式(根据路由不同,信封可能包含
success
/
message
):
json
{
  "data": {
    "id": "media-id",
    "path": "storage/path/or/url",
    "filePath": "备用字段名"
  }
}
请始终使用可兼容
path
filePath
jq
命令。

JSON mode vs flags

JSON模式 vs 标志

Flags — fast path for one body, optional uploads, optional
--settings
.
--json
/
-j
— supply a full
POST /public/posts
object (draft vs scheduled,
bodiesByIntegrationId
,
providerSettingsByIntegrationId
,
media
, tags, repeats, …).

标志 — 适用于单内容、可选上传、可选
--settings
的快速路径。
--json
/
-j
— 提供完整的
POST /public/posts
对象(草稿/已调度、
bodiesByIntegrationId
providerSettingsByIntegrationId
media
、标签、重复发布等)。

Platform-specific examples

平台特定示例

Always run
openquok integrations:settings <uuid>
for the exact JSON your workspace expects. The snippets below are illustrative.
请始终执行
openquok integrations:settings <uuid>
获取工作区所需的精确JSON格式。以下代码片段仅作示例参考。

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
https://
URL
and Meta’s servers fetch that URL for the Threads media container. Prefer JPEG or PNG; SVG is rejected in
threadsProvider
(
assertThreadsSupportedMedia
).
bash
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): 发布时后端会将每个存储对象密钥转换为公开
https://
URL
,Meta服务器会获取该URL作为Threads媒体容器。优先使用JPEG或PNG格式;
threadsProvider
SVG会被拒绝
assertThreadsSupportedMedia
)。
bash
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 — 独立版(
instagram-standalone

Use the integration UUID whose
identifier
is
instagram-standalone
(Instagram Login product).
bash
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>"
使用
identifier
instagram-standalone
的集成项UUID(对应Instagram登录产品)。
bash
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 — 商业版(
instagram-business

Use the integration UUID whose
identifier
is
instagram-business
(Page-linked professional account). Confirm
post_type
and other keys with
integrations:settings
for that row.
bash
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>"

使用
identifier
instagram-business
的集成项UUID(关联主页的专业账号)。请通过
integrations:settings
确认该渠道的
post_type
和其他字段。
bash
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),
openquok upload-from-url
mirrors them into the workspace so Rule 2 stays satisfied without a manual download step. For local renders,
openquok upload ./file
remains the simplest path.
External media CLIs can still fit upstream of
upload-from-url
when their output is a stable
https://
URL you are allowed to fetch.

若你在其他地方生成了图片或视频(托管URL),**
openquok upload-from-url
会将其镜像到工作区,无需手动下载即可满足规则2。对于本地渲染的资源,
openquok upload ./file
**仍是最简单的方式。
当外部媒体CLI的输出是稳定且可获取的
https://
URL时,仍可在
upload-from-url
之前使用它们。

Supporting resources

支持资源

In this repo (agent / CLI):
  • agent/README.md — Command reference, media flags,
    posts:status
    , e2e test naming.
Threads publish behavior (server implementation):
  • backend/integrations/providers/threadsProvider.ts
    — How media is resolved to public URLs (
    resolvePublicMediaUrl
    ), reachability checks, SVG blocked,
    createSingleMediaContent
    / carousel /
    threads_publish
    Graph calls, and error formatting. When debugging “unknown” Meta errors, confirm the public URL returns non-empty image bytes (not
    Content-Length: 0
    ).

本仓库中(agent/CLI):
  • agent/README.md — 命令参考、媒体标志、
    posts:status
    、端到端测试命名规则。
Threads发布行为(服务器实现):
  • backend/integrations/providers/threadsProvider.ts
    — 媒体如何解析为公开URL(
    resolvePublicMediaUrl
    )、可达性检查、SVG被阻止
    createSingleMediaContent
    /轮播/
    threads_publish
    Graph调用、错误格式化。调试“未知”Meta错误时,请确认公开媒体URL返回非空图片字节(而非
    Content-Length: 0
    )。

Common gotchas

常见陷阱

  1. Not authenticated — Run
    openquok auth:login --json
    (or export
    OPENQUOK_API_KEY
    ) before API commands. For OpenClaw/Telegram, prefer an API key; for OAuth, share only
    verification_uri_complete
    from stdout (never fabricate codes).
  2. OAuth "Invalid or expired code" — The user code is missing from the auth server (expired ~15m, typo, or agent invented the link). Re-run
    openquok auth:login --json
    while the CLI polls; use the prefilled
    verification_uri_complete
    URL. 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.
  3. Wrong integration UUID — Refresh with
    integrations:list
    ; IDs are per workspace.
  4. Settings mismatch — Check
    integrations:settings
    for required fields.
  5. Media skipped upload — Rule 2: every
    -m
    / JSON
    media[]
    entry needs
    id
    +
    path
    from
    upload
    /
    upload-from-url
    .
  6. Chat said “with an image” but no file arrived — Do not schedule with
    -m
    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.
  7. Upload succeeded but object is empty — If publish fails with vague Threads / Graph errors, curl the logged public media URL:
    Content-Length: 0
    means storage has no bytes (bad upload source or agent wrote an empty file). Fix the asset and re-upload.
  8. Shell JSON quoting — Prefer single quotes around JSON literals:
    --settings '{"post_type":"post"}'
    .
  9. Missing schedule — Flag-based
    posts:create
    requires
    -s
    unless
    --json
    supplies
    scheduledAt
    .
  10. Unknown tool
    integrations:trigger
    only runs methods listed under
    output.tools
    .
  11. Character limits — Read
    output.maxLength
    from
    integrations:settings
    .
  12. Provider gaps
    output.tools
    may be empty for a Meta channel until a method is allow-listed; do not assume a tool exists without checking
    integrations:settings
    .
  13. Thread delay units
    -d
    on
    posts:create
    is milliseconds, not minutes.
  14. Analytics window — Only
    7
    ,
    30
    , or
    90
    days.
  15. Env vs disk credentials — Stored login wins over
    OPENQUOK_API_KEY
    until
    auth:logout
    .
  16. Stale global CLI — If
    auth:login
    fails with verification_uri … expected cli-auth.openquok.com, upgrade:
    npm install -g @openquok/auto-cli@latest
    (need ≥ 0.0.6 for
    www.openquok.com
    verify URLs).
    npx skills add
    and gateway restarts do not change
    openquok --version
    ; reinstall the npm package on the agent host.

  1. 未认证 — 在执行API命令前,请运行
    openquok auth:login --json
    (或导出
    OPENQUOK_API_KEY
    )。对于OpenClaw/Telegram,优先使用API密钥;对于OAuth,仅分享标准输出中的
    verification_uri_complete
    (绝不要编造代码)。
  2. OAuth“无效或过期代码” — 用户代码未在认证服务器上找到(过期约15分钟、输入错误或代理生成了错误链接)。在CLI轮询时重新运行
    openquok auth:login --json
    ;使用预填充的
    verification_uri_complete
    URL。仅在openquok.com登录无法验证设备代码——只有步骤1成功且浏览器重定向到openquok.com后,验证才会完成。
  3. 错误的集成项UUID — 使用
    integrations:list
    刷新;ID是每个工作区独有的。
  4. 设置不匹配 — 查看
    integrations:settings
    确认必填字段。
  5. 媒体未上传 — 规则2:每个
    -m
    /JSON
    media[]
    条目都需要来自
    upload
    /
    upload-from-url
    id
    +
    path
  6. 聊天中提到“带图片”但未提供文件 — 在获取到文件或直接图片URL前,不要使用
    -m
    调度帖子(参见核心工作流中的准备步骤)。空或占位符上传会导致Threads(及其他平台)发布失败。
  7. 上传成功但对象为空 — 若发布时出现模糊的Threads/Graph错误,请curl日志中的公开媒体URL:**
    Content-Length: 0
    **意味着存储中没有字节(上传源错误或代理写入了空文件)。修复资源后重新上传。
  8. Shell JSON引用 — 优先使用单引号包裹JSON字面量:
    --settings '{"post_type":"post"}'
  9. 缺少调度时间 — 基于标志的
    posts:create
    命令需要
    -s
    ,除非
    --json
    提供了
    scheduledAt
  10. 未知工具
    integrations:trigger
    仅能运行
    output.tools
    中列出的方法。
  11. 字符限制 — 从
    integrations:settings
    output.maxLength
    获取限制。
  12. 平台功能缺口 — Meta渠道的
    output.tools
    可能为空,直到添加了允许调用的方法;不要在未检查
    integrations:settings
    的情况下假设工具存在。
  13. 线程帖延迟单位
    posts:create
    中的
    -d
    单位是毫秒,而非分钟。
  14. 分析窗口 — 仅支持7、30或90天。
  15. 环境变量 vs 磁盘凭据 — 存储的登录信息优先级高于
    OPENQUOK_API_KEY
    ,直到执行
    auth:logout
  16. 全局CLI版本过时 — 若
    auth:login
    失败并提示verification_uri … expected cli-auth.openquok.com,请升级:
    npm install -g @openquok/auto-cli@latest
    www.openquok.com
    验证URL需要≥0.0.6版本)。
    npx skills add
    和网关重启不会改变
    openquok --version
    ;请在代理主机上重新安装npm包。

Quick reference

快速参考

bash
undefined
bash
undefined

Authenticate 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
undefined
openquok --help openquok posts:create --help
undefined