pp-midjourney

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- GENERATED FILE — DO NOT EDIT. This file is a verbatim mirror of library/ai/midjourney/SKILL.md, regenerated post-merge by tools/generate-skills/. Hand-edits here are silently overwritten on the next regen. Edit the library/ source instead. See the repository agent guide, section "Generated artifacts: registry.json, cli-skills/". -->
<!-- 生成文件——请勿编辑。 此文件是library/ai/midjourney/SKILL.md的精确镜像, 由tools/generate-skills/在合并后重新生成。在此处手动编辑的内容会在下次重新生成时被静默覆盖。请改为编辑library/源文件。 请参阅仓库Agent指南中的“生成工件:registry.json, cli-skills/”章节。 -->

Midjourney — Printing Press CLI

Midjourney — Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
midjourney-pp-cli
binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
  1. Install via the Printing Press installer. It defaults binaries to
    $HOME/.local/bin
    on macOS/Linux and
    %LOCALAPPDATA%\Programs\PrintingPress\bin
    on Windows:
    bash
    npx -y @mvanhorn/printing-press-library install midjourney --cli-only
  2. Verify:
    midjourney-pp-cli --version
  3. Ensure the reported install directory is on
    $PATH
    for the agent/runtime that will invoke this skill.
If the
npx
install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer):
bash
go install github.com/mvanhorn/printing-press-library/library/ai/midjourney/cmd/midjourney-pp-cli@latest
If
--version
reports "command not found" after install, the runtime cannot see the binary directory on
$PATH
. Do not proceed with skill commands until verification succeeds.
本技能用于驱动
midjourney-pp-cli
二进制文件。在调用本技能的任何命令之前,您必须确认CLI已安装。 如果未安装,请先执行以下步骤:
  1. 通过Printing Press安装程序进行安装。在macOS/Linux系统中,二进制文件默认安装到
    $HOME/.local/bin
    ;在Windows系统中,默认安装到
    %LOCALAPPDATA%\\Programs\\PrintingPress\\bin
    bash
    npx -y @mvanhorn/printing-press-library install midjourney --cli-only
  2. 验证安装:
    midjourney-pp-cli --version
  3. 确保报告的安装目录在Agent/运行时的
    $PATH
    环境变量中。
如果
npx
安装失败(无Node.js、离线等情况),可以回退到直接通过Go安装(需要Go 1.26.6或更高版本):
bash
go install github.com/mvanhorn/printing-press-library/library/ai/midjourney/cmd/midjourney-pp-cli@latest
如果安装后执行
--version
提示“command not found”,说明运行时无法在
$PATH
中找到二进制文件目录。请在验证成功前不要执行技能命令。

When Not to Use This CLI

何时不应使用此CLI

Most generated endpoint commands are read-only inspection commands. Do not use mutating commands unless the user explicitly asks to submit Midjourney work. In particular,
imagine
and
rerun
create remote Midjourney jobs, and
download
writes a local file.
大多数生成的端点命令都是只读查看命令。除非用户明确要求提交Midjourney任务,否则请勿使用修改类命令。特别注意,
imagine
rerun
会创建远程Midjourney任务,
download
会写入本地文件。

HTTP Transport

HTTP传输

This CLI uses Chrome-compatible HTTP transport for browser-facing endpoints. It does not require a resident browser process for normal API calls.
此CLI使用兼容Chrome的HTTP传输来处理面向浏览器的端点。正常API调用不需要常驻浏览器进程。

Discovery Signals

发现信号

This CLI was generated with browser-observed traffic context.
  • Capture coverage: 62 API entries from 62 total network entries
  • Protocols: rest_json (75% confidence)
  • Generation hints: browser_http_transport, requires_protected_client
  • Candidate command ideas: list_contests_ranking_count — Derived from observed GET /api/contests-ranking-count traffic.; list_editor_sessions_sync — Derived from observed GET /api/editor-sessions-sync traffic.; list_explore — Derived from observed GET /api/explore traffic.; list_explore_styles_likes — Derived from observed GET /api/explore-styles-likes traffic.; list_folders — Derived from observed GET /api/folders traffic.; list_following_for_user — Derived from observed GET /api/following-for-user traffic.; list_get_user_country — Derived from observed GET /api/get-user-country traffic.; list_imagine — Derived from observed GET /api/imagine traffic.
