### Configuration Commands Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/cli/COMMAND_REFERENCE.md Examples of using MBEditor to manage configuration settings. These commands include getting current configuration, setting AppID and AppSecret, and checking credentials. ```bash mbeditor config get --json ``` ```bash mbeditor config set wx_appid wx_secret ``` ```bash mbeditor config check wx_appid wx_secret ``` -------------------------------- ### Print MBEditor Agent Skill Guide Source: https://context7.com/aaaaanson/mbeditor/llms.txt Prints the bundled agent skill guide for the MBEditor CLI. ```bash # Print bundled agent skill guide mbeditor skill ``` -------------------------------- ### Install MBEditor CLI Source: https://context7.com/aaaaanson/mbeditor/llms.txt Installs the MBEditor CLI using pip. This command should be run from the mbeditor directory. ```bash # Install the CLI (from mbeditor directory) pip install -e ./backend ``` -------------------------------- ### Document Management Commands Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/cli/COMMAND_REFERENCE.md Examples of using MBEditor to manage documents. These commands include listing, getting, creating, updating, deleting, and rendering documents. ```bash mbeditor doc list --json ``` ```bash mbeditor doc get d_hello ``` ```bash mbeditor doc create ./sample-doc.json ``` ```bash mbeditor doc render d_hello ``` ```bash mbeditor doc render d_hello --upload-images ``` -------------------------------- ### Install MBEditor Agent Skill for Codex Source: https://github.com/aaaaanson/mbeditor/blob/main/README.md Install the MBEditor skill for Codex by copying the skill file to the appropriate directory. ```bash # macOS / Linux mkdir -p ~/.codex/agents cp skill/mbeditor.skill.md ~/.codex/agents/mbeditor.skill.md # Windows mkdir %USERPROFILE%\.codex\agents copy skill\mbeditor.skill.md %USERPROFILE%\.codex\agents\mbeditor.skill.md ``` -------------------------------- ### Image Management Commands Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/cli/COMMAND_REFERENCE.md Examples of using MBEditor to manage images. These commands cover listing, uploading, and deleting images. ```bash mbeditor image list ``` ```bash mbeditor image upload ./cover.png --json ``` ```bash mbeditor image delete md5hash ``` -------------------------------- ### Skill and Info Commands Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/cli/COMMAND_REFERENCE.md Examples for retrieving skill information and general system info. The 'skill' command prints markdown or JSON, while 'info' provides details about mode, version, paths, and base URL. ```bash mbeditor skill ``` ```bash mbeditor skill path ``` ```bash mbeditor info ``` ```bash mbeditor info version ``` ```bash mbeditor info paths ``` -------------------------------- ### Start Specific Stage Prompt Template Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/superpowers/MULTI_SESSION_ORCHESTRATION.md Use this prompt to start a specific stage. It ensures the stage is not yet complete and follows development protocols. ```prompt 读 docs/superpowers/SESSION_HANDOFF.md 确认 Stage N 未完成。 然后用 superpowers:subagent-driven-development 执行 docs/superpowers/plans/2026-04-11-stage-N-*.md。 遵守 docs/superpowers/MULTI_SESSION_ORCHESTRATION.md。 最后更新 SESSION_HANDOFF.md 并 commit(不 push,除非我说 push)。 ``` -------------------------------- ### Install and Run MBEditor CLI Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/cli/CLI_OVERVIEW.md Preferred method to install the MBEditor CLI as an editable Python package and basic invocation commands. ```bash pip install -e ./backend ``` ```bash mbeditor --help mbeditor info mbeditor skill ``` -------------------------------- ### Rendering Commands Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/cli/COMMAND_REFERENCE.md Examples of using MBEditor to render content. These commands include previewing raw HTML/CSS, rendering articles, and rendering documents with optional image uploads. ```bash mbeditor render preview "

Hello

