name: markdown-editor-with-chat description: Lightweight markdown editor with optional OpenClaw gateway chat. Filesystem-based, no database required. metadata: openclaw: emoji: "📝" requires: bins: ["node"] env: - MARKDOWN_DIR
A lightweight, self-contained markdown editor that serves files from a local directory with optional OpenClaw gateway chat integration.
# Start with CLI arguments (recommended)
node scripts/server.mjs --folder /path/to/markdown --port 3333
# Or short form
node scripts/server.mjs -f /path/to/markdown -p 3333
# With gateway chat enabled (via env vars)
export OPENCLAW_GATEWAY_URL=http://127.0.0.1:18789
export OPENCLAW_GATEWAY_TOKEN=your-token
node scripts/server.mjs -f /path/to/markdown
Then open http://localhost:3333 in your browser.
| Argument | Short | Required | Default | Description |
|---|---|---|---|---|
--folder |
-f |
Yes* | - | Directory containing markdown files |
--port |
-p |
No | 3333 | Server port |
--host |
-h |
No | 127.0.0.1 | Server host (localhost only by default) |
--help |
No | Show help message |
*Required unless MARKDOWN_DIR env var is set.
| Variable | Required | Default | Description |
|---|---|---|---|
MARKDOWN_DIR |
Yes* | - | Directory containing markdown files |
PORT |
No | 3333 | Server port |
HOST |
No | 127.0.0.1 | Server host |
OPENCLAW_GATEWAY_URL |
No | - | Gateway URL for chat feature |
OPENCLAW_GATEWAY_TOKEN |
No | - | Gateway auth token |
CLI arguments take precedence over environment variables.
This is a local development tool. The API is intentionally simple (no auth) because it's designed for localhost use on directories you control.
GET / - Serves the editor UIGET /api/files - List files and foldersGET /api/files/:path - Get file contentPUT /api/files/:path - Save file contentPOST /api/files/:path - Create new filePOST /api/chat - Proxy chat to gateway (if configured)这是一款质量扎实的本地 markdown 编辑器,界面简洁、操作直观,支持文件浏览和实时预览。安全方面做得不错,默认只允许本地访问,能防止意外访问不该看的文件。文档说明详细,配置也不复杂,新手容易上手。适合需要本地管理 markdown 文件并偶尔需要 AI 辅助写作的开发者使用。略有不足的是部分界面的细节体验还有优化空间。