
yangyongzhen/dsh-article-publish
30Last commit Aug 14, 2026
dsh-article-publish DSH plugin
dsh-article-publish is a DSH plugin that provides two tools: publish_article and fetch_news. The publish_article tool allows you to publish or update articles on CSDN, Juejin, and Cnblogs using their APIs directly. The fetch_news tool retrieves a random tech news article from Cnblogs RSS to use as writing material. All publishing logic is built-in, requiring no MCP server or extra processes.
How to install the dsh-article-publish DSH plugin
dsh plugin --profile <web|tui|headless> add file:/path/to/dsh-article-publishThis source command needs manual review. Copying does not run it.
dsh-article-publish DSH plugin data source
dsh-article-publish DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-article-publish DSH plugin can do
- Publish new articles to CSDN, Juejin, and Cnblogs
- Update existing articles on CSDN (by providing articleId)
- Fetch a random tech news article from Cnblogs RSS as source material
- Auto-upload external images to CSDN image hosting (csdnimg.cn) with fallback to wsrv.nl proxy
- Support configuration via profile config (cordis.patch.yml) or environment variables
- No external services or MCP servers required
Where the dsh-article-publish DSH plugin fits
- Let an agent write a complete article and publish it to a blog platform in one session
- Fetch the latest tech news as inspiration and then write a related article
- Update an existing CSDN article with new content without manual editing
- Automate cross-posting the same article to multiple platforms (CSDN, Juejin, Cnblogs)
- Integrate into a DSH-based workflow that generates content and publishes it
Who the dsh-article-publish DSH plugin is for
- Content creators who use DeepSeek Harness to write articles
- Developers who want to automate blog publishing from an AI agent
dsh-article-publish DSH plugin limitations
- Only supports CSDN, Juejin, and Cnblogs; no other platforms
- Requires the user to manually obtain login cookies/tokens from each platform's browser developer tools
- CSDN tags are fixed to '后端' and Juejin categories/tags are fixed to '后端' (not configurable yet)
- The plugin is in early development; some features like configurable tags may be added later
- Cookie-based authentication may be less secure than OAuth; users must protect their cookies
dsh-article-publish DSH plugin: from the repository README
Quoted from the yangyongzhen/dsh-article-publish README, the upstream source of the dsh-article-publish DSH plugin. Copyright remains with the original authors.
DeepSeek Harness 文章发布插件:agent 在会话里写完文章,直接调用工具发布到 **CSDN / 掘金 / 博客园**,还能拉取科技资讯当素材。**无外部依赖**——发布逻辑直接实现(API 参考 [mcp-server-article](https://gitcode.com/qq8864/article-publish-mcp)),不需要 MCP server、不需要额外进程。 ## 功能 | dsh 工具 | 说明 | |---|---| | `publish_article` | 发布/更新文章到 CSDN / 掘金 / 博客园,返回文章链接 | | `fetch_news` | 获取一条科技资讯(博客园 RSS 随机一篇),当素材 | `publish_article` 参数:`platform`(csdn|juejin|cnblog)、`title`、`content`(Markdown)、可选 `description`(csdn/juejin,为空自动截取前 100 字)、可选 `articleId`(csdn,传入则原地更新)。 平台实现要点(已内置,无需额外服务): - **CSDN**:阿里云网关 HMAC-SHA256 签名请求(x-ca-* headers),外链图片自动转存到 CSDN 图床(csdnimg.cn),转存失败的 gitcode 图片回退 wsrv.nl 代理 - **掘金**:创建草稿 → 发布(两步) - **博客园**:cookie + x-xsrf-token ## 安装 ```sh dsh plugin --profile <web|tui|headless> add file:/path/to/dsh-article-publish # 或 dsh plugin --profile <web|tui|headless> add https://gitcode.com/qq8864/dsh-article-publish.git ``` ## 配置(登录凭据) 发布需要各平台登录 Cookie。三种配置方式,优先级从高到低: ### 1. profile 配置(`cordis.patch.yml`) ```yaml - id: article-publish config: enabled: true csdnCookie: '' # CSDN 登录 Cookie juejinCookie: '' # 掘金登录 Cookie cnblogCookie: '' # 博客园 Cookie cnblogToken: '' # 博客园 x-xsrf-token cn
Read the full READMEThe repository declares no license. Check with the authors before using it.
dsh-article-publish DSH plugin questions
How do I get the cookies for each platform?
Log in to the platform in your browser, open Developer Tools (F12), go to the Application tab, find Cookies under the domain, and copy the entire Cookie string. For example, for CSDN, copy the cookie from csdn.net domain. Alternatively, you can use the mcp-server-article get-cookies tool (Rust) to export cookies from Chrome's debug port.
Can I publish to platforms other than CSDN, Juejin, and Cnblogs?
No, currently only these three platforms are supported. The plugin implements the specific API logic for each of them. Adding more platforms would require custom code.
How do I update an existing article on CSDN?
Use the publish_article tool with platform='csdn' and provide the articleId parameter (the ID of the existing article). The content will be updated in place. For Juejin and Cnblogs, updating is not supported; you would need to publish a new article.
Do I need to install any external services like MCP server?
No. The plugin has no external dependencies. All publishing logic is built directly into the plugin using HTTP requests. You only need to install the plugin via dsh plugin add and configure your cookies.
The plugin complains about missing peer dependency @deepseek-ai/dsh-tools, is that a problem?
No, that warning is safe to ignore. @deepseek-ai/dsh-tools is declared as a peerDependency, meaning it will be resolved from the DSH runtime. The plugin intentionally avoids bundling it to prevent symbol mismatch. As long as you have DSH installed, the tools will be available.