" ``` ```bash mbeditor render article abc123 --json ``` ```bash mbeditor render doc d_hello --upload-images --json ``` -------------------------------- ### Install MBEditor Agent Skill for Claude Source: https://github.com/aaaaanson/mbeditor/blob/main/README.md Install the MBEditor skill for Claude Code for direct command-line usage or global access. ```bash # macOS / Linux mkdir -p ~/.claude/skills cp skill/mbeditor.skill.md ~/.claude/skills/mbeditor.skill.md # Windows mkdir %USERPROFILE%\.claude\skills copy skill\mbeditor.skill.md %USERPROFILE%\.claude\skills\mbeditor.skill.md ``` -------------------------------- ### New Session Start Prompt Template Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/superpowers/MULTI_SESSION_ORCHESTRATION.md Use this prompt to initiate a new session. It directs the agent to consult session handoff and orchestration protocols. ```prompt 读 docs/superpowers/SESSION_HANDOFF.md 了解当前状态。 按 §"下一个 Session 要做什么" 执行。 遵守 docs/superpowers/MULTI_SESSION_ORCHESTRATION.md 的所有协议。 ``` -------------------------------- ### Deploy MBEditor with Docker Compose Source: https://github.com/aaaaanson/mbeditor/blob/main/README.md Clone the repository and start MBEditor using Docker Compose. The editor interface will be available at http://localhost:7073 and the API at http://localhost:7072/api/v1. ```bash git clone https://github.com/AAAAAnson/mbeditor.git cd mbeditor docker compose up -d ``` -------------------------------- ### Get Article Details via CLI Source: https://context7.com/aaaaanson/mbeditor/llms.txt Retrieves the details of a specific article by its ID using the MBEditor CLI. ```bash # Get article details mbeditor article get abc123 --json ``` -------------------------------- ### Article Management Commands Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/cli/COMMAND_REFERENCE.md Examples of using MBEditor to manage articles. These commands cover listing, creating, updating, deleting, and projecting articles to documents. ```bash mbeditor --data-dir ./data article list --json ``` ```bash mbeditor --data-dir ./data article create "Draft" markdown ``` ```bash mbeditor --data-dir ./data article update abc --markdown "# Heading" ``` ```bash mbeditor --data-dir ./data article project-to-doc abc --persist --json ``` -------------------------------- ### Check MBEditor CLI Availability Source: https://context7.com/aaaaanson/mbeditor/llms.txt Verifies that the MBEditor CLI is installed and accessible. ```bash # Check CLI availability mbeditor --help ``` -------------------------------- ### Publishing Commands Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/cli/COMMAND_REFERENCE.md Examples of using MBEditor to publish content. These commands include processing articles by applying CSS and uploading images, and publishing drafts to WeChat. ```bash mbeditor publish process abc123 ``` ```bash mbeditor publish draft abc123 "Author Name" "Short digest" ``` -------------------------------- ### Get Configuration Status Source: https://context7.com/aaaaanson/mbeditor/llms.txt Retrieves the current WeChat credential configuration status. ```bash curl http://localhost:7072/api/v1/config # Response: { "code": 0, "data": { "appid": "wx1234567890abcdef", "appsecret": "****cdef", "configured": true, "account_name": "" } } ``` -------------------------------- ### Smoke Test API Endpoints Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/superpowers/plans/2026-04-11-stage-1-block-registry.md Starts the Uvicorn server and uses curl to verify that the /articles and /mbdoc endpoints are responding correctly. ```bash cd D:/Web/MBEditor/backend\nuvicorn app.main:app --port 7072 &\nsleep 3\ncurl -s http://localhost:7072/api/v1/articles | head -c 200\ncurl -s http://localhost:7072/api/v1/mbdoc | head -c 200\nkill %1 2>/dev/null || true ``` -------------------------------- ### Confirm Environment and Git Status Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/superpowers/MULTI_SESSION_ORCHESTRATION.md Before starting a new session, verify the project environment and Git status. Ensure a clean working tree and appropriate branch. ```bash cd D:/Web/MBEditor git status git branch --show-current git log --oneline -5 ``` -------------------------------- ### Initialize models directory Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/superpowers/plans/2026-04-11-stage-1-block-registry.md Commands to create the models directory and the __init__.py file within the backend project. ```bash cd D:/Web/MBEditor/backend mkdir -p app/models test -f app/models/__init__.py || touch app/models/__init__.py ``` -------------------------------- ### Minimal Executable Agent Workflow Demo Source: https://github.com/aaaaanson/mbeditor/blob/main/README.md This sequence demonstrates the core MBEditor API calls for creating an article, writing content, uploading an image, and submitting it to the draft box, showcasing how Agents can interact with the system. ```bash # 1. Create article curl -X POST http://localhost:7072/api/v1/articles \ -H "Content-Type: application/json" \ -d '{"title":"AI 写作指南","mode":"html"}' # 2. Write content curl -X PUT http://localhost:7072/api/v1/articles/{id} \ -d '{"html":"

AI 写作指南

正文...

