zernio-cli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseZernio CLI
Zernio CLI
Overview
概述
Zernio CLI schedules and manages social media posts across 14 platforms from the terminal. Run via - no global install needed.
npx @zernio/cliZernio CLI 可在终端中实现14个平台的社交媒体内容定时发布与管理。通过 运行,无需全局安装。
npx @zernio/cliSafety Guidelines
安全指南
CRITICAL: Always ask user permission before posting.
- Prepare the command - show user exactly what will be posted
- Get explicit approval - "Should I run this command to post?"
- Only then execute - after user confirms
Never post without asking first, even if the user seems to request it directly.
Default to draft mode - use flag unless user explicitly wants to publish immediately.
--draft重要提示:发布前必须先征得用户同意
- 准备命令 - 向用户准确展示即将发布的内容
- 获得明确批准 - 询问「我是否可以运行此命令进行发布?」
- 确认后再执行 - 仅在用户确认后操作
即使看起来是用户直接要求发布,也绝对不能未经询问就直接发布
默认使用草稿模式 - 除非用户明确要求立即发布,否则都要带上参数。
--draftWhen to Use
适用场景
- User wants to post to social media platforms
- User mentions scheduling posts for later
- User wants to post to multiple platforms at once
- User has social media accounts to manage
When NOT to use:
- Direct API integration (use Zernio API skill instead)
- One-off manual posting (CLI is for automation/scheduling)
- 用户想要在社交媒体平台发布内容
- 用户提到要定时发布内容
- 用户想要同时在多个平台发布内容
- 用户需要管理多个社交媒体账号
不适用场景:
- 直接API集成(请使用Zernio API skill代替)
- 单次手动发布(CLI适用于自动化/定时发布场景)
Quick Reference
快速参考
| Task | Command |
|---|---|
| Check auth | |
| Login (browser) | |
| List accounts | |
| Create draft | |
| Publish post | |
| Schedule post | Add |
| Upload media | |
| List posts | |
| 任务 | 命令 |
|---|---|
| 检查授权状态 | |
| 登录(浏览器方式) | |
| 列出账号列表 | |
| 创建草稿 | |
| 发布内容 | |
| 定时发布内容 | 添加 |
| 上传媒体资源 | |
| 列出内容列表 | |
Authentication
授权
ALWAYS check auth first:
bash
npx @zernio/cli auth:checkIf not authenticated:
bash
undefined务必首先检查授权状态:
bash
npx @zernio/cli auth:check如果未授权:
bash
undefinedBrowser login (recommended - creates API key automatically)
浏览器登录(推荐 - 自动生成API密钥)
npx @zernio/cli auth:login
npx @zernio/cli auth:login
Or manual key (get from zernio.com/dashboard/api-keys)
或手动设置密钥(从 zernio.com/dashboard/api-keys 获取)
npx @zernio/cli auth:set --key "sk_your-api-key"
Config stored in `~/.zernio/config.json`npx @zernio/cli auth:set --key "sk_your-api-key"
配置文件存储在 `~/.zernio/config.json`Common Workflows
常用工作流
Simple Post
简单发布
bash
undefinedbash
undefined1. Get account IDs
1. 获取账号ID
npx @zernio/cli accounts:list
npx @zernio/cli accounts:list
2. Create draft first (ALWAYS start with draft)
2. 首先创建草稿(请始终先创建草稿)
npx @zernio/cli posts:create
--text "Your message here"
--accounts account-id-1,account-id-2
--draft
--text "Your message here"
--accounts account-id-1,account-id-2
--draft
npx @zernio/cli posts:create \
--text "Your message here" \
--accounts account-id-1,account-id-2 \
--draft
3. Show command to user, ASK permission, then publish
3. 向用户展示命令,询问许可后再发布
Only run after explicit user approval:
仅在用户明确批准后运行:
npx @zernio/cli posts:create
--text "Your message here"
--accounts account-id-1,account-id-2
--text "Your message here"
--accounts account-id-1,account-id-2
undefinednpx @zernio/cli posts:create \
--text "Your message here" \
--accounts account-id-1,account-id-2
undefinedScheduled Post
定时发布
bash
undefinedbash
undefinedScheduled posts are safer (user can cancel before publish time)
定时发布更安全(用户可在发布时间前取消)
Still ASK permission before running this command
运行该命令前仍需询问用户许可
npx @zernio/cli posts:create
--text "Your message"
--accounts account-id
--scheduledAt "2025-06-01T09:00:00Z"
--text "Your message"
--accounts account-id
--scheduledAt "2025-06-01T09:00:00Z"
undefinednpx @zernio/cli posts:create \
--text "Your message" \
--accounts account-id \
--scheduledAt "2025-06-01T09:00:00Z"
undefinedPost with Media
带媒体资源的发布
bash
undefinedbash
undefined1. Upload media FIRST
1. 首先上传媒体资源
npx @zernio/cli media:upload ~/path/to/image.png
npx @zernio/cli media:upload ~/path/to/image.png
Returns: {"url": "https://..."}
返回: {"url": "https://..."}
2. Create draft with media URL
2. 使用媒体URL创建草稿
npx @zernio/cli posts:create
--text "Your message"
--accounts account-id
--media "https://..."
--draft
--text "Your message"
--accounts account-id
--media "https://..."
--draft
npx @zernio/cli posts:create \
--text "Your message" \
--accounts account-id \
--media "https://..." \
--draft
3. ASK permission, show user the draft, then publish
3. 询问许可,向用户展示草稿后再发布
Only run after explicit approval (remove --draft flag):
仅在明确批准后运行(移除--draft参数):
npx @zernio/cli posts:create
--text "Your message"
--accounts account-id
--media "https://..."
--text "Your message"
--accounts account-id
--media "https://..."
**Multiple images:** Use comma-separated URLs: `--media "url1,url2,url3"`npx @zernio/cli posts:create \
--text "Your message" \
--accounts account-id \
--media "https://..."
**多张图片:** 使用逗号分隔URL:`--media "url1,url2,url3"`Supported Platforms
支持的平台
Instagram, TikTok, X (Twitter), LinkedIn, Facebook, Threads, YouTube, Bluesky, Pinterest, Reddit, Snapchat, Telegram, Google Business Profile
Platform requirements:
- Text-only: All platforms
- Media required: Instagram, TikTok (images/video)
- Video required: YouTube, TikTok
Instagram, TikTok, X (Twitter), LinkedIn, Facebook, Threads, YouTube, Bluesky, Pinterest, Reddit, Snapchat, Telegram, Google Business Profile
平台要求:
- 仅文本:所有平台均支持
- 需要媒体资源:Instagram、TikTok(图片/视频)
- 需要视频:YouTube、TikTok
Common Mistakes
常见问题
| Mistake | Fix |
|---|---|
Command | Use |
| "Account not found" | Run |
| Media not showing | Upload media first, then use returned URL |
| Post fails on some platforms | Check platform requirements (some need media) |
| Date format wrong | Use ISO 8601: |
| Use |
| Posted without asking | STOP. Always ask permission before posting |
| 错误 | 解决方法 |
|---|---|
找不到 | 使用 |
| 「账号未找到」 | 运行 |
| 媒体资源不显示 | 先上传媒体资源,再使用返回的URL |
| 部分平台发布失败 | 检查平台要求(部分平台需要媒体资源) |
| 日期格式错误 | 使用ISO 8601格式: |
| 使用 |
| 未询问就直接发布 | 立刻停止操作。发布前必须先征得用户许可 |