omm-push
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseomm-push — Cloud Push Workflow
omm-push — 云端推送工作流
Purpose
用途
Automate the full workflow of pushing .omm/ architecture docs to the oh-my-mermaid cloud service.
自动完成将.omm/架构文档推送至oh-my-mermaid云端服务的完整工作流。
Prerequisites
前提条件
Ensure the CLI is available:
ommbash
command -v omm || npm install -g oh-my-mermaidIf the install command fails (permission denied), tell the user:
"Please run in your terminal, then try again."
npm install -g oh-my-mermaid确保 CLI工具可用:
ommbash
command -v omm || npm install -g oh-my-mermaid如果安装命令失败(权限不足),请告知用户:
"请在终端中运行,然后重试。"
npm install -g oh-my-mermaidWorkflow
工作流
Step 1: Check Login Status
步骤1:检查登录状态
Run via Bash. If it errors with "not logged in":
omm share- Tell the user: "You need to log in first."
- Run — this opens a browser for GitHub OAuth
omm login - Wait for the user to complete login
通过Bash运行。若报错提示“not logged in”:
omm share- 告知用户:“您需要先登录。”
- 运行——此操作会打开浏览器进行GitHub OAuth授权
omm login - 等待用户完成登录
Step 2: Check Project Link
步骤2:检查项目关联状态
Run via Bash. If it errors with "no project slug":
omm share- Run — this sets the cloud project slug from the directory name
omm link - Confirm: "Linked to {slug}"
通过Bash运行。若报错提示“no project slug”:
omm share- 运行——此操作会根据目录名称设置云端项目slug
omm link - 确认提示:“已关联至{slug}”
Step 3: Push
步骤3:推送
Run via Bash.
omm pushHandle errors:
- 401 Unauthorized: "Login expired. Run again."
omm login - 403 Free plan limit: "Free plan allows 1 project. Upgrade at https://ohmymermaid.com/pricing"
- Network error: "Cannot reach server. Check your connection."
通过Bash运行。
omm push处理错误:
- 401 未授权:“登录已过期,请重新运行。”
omm login - 403 免费版限制:“免费版仅允许1个项目。请访问https://ohmymermaid.com/pricing升级。”
- 网络错误:“无法连接服务器,请检查您的网络连接。”
Step 4: Report
步骤4:结果报告
On success, output:
- Number of files uploaded
- View URL:
https://ohmymermaid.com/p/{slug} - Share URL (if Pro): "Run to get the shareable link"
omm share
成功时输出:
- 已上传文件数量
- 查看链接:
https://ohmymermaid.com/p/{slug} - 分享链接(专业版用户):“运行获取可分享链接”
omm share
Rules
规则
- Always check login before pushing
- Always check link before pushing
- Do NOT skip steps — each depends on the previous
- If any step fails, stop and report the error with guidance
- 推送前务必检查登录状态
- 推送前务必检查项目关联状态
- 不得跳过步骤——每个步骤都依赖前一步骤
- 若任何步骤失败,请停止操作并附带指引报告错误