","css":"h1{color:#333}"}' # 3. Upload image curl -X POST http://localhost:7072/api/v1/images/upload \ -F "file=@cover.png" # 4. Submit draft curl -X POST http://localhost:7072/api/v1/publish/draft \ -d '{"article_id":"你的文章ID"}' ``` -------------------------------- ### List All Articles via CLI Source: https://context7.com/aaaaanson/mbeditor/llms.txt Lists all available articles using the MBEditor CLI in JSON format. ```bash # List all articles mbeditor article list --json ``` -------------------------------- ### Get MBDoc API Endpoint Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/superpowers/plans/2026-04-11-stage-1-block-registry.md Defines the GET endpoint to retrieve a specific MBDoc by its ID. Returns a 404 error if the MBDoc is not found. ```python @router.get(\"/{mbdoc_id}\")\nasync def get_mbdoc(mbdoc_id: str):\n try:\n doc = _storage().get(mbdoc_id)\n except MBDocNotFoundError:\n raise HTTPException(status_code=404, detail=f\"MBDoc not found: {mbdoc_id}\")\n return success(doc.model_dump()) ``` -------------------------------- ### End-to-End Article Production Workflow Source: https://context7.com/aaaaanson/mbeditor/llms.txt Demonstrates a complete AI agent workflow for article production, from configuration and creation to image upload and API interaction. ```bash #!/bin/bash # Complete MBEditor Agent Workflow # 1. Configure WeChat credentials (one-time setup) curl -X PUT http://localhost:7072/api/v1/config \ -H "Content-Type: application/json" \ -d '{"appid":"wx_your_appid","appsecret":"your_secret"}' # 2. Create a new article ARTICLE_RESPONSE=$(curl -s -X POST http://localhost:7072/api/v1/articles \ -H "Content-Type: application/json" \ -d '{"title":"Docker 容器入门","mode":"html"}') ARTICLE_ID=$(echo $ARTICLE_RESPONSE | jq -r '.data.id') echo "Created article: $ARTICLE_ID" # 3. Upload cover image IMAGE_RESPONSE=$(curl -s -X POST http://localhost:7072/api/v1/images/upload \ -F "file=@cover.png") IMAGE_URL=$(echo $IMAGE_RESPONSE | jq -r '.data.url') echo "Uploaded image: $IMAGE_URL" ``` -------------------------------- ### MBDoc Creation and Rendering Source: https://github.com/aaaaanson/mbeditor/blob/main/backend/app/cli/SKILL.md Workflow for creating an MBDoc from a file and preparing it for WeChat upload. ```bash mbeditor doc create sample.json mbeditor doc render # preview html mbeditor doc render --upload-images # publish-ready html ``` -------------------------------- ### Preview Raw HTML and CSS via CLI Source: https://context7.com/aaaaanson/mbeditor/llms.txt Renders raw HTML and CSS content for a WeChat preview without storing it using the MBEditor CLI. ```bash # Preview raw HTML+CSS mbeditor render preview "

标题

内容

" "h1{color:#333}" ``` -------------------------------- ### Get Processed HTML Source: https://context7.com/aaaaanson/mbeditor/llms.txt Retrieves fully processed WeChat-ready HTML for a stored article. ```bash curl http://localhost:7072/api/v1/publish/html/a1b2c3d4e5f6 # Response: { "code": 0, "data": { "html": "

Docker 完全指南

...", "css": "", "title": "Docker 完全指南" } } ``` -------------------------------- ### Commit MBEditor Skill Rewrite Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/plans/2026-04-16-mbeditor-unified-migration-plan.md Commit message for rewriting the MBEditor skill as a CLI-first short guide. ```bash git add skill docs/agent git commit -m "docs: rewrite mbeditor skill as cli-first short guide" ``` -------------------------------- ### Running Full Visual Tests Source: https://github.com/aaaaanson/mbeditor/blob/main/backend/tests/visual/README.md Execute all backend tests, including the full visual parity tests. This requires completing the WeChat login process first. ```bash # Full visual tests (Task 11, requires auth_login first): cd backend && pytest tests/visual/ -q ``` ```bash # All backend tests including visual: cd backend && python -m pytest -q ``` -------------------------------- ### Get MBDoc Details via CLI Source: https://context7.com/aaaaanson/mbeditor/llms.txt Retrieves the details of a specific MBDoc by its ID using the MBEditor CLI. ```bash # Get MBDoc details mbeditor doc get doc_demo ``` -------------------------------- ### Project Article to MBDoc via CLI Source: https://context7.com/aaaaanson/mbeditor/llms.txt Projects an article to MBDoc format using the CLI. Use --persist to save and --json for JSON output. ```bash # Project article to MBDoc format mbeditor article project-to-doc abc123 --persist --json ``` -------------------------------- ### List All MBDocs via CLI Source: https://context7.com/aaaaanson/mbeditor/llms.txt Lists all available MBDocs using the MBEditor CLI in JSON format. ```bash # List all MBDocs mbeditor doc list --json ``` -------------------------------- ### Breakpoint Recovery Prompt Template Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/superpowers/MULTI_SESSION_ORCHESTRATION.md Use this prompt for resuming a session from a breakpoint. It guides the agent to the relevant section in the handoff document. ```prompt 读 docs/superpowers/SESSION_HANDOFF.md §"断点恢复" 章节。 从记录的断点继续执行。 遵守 docs/superpowers/MULTI_SESSION_ORCHESTRATION.md。 ``` -------------------------------- ### Legacy Article Management Recipes Source: https://github.com/aaaaanson/mbeditor/blob/main/backend/app/cli/SKILL.md Commands for creating, updating, and rendering legacy articles. ```bash mbeditor article create "Hello" markdown mbeditor article update --markdown "# Hi" mbeditor render article --json ``` -------------------------------- ### List MBDocs API Endpoint Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/superpowers/plans/2026-04-11-stage-1-block-registry.md Defines the GET endpoint for listing all MBDoc IDs and their titles. It handles potential MBDocNotFoundError during retrieval. ```python @router.get(\"")\nasync def list_mbdocs():\n storage = _storage()\n ids = storage.list_ids()\n summaries: List[dict] = []\n for mid in ids:\n try:\n d = storage.get(mid)\n summaries.append({\"id\": d.id, \"title\": d.meta.title})\n except MBDocNotFoundError:\n continue\n return success(summaries) ``` -------------------------------- ### Create New Article via CLI Source: https://context7.com/aaaaanson/mbeditor/llms.txt Creates a new article with a specified title and format (e.g., 'html') using the MBEditor CLI. ```bash # Create a new article mbeditor article create "AI 写作技巧" html # Output: {"ok": true, "action": "article.create", "data": {"id": "abc123...", "title": "AI 写作技巧"}} ``` -------------------------------- ### MBEditor Success Output Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/cli/COMMAND_REFERENCE.md Example of a successful API response from MBEditor. This JSON structure indicates that an action was performed without errors. ```json { "ok": true, "action": "article.get", "message": "success", "data": {} } ``` -------------------------------- ### Get Article - MBEditor API Source: https://context7.com/aaaaanson/mbeditor/llms.txt Fetch the complete content of a specific article using its ID. This includes HTML, CSS, JavaScript, and metadata. ```bash curl http://localhost:7072/api/v1/articles/a1b2c3d4e5f6 ``` ```json { "code": 0, "data": { "id": "a1b2c3d4e5f6", "title": "Docker 入门指南", "mode": "html", "html": "

Docker 入门

容器化技术...

", "css": "h1 { color: #333; }", "js": "", "markdown": "", "cover": "/images/docker-cover.png", "author": "技术团队", "digest": "快速上手 Docker 容器技术", "created_at": "2026-04-18T10:30:00.000000+00:00", "updated_at": "2026-04-18T10:35:00.000000+00:00" } } ``` -------------------------------- ### MBEditor Error Output Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/cli/COMMAND_REFERENCE.md Example of an error response from MBEditor. This JSON structure provides details about a failed operation, including a message and relevant data. ```json { "ok": false, "action": "article.get", "message": "Article abc not found", "data": {"id": "abc"} } ``` -------------------------------- ### View MBEditor CLI Version and Runtime Info Source: https://context7.com/aaaaanson/mbeditor/llms.txt Displays version and runtime information for the MBEditor CLI. ```bash # View version and runtime info mbeditor info mbeditor info version ``` -------------------------------- ### Get Computed CSS Styles Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/research/RESEARCH_CORRECTIONS.md Evaluates JavaScript in a Playwright page to retrieve computed CSS styles for a given element. Useful for debugging rendering discrepancies. ```javascript page.evaluate("getComputedStyle(el).") ``` -------------------------------- ### View MBEditor Configuration via CLI Source: https://context7.com/aaaaanson/mbeditor/llms.txt Displays the current MBEditor configuration, including WeChat credentials, in JSON format. ```bash # View current config mbeditor config get --json ``` -------------------------------- ### Invoke MBEditor CLI Help Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/cli/COMMAND_REFERENCE.md Shows the help message for the MBEditor CLI. Use this to understand available commands and options. ```bash mbeditor --help ``` ```bash python -m app.cli --help ``` -------------------------------- ### Render Stored Article or MBDoc via CLI Source: https://context7.com/aaaaanson/mbeditor/llms.txt Renders a stored article or MBDoc for preview using the MBEditor CLI. Supports JSON output. ```bash # Render stored article mbeditor render article abc123 --json # Render MBDoc mbeditor render doc doc_demo --json ``` -------------------------------- ### Project Article to MBDoc API Source: https://context7.com/aaaaanson/mbeditor/llms.txt Converts a legacy Article to MBDoc format via the API. Use persist=true to save the result. ```bash curl -X POST "http://localhost:7072/api/v1/mbdoc/project/article/a1b2c3d4e5f6?persist=true" ``` -------------------------------- ### MBEditor Helper Functions Source: https://github.com/aaaaanson/mbeditor/blob/main/backend/tests/visual/README.md These Python functions are used for rendering MBEditor documents to screenshots, pushing them to WeChat drafts, capturing screenshots of WeChat drafts, and comparing images or DOM structures. Ensure necessary libraries are installed. ```python render_mbdoc_to_screenshot(doc, out_dir=None) -> Path ``` ```python push_mbdoc_to_wechat_draft(doc) -> str # returns media_id ``` ```python screenshot_wechat_draft(media_id, out_dir=None) -> Path ``` ```python diff_images(a, b, tolerance=0.005) -> dict ``` ```python diff_dom(html_a, html_b, ignore_attrs=("data-", "id")) -> dict ``` -------------------------------- ### Render Commands API Source: https://context7.com/aaaaanson/mbeditor/llms.txt APIs for rendering content for preview. ```APIDOC ## POST /api/v1/render/preview ### Description Previews raw HTML and CSS content. ### Method POST ### Endpoint /api/v1/render/preview #### Request Body - **html** (string) - Required - The raw HTML content. - **css** (string) - Required - The raw CSS content. ### Request Example ```bash mbeditor render preview "

标题

内容

" "h1{color:#333}" ``` ## POST /api/v1/render/article/{article_id} ### Description Renders a stored article for preview. ### Method POST ### Endpoint /api/v1/render/article/{article_id} ### Response #### Success Response (200) - **code** (integer) - 0 for success. - **data** (object) - Contains the rendered article details. - **html** (string) - The rendered HTML content. ## POST /api/v1/render/doc/{doc_id} ### Description Renders a stored MBDoc for preview. ### Method POST ### Endpoint /api/v1/render/doc/{doc_id} ### Response #### Success Response (200) - **code** (integer) - 0 for success. - **data** (object) - Contains the rendered MBDoc details. - **html** (string) - The rendered HTML content. ``` -------------------------------- ### Register Active Locks for Parallel Sessions Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/superpowers/MULTI_SESSION_ORCHESTRATION.md When multiple sessions run in parallel, use AGENT_LOCKS.md to register active locks. This table tracks which Stage is being worked on, the associated worktree, owner session, start time, and estimated completion time. ```markdown ## Active Locks | Stage | Worktree | Owner Session | Started | ETA | |---|---|---|---|---| | Stage 2 | MBEditor-stage2 | session-2 | 2026-04-12 09:00 | 2026-04-12 17:00 | | Stage 3 | MBEditor-stage3 | session-3 | 2026-04-12 09:00 | 2026-04-12 13:00 | ``` -------------------------------- ### Commit Renderer Implementation Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/plans/2026-04-16-mbeditor-unified-migration-plan.md Command to commit the initial set of MBDoc renderers to the repository. ```bash git add backend git commit -m "feat: implement first complete MBDoc renderer set" ``` -------------------------------- ### WeChat Publishing Workflow Source: https://github.com/aaaaanson/mbeditor/blob/main/backend/app/cli/SKILL.md Commands for configuring credentials and publishing a draft to WeChat. ```bash mbeditor config set mbeditor config check mbeditor publish draft "Author Name" "Short digest" ``` -------------------------------- ### Commit Output Unification Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/plans/2026-04-16-mbeditor-unified-migration-plan.md Command to commit the unified preview, copy, and publish render output changes. ```bash git add frontend backend git commit -m "refactor: unify preview copy and publish render outputs" ``` -------------------------------- ### Process Article for WeChat Preview via CLI Source: https://context7.com/aaaaanson/mbeditor/llms.txt Processes an article, including inline CSS and image uploads, for WeChat preview without publishing, using the MBEditor CLI. ```bash # Process article (inline CSS + upload images) without publishing mbeditor publish process abc123 ``` -------------------------------- ### Create MBDoc Source: https://context7.com/aaaaanson/mbeditor/llms.txt Creates or replaces a block-based MBDoc document. ```bash curl -X POST http://localhost:7072/api/v1/mbdoc \ -H "Content-Type: application/json" \ -d '{ "id": "doc_demo", "version": "1", "meta": { "title": "示范文档", "author": "MBEditor", "digest": "MBDoc 块文档示范" }, "blocks": [ { "id": "h1", "type": "heading", "level": 1, "text": "欢迎使用 MBDoc" }, { "id": "p1", "type": "paragraph", "text": "MBDoc 是 MBEditor 的块级文档模型。" }, { "id": "html1", "type": "html", "source": "

自定义 HTML 区块

", "css": "" } ] }' # Response: { "code": 0, "data": { "id": "doc_demo", "version": "1", "meta": { "title": "示范文档", "author": "MBEditor", "digest": "MBDoc 块文档示范", "cover": "" }, "blocks": [...] } } ``` -------------------------------- ### Process Article for Copy Source: https://context7.com/aaaaanson/mbeditor/llms.txt Processes HTML/CSS with image upload to WeChat CDN for clipboard copy. ```bash curl -X POST http://localhost:7072/api/v1/publish/process-for-copy \ -H "Content-Type: application/json" \ -d '{ "html": "

标题

", "css": "h1 { color: #333; }" }' # Response: { "code": 0, "data": { "html": "

标题

" } } ``` -------------------------------- ### Commit Baseline Documentation Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/plans/2026-04-16-mbeditor-unified-migration-plan.md Adds and commits documentation files related to the migration baseline and the unified plan. ```bash git add docs/architecture docs/plans git commit -m "docs: capture migration baseline and unified plan" ``` -------------------------------- ### Create MBDoc from JSON File via CLI Source: https://context7.com/aaaaanson/mbeditor/llms.txt Creates a new MBDoc from a local JSON file using the MBEditor CLI. ```bash # Create MBDoc from JSON file mbeditor doc create ./my-document.json ``` -------------------------------- ### Publishing and Configuration Commands Source: https://github.com/aaaaanson/mbeditor/blob/main/docs/cli/COMMAND_REFERENCE.md Commands for publishing content to WeChat and managing service configuration. ```APIDOC ## CLI Commands: publish & config ### Description Handle WeChat publishing workflows and service credentials. ### Commands - `publish process ARTICLE_ID [AUTHOR] [DIGEST]` - Process article for publishing. - `publish draft ARTICLE_ID [AUTHOR] [DIGEST]` - Push article to WeChat draft box. - `config get` - Retrieve current configuration. - `config set APPID APPSECRET` - Set WeChat credentials. - `config check APPID APPSECRET` - Validate WeChat credentials. ``` -------------------------------- ### Project Article to MBDoc API Source: https://context7.com/aaaaanson/mbeditor/llms.txt Converts a legacy Article to MBDoc format. Use persist=true to save the result. ```APIDOC ## POST /api/v1/mbdoc/project/article/{article_id} ### Description Converts a legacy Article to MBDoc format. Use persist=true to save the result. ### Method POST ### Endpoint /api/v1/mbdoc/project/article/{article_id} #### Query Parameters - **persist** (boolean) - Optional - Use true to save the result. ### Request Example ```bash curl -X POST "http://localhost:7072/api/v1/mbdoc/project/article/a1b2c3d4e5f6?persist=true" ``` ### Response #### Success Response (200) - **code** (integer) - 0 for success. - **data** (object) - Contains the conversion details. - **mbdoc_id** (string) - The ID of the converted MBDoc. - **article_id** (string) - The ID of the original article. - **meta** (object) - Metadata of the article. - **title** (string) - The title of the article. - **author** (string) - The author of the article. - **block_count** (integer) - The number of blocks in the MBDoc. - **projected_at** (string) - The timestamp when the article was projected. #### Response Example ```json { "code": 0, "data": { "mbdoc_id": "a1b2c3d4e5f6", "article_id": "a1b2c3d4e5f6", "meta": { "title": "Docker 完全指南", "author": "技术团队" }, "block_count": 1, "projected_at": "2026-04-18T10:45:00.000000+00:00" } } ``` ```