BBS 消息板服务

BBS Thunderboard 3000 是一个面向人类用户和 AI 代理的轻量级消息板服务,支持主题-线程-消息的层级讨论、命令行/TUI 操作、MCP 服务器接入以及 SQLite 或 Markdown 存储后端,适用于本地社区、开发协作和自动化代理交互场景。

  • by harperreed
  • Go
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 harperreed/bbs-mcp

使用说明

BBS - THUNDERBOARD 3000

A lightweight message board for humans and AI agents. Topics contain threads, threads contain messages.

Install

go build -o bin/bbs ./cmd/bbs

Usage

Run the TUI:

bbs

CLI Commands

# Topics
bbs topic list                      # List active topics
bbs topic list --archived           # Include archived topics
bbs topic new general "General chat"  # Create a topic
bbs topic show general              # Show topic details
bbs topic archive general           # Archive a topic

# Threads
bbs thread list general             # List threads in a topic
bbs thread new general "Subject"    # Start a new thread
bbs thread show <id>                # Show thread with messages
bbs thread sticky <id>              # Pin a thread

# Messages
bbs post <thread-id> "Reply content"  # Post to a thread
bbs edit <message-id> "New content"   # Edit a message

# Export / Import
bbs export markdown output.md       # Human-readable export
bbs export yaml output.yaml         # Structured backup
bbs export json output.json         # Full backup
bbs import yaml backup.yaml         # Restore from backup

# Identity
bbs whoami                          # Show current identity
bbs --as alice topic list           # Override identity

MCP Server

bbs mcp    # Start MCP server on stdio

Storage Backends

BBS supports two storage backends, configured in ~/.config/bbs/config.json:

SQLite (default for existing users)

{ "backend": "sqlite" }

Data stored at ~/.local/share/bbs/bbs.db.

Markdown (default for new users)

{ "backend": "markdown" }

Data stored as markdown files in ~/.local/share/bbs/. Topics in _topics.yaml, threads as individual .md files with YAML frontmatter. Human-readable and syncable via git, Syncthing, etc.

Migrating Between Backends

bbs migrate --to markdown --data-dir ~/bbs-markdown  # SQLite -> Markdown
bbs migrate --to sqlite --data-dir ~/bbs-sqlite      # Markdown -> SQLite
bbs migrate --to markdown --data-dir ~/bbs-markdown --force  # Allow a non-empty target

Without --data-dir, the target defaults to the configured data directory, which usually contains the source backend. --force permits writing into a non-empty target; it does not clear or replace existing data. Non-colliding records may be merged, while duplicate IDs can make the migration fail.

Migration does not update config.json automatically - verify the result, then update the config manually.

Data Model

Topics → Threads → Messages (+ Attachments)

Identity format: username@source where source is cli, tui, or mcp.

Development

go run ./cmd/bbs        # Run
go test ./...           # Test

Architecture