此CLI是基于浏览器观测到的流量上下文生成的。
  • 捕获覆盖范围:62个网络条目里的62个API条目
  • 协议:rest_json(75%置信度)
  • 生成提示:browser_http_transport, requires_protected_client
  • 候选命令思路:list_contests_ranking_count — 基于观测到的GET /api/contests-ranking-count流量推导;list_editor_sessions_sync — 基于观测到的GET /api/editor-sessions-sync流量推导;list_explore — 基于观测到的GET /api/explore流量推导;list_explore_styles_likes — 基于观测到的GET /api/explore-styles-likes流量推导;list_folders — 基于观测到的GET /api/folders流量推导;list_following_for_user — 基于观测到的GET /api/following-for-user流量推导;list_get_user_country — 基于观测到的GET /api/get-user-country流量推导;list_imagine — 基于观测到的GET /api/imagine流量推导。

Command Reference

命令参考

explore — Browse Midjourney explore feeds
  • midjourney-pp-cli explore list
    — Fetch an explore feed
  • midjourney-pp-cli explore style-likes
    — Fetch style-like metadata for explore cards
folders — Inspect Midjourney organize folders
  • midjourney-pp-cli folders
    — List folders in the authenticated account
generations — Inspect generated Midjourney jobs and image history
  • midjourney-pp-cli generations list
    — List recent jobs/images for the authenticated Midjourney user
  • midjourney-pp-cli generations updates
    — Poll recent job updates for the authenticated user
moodboards — Inspect Midjourney moodboards
  • midjourney-pp-cli moodboards
    — List moodboards for the authenticated account
profiles — Inspect personalization/profile metadata
  • midjourney-pp-cli profiles following
    — List following metadata for the logged-in user
  • midjourney-pp-cli profiles personalized
    — List personalized profile metadata
queue — Inspect the current Midjourney generation queue
  • midjourney-pp-cli queue
    — Show queued/running Midjourney work for the logged-in account
rankings — Inspect ranking and rating surfaces
  • midjourney-pp-cli rankings contests-count
    — Fetch contest ranking counts
  • midjourney-pp-cli rankings model-ratings
    — Fetch model rating tasks visible to the account
storage — Inspect Midjourney account storage metadata
  • midjourney-pp-cli storage
    — List storage metadata exposed by the web app
explore — 浏览Midjourney探索信息流
  • midjourney-pp-cli explore list
    — 获取探索信息流
  • midjourney-pp-cli explore style-likes
    — 获取探索卡片的风格偏好元数据
folders — 查看Midjourney整理文件夹
  • midjourney-pp-cli folders
    — 列出已认证账户中的文件夹
generations — 查看生成的Midjourney任务和图像历史
  • midjourney-pp-cli generations list
    — 列出已认证Midjourney用户的近期任务/图像
  • midjourney-pp-cli generations updates
    — 轮询已认证用户的近期任务更新
moodboards — 查看Midjourney情绪板
  • midjourney-pp-cli moodboards
    — 列出已认证账户的情绪板
profiles — 查看个性化/资料元数据
  • midjourney-pp-cli profiles following
    — 列出登录用户的关注元数据
  • midjourney-pp-cli profiles personalized
    — 列出个性化资料元数据
queue — 查看当前Midjourney生成队列
  • midjourney-pp-cli queue
    — 显示登录账户中排队/运行中的Midjourney任务
rankings — 查看排名和评分界面
  • midjourney-pp-cli rankings contests-count
    — 获取竞赛排名统计
  • midjourney-pp-cli rankings model-ratings
    — 获取账户可见的模型评分任务
storage — 查看Midjourney账户存储元数据
  • midjourney-pp-cli storage
    — 列出Web应用暴露的存储元数据

Finding the right command

找到合适的命令

When you know what you want to do but not which command does it, ask the CLI directly:
bash
midjourney-pp-cli which "<capability in your own words>"
which
resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code
0
means at least one match; exit code
2
means no confident match — fall back to
--help
or use a narrower query.
当您知道要执行的操作但不知道对应命令时,可以直接询问CLI:
bash
midjourney-pp-cli which "<用您自己的话描述功能>"
which
会将自然语言功能查询解析为该CLI精选功能索引中最匹配的命令。退出码
0
表示至少有一个匹配项;退出码
2
表示没有可信匹配项——请回退到
--help
或使用更精确的查询。

