← 返回
沟通协作 中文

Markdown Editor With Chat

Lightweight markdown editor with optional OpenClaw gateway chat. Filesystem-based, no database required.
轻量级 Markdown 编辑器,可选 OpenClaw 网关聊天。基于文件系统,无需数据库。
musketyr
沟通协作 clawhub v1.1.2 1 版本 99798.9 Key: 无需
★ 0
Stars
📥 1,489
下载
💾 27
安装
1
版本
#latest

概述

Markdown Editor with Chat

A lightweight, self-contained markdown editor that serves files from a local directory with optional OpenClaw gateway chat integration.

Features

  • Filesystem-based: Point to any directory containing markdown files
  • No database: Files are the source of truth
  • Folder navigation: Browse nested directories
  • Live preview: See rendered markdown as you type
  • Optional chat: Connect to OpenClaw gateway for AI assistance
  • Zero external dependencies: Pure Node.js, self-contained HTML

Quick Start

# 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.

CLI Arguments

ArgumentShortRequiredDefaultDescription
-------------------------------------------------
--folder-fYes*-Directory containing markdown files
--port-pNo3333Server port
--host-hNo127.0.0.1Server host (localhost only by default)
--helpNoShow help message

*Required unless MARKDOWN_DIR env var is set.

Environment Variables (fallback)

VariableRequiredDefaultDescription
------------------------------------------
MARKDOWN_DIRYes*-Directory containing markdown files
PORTNo3333Server port
HOSTNo127.0.0.1Server host
OPENCLAW_GATEWAY_URLNo-Gateway URL for chat feature
OPENCLAW_GATEWAY_TOKENNo-Gateway auth token

CLI arguments take precedence over environment variables.

Security

  • Localhost only by default: Server binds to 127.0.0.1, rejects public IPs
  • Same-origin only: No CORS headers, browser enforces same-origin policy
  • Path traversal protection: Cannot access files outside MARKDOWN_DIR
  • No credentials in code: All secrets via environment variables
  • Gateway proxy: Tokens never exposed to browser

This is a local development tool. The API is intentionally simple (no auth) because it's designed for localhost use on directories you control.

API Endpoints

  • GET / - Serves the editor UI
  • GET /api/files - List files and folders
  • GET /api/files/:path - Get file content
  • PUT /api/files/:path - Save file content
  • POST /api/files/:path - Create new file
  • POST /api/chat - Proxy chat to gateway (if configured)

Use Cases

  • Browse and edit OpenClaw pearls
  • Personal markdown wiki
  • Note-taking with AI assistance
  • Documentation browser

版本历史

共 1 个版本

  • v1.1.2 当前
    2026-03-29 07:36 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 113 📥 52,406
ai-intelligence

ClawBuddy Hatchling

musketyr
让 AI 代理通过 ClawBuddy 向资深伙伴提问。
★ 0 📥 1,335
communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,585