jackwener / jackwener/OpenCLI

feat: jike create 支持 --images 上传图片

Open
#2,311 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
29.3k
Forks
2.9k
Avg merge
15h 36m
Merged PRs (30d)
70

Description

## 需求
opencli jike create 目前只支持纯文本(text 参数),无法在即刻动态里带图。推文同步场景下图片只能作为文本链接附上,体验差。

## 建议
给 jike create 加 --images 参数(逗号分隔图片路径),发布动态时先上传图片再发文本。

## 实测踩坑(供参考)
- CDP DOM.setFileInputFiles 对即刻发帖框的隐藏 file input 会报 `Not allowed`
- **base64 DataTransfer 注入可行**:点击发帖框图片按钮 → 找 input[type=file][accept*=image] → `input.files = dt.files` + dispatch change → 即刻 React 能识别(实测 imgs 元素出现,发布成功)

## 期望
官方适配器原生支持图片,避免用户本地打补丁(升级会被覆盖)。

可参考 xiaohongshu/publish.js 已有的 --images 实现。

Contributor guide

Open the contributing guide

Research direction

Start at the jike create adapter and compare its publishing flow with xiaohongshu/publish.js, which already implements --images. Trace how comma-separated image paths are parsed, uploaded through the image input, and included in the post. Done means opencli jike create accepts --images and publishes the text with the selected images.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, playwright
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.