Auth Setup

认证设置

Run
midjourney-pp-cli auth setup
to print the URL and steps for getting a key (add
--launch
to open the URL). Then set:
bash
export MIDJOURNEY_COOKIE_HEADER="<your-key>"
Or persist it in ``.
Run
midjourney-pp-cli doctor
to verify setup.
运行
midjourney-pp-cli auth setup
以打印获取密钥的URL和步骤(添加
--launch
可打开该URL)。然后设置:
bash
export MIDJOURNEY_COOKIE_HEADER="<您的密钥>"
或者将其持久化到配置文件中。
运行
midjourney-pp-cli doctor
以验证设置是否正确。

Agent Mode

Agent模式

Add
--agent
to any command. Expands to:
--json --compact --no-input --no-color --yes
.
  • Pipeable — JSON on stdout, errors on stderr
  • Filterable
    --select
    keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
    bash
    midjourney-pp-cli explore list --agent --select id,name,status
  • Previewable
    --dry-run
    shows the request without sending
  • Offline-friendly — sync/search commands can use the local SQLite store when available
  • Non-interactive — never prompts, every input is a flag
  • Read-only — do not use this CLI for create, update, delete, publish, comment, upvote, invite, order, send, or other mutating requests
在任何命令后添加
--agent
。这会等效于:
--json --compact --no-input --no-color --yes
  • 可管道传输 — 标准输出为JSON,错误信息输出到标准错误
  • 可过滤
    --select
    保留字段子集。点路径可深入嵌套结构;数组会遍历每个元素。对于冗长API,这是缩小上下文的关键:
    bash
    midjourney-pp-cli explore list --agent --select id,name,status
  • 可预览
    --dry-run
    显示请求但不发送
  • 离线友好 — 同步/搜索命令在可用时可使用本地SQLite存储
  • 非交互式 — 从不提示,所有输入均为标志参数
  • 只读 — 请勿使用此CLI执行创建、更新、删除、发布、评论、点赞、邀请、下单、发送或其他修改类请求

Response envelope

响应信封

Commands that read from the local store or the API wrap output in a provenance envelope:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
Parse
.results
for data and
.meta.source
to know whether it's live or local. A human-readable
N results (live)
summary is printed to stderr only when stdout is a terminal AND no machine-format flag (
--json
,
--csv
,
--compact
,
--quiet
,
--plain
,
--select
) is set — piped/agent consumers and explicit-format runs get pure JSON on stdout.
从本地存储或API读取数据的命令会将输出包装在来源信封中:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <数据>
}
解析
.results
获取数据,
.meta.source
可判断数据是实时的还是本地的。只有当标准输出是终端且未设置任何机器格式标志(
--json
,
--csv
,
--compact
,
--quiet
,
--plain
,
--select
)时,才会将人类可读的
N results (live)
摘要打印到标准错误——管道/Agent消费者和显式格式运行会在标准输出获得纯JSON。

Agent Feedback

Agent反馈

When you (or the agent) notice something off about this CLI, record it:
midjourney-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
midjourney-pp-cli feedback --stdin < notes.txt
midjourney-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.midjourney-pp-cli/feedback.jsonl
. They are never POSTed unless
MIDJOURNEY_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
MIDJOURNEY_FEEDBACK_AUTO_SEND=true
. Default behavior is local-only.
Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
当您(或Agent)发现此CLI存在问题时,可以记录反馈:
midjourney-pp-cli feedback "--since标志是包含性的,但文档说是排他性的"
midjourney-pp-cli feedback --stdin < notes.txt
midjourney-pp-cli feedback list --json --limit 10
反馈条目会本地存储在
~/.midjourney-pp-cli/feedback.jsonl
中。除非设置了
MIDJOURNEY_FEEDBACK_ENDPOINT
且传递了
--send
或设置
MIDJOURNEY_FEEDBACK_AUTO_SEND=true
,否则反馈永远不会被POST发送。默认行为是仅本地存储。
请写下让您感到意外的内容,而不是提交错误报告。简短、具体、单行描述:这样的内容才更有价值。

Output Delivery

输出交付

Every command accepts
--deliver <sink>
. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
SinkEffect
stdout
Default; write to stdout only
file:<path>
Atomically write output to
<path>
(tmp + rename)
webhook:<url>
POST the output body to the URL (
application/json
or
application/x-ndjson
when
--compact
)
Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
每个命令都支持
--deliver <sink>
选项。输出会除了(或代替)标准输出外,发送到指定的sink,因此Agent无需手动管道即可路由命令结果。支持三种sink:
Sink效果
stdout
默认值;仅写入标准输出
file:<path>
原子性地将输出写入
<path>
(先写入临时文件再重命名)
webhook:<url>
将输出体POST到指定URL(使用
--compact
时为
application/json
application/x-ndjson
格式)
未知的协议会被拒绝,并返回结构化错误,列出支持的类型。Webhook失败会返回非零退出码,并在标准错误中记录URL和HTTP状态。

Named Profiles

命名配置文件

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
midjourney-pp-cli profile save briefing --json
midjourney-pp-cli --profile briefing explore list
midjourney-pp-cli profile list --json
midjourney-pp-cli profile show briefing
midjourney-pp-cli profile delete briefing --yes
Explicit flags always win over profile values; profile values win over defaults.
agent-context
lists all available profiles under
available_profiles
so introspecting agents discover them at runtime.
配置文件是一组保存的标志值,可在多次调用中复用。当定时Agent每次运行都使用相同配置调用同一命令时,可使用此功能——即HeyGen的“Beacon”模式。
midjourney-pp-cli profile save briefing --json
midjourney-pp-cli --profile briefing explore list
midjourney-pp-cli profile list --json
midjourney-pp-cli profile show briefing
midjourney-pp-cli profile delete briefing --yes
显式标志始终优先于配置文件值;配置文件值优先于默认值。
agent-context
会在
available_profiles
下列出所有可用配置文件,因此自省Agent可在运行时发现它们。

Exit Codes

退出码

CodeMeaning
0Success
2Usage error (wrong arguments)
3Resource not found
4Authentication required
5API error (upstream issue)
7Rate limited (wait and retry)
10Config error
代码含义
0成功
2使用错误(参数错误)
3资源未找到
4需要认证
5API错误(上游问题)
7速率限制(请等待后重试)
10配置错误

Argument Parsing

参数解析

Parse
$ARGUMENTS
:
  1. Empty,
    help
    , or
    --help
    → show
    midjourney-pp-cli --help
    output
  2. Starts with
    install
    → ends with
    mcp
    → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with
    --agent
    )
解析
$ARGUMENTS
的规则:
  1. 为空、
    help
    --help
    → 显示
    midjourney-pp-cli --help
    输出
  2. install
    开头
    → 若结尾为
    mcp
    → MCP安装;否则 → 参见上方的前提条件部分
  3. 其他情况 → 直接使用(带
    --agent
    执行CLI命令)

MCP Server Installation

MCP服务器安装

  1. Install the MCP server:
    bash
    go install github.com/mvanhorn/printing-press-library/library/ai/midjourney/cmd/midjourney-pp-mcp@latest
  2. Register with Claude Code:
    bash
    claude mcp add midjourney-pp-mcp -- midjourney-pp-mcp
  3. Verify:
    claude mcp list
  1. 安装MCP服务器:
    bash
    go install github.com/mvanhorn/printing-press-library/library/ai/midjourney/cmd/midjourney-pp-mcp@latest
  2. 在Claude Code中注册:
    bash
    claude mcp add midjourney-pp-mcp -- midjourney-pp-mcp
  3. 验证:
    claude mcp list

Direct Use

直接使用

  1. Check if installed:
    which midjourney-pp-cli
    If not found, offer to install (see Prerequisites at the top of this skill).
  2. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  3. Execute with the
    --agent
    flag:
    bash
    midjourney-pp-cli <command> [subcommand] [args] --agent
  4. If ambiguous, drill into subcommand help:
    midjourney-pp-cli <command> --help
    .
  1. 检查是否已安装:
    which midjourney-pp-cli
    如果未找到,提供安装选项(参见顶部前提条件部分)。
  2. 将用户查询与上方“独特功能”和“命令参考”中最匹配的命令对应。
  3. --agent
    标志执行:
    bash
    midjourney-pp-cli <command> [subcommand] [args] --agent
  4. 如果存在歧义,查看子命令帮助:
    midjourney-pp-cli <command> --help
    。",