https://github.com/optima-chat/cc-chat
Claude Code 用户的中文聊天社区 - 通过 CLI 直接发帖交流
https://github.com/optima-chat/cc-chat
ai-tools chinese-community claude claude-code cli-tool community-platform developer-tools fastify nextjs postgresql reddit-bot typescript
Last synced: 5 months ago
JSON representation
Claude Code 用户的中文聊天社区 - 通过 CLI 直接发帖交流
- Host: GitHub
- URL: https://github.com/optima-chat/cc-chat
- Owner: Optima-Chat
- Created: 2025-10-16T11:46:40.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-11-15T18:15:13.000Z (7 months ago)
- Last Synced: 2025-11-15T20:26:45.227Z (7 months ago)
- Topics: ai-tools, chinese-community, claude, claude-code, cli-tool, community-platform, developer-tools, fastify, nextjs, postgresql, reddit-bot, typescript
- Language: TypeScript
- Homepage: https://cc-chat.dev
- Size: 352 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# 🤖 CC Chat
**Claude Code 用户的中文聊天社区**
让 Claude 帮你发帖交流,无需离开终端
[](https://www.npmjs.com/package/@optima-chat/cc-chat)
[](https://opensource.org/licenses/MIT)
[](https://github.com/Optima-Chat/cc-chat/stargazers)
[网站](https://www.cc-chat.dev) · [安装](#快速开始) · [文档](#完整命令列表) · [贡献](#贡献指南)
---
## ✨ 亮点特性
- 🎯 **零配置集成** - 一行命令安装,Claude 自动识别
- 💬 **自然语言交互** - 用人话发帖,不用记命令
- 🚀 **全功能 CLI** - 浏览、搜索、评论、投票、收藏、通知
- 🌐 **Web + CLI 双端** - 终端和浏览器都能用
- 🔄 **自动内容同步** - 从 Reddit 自动抓取翻译优质内容
- 🏷️ **智能标签系统** - MCP、技巧、项目、问题等分类
- 🔔 **实时通知** - @提及、回复通知
- ⭐ **收藏功能** - 保存喜欢的帖子
- 📊 **用户主页** - 查看用户的帖子、评论、统计数据
- 🎨 **代码高亮** - Markdown 渲染,语法高亮
## 🎬 演示
```bash
# 自然语言发帖
$ "帮我发个帖子分享我的 MCP 配置"
# Claude 自动执行
✓ 已发布帖子
ID: 42
标题: 我的 MCP 配置分享
查看: https://www.cc-chat.dev/posts/42
```
## 🚀 快速开始
### 安装
```bash
npm install -g @optima-chat/cc-chat@latest
```
### 使用
**方式一:自然语言(推荐)**
直接对 Claude 说:
- "帮我登录 CC Chat,用户名是 yourname"
- "帮我发个帖子分享我的 MCP 配置"
- "看看论坛有什么新帖子"
- "搜索关于 MCP 的帖子"
- "查看用户 xxx 的主页"
Claude 会自动调用命令完成操作 ✨
**方式二:直接使用命令**
```bash
# 登录
cc-chat login --username "你的用户名"
# 发帖
cc-chat post --title "标题" --content "内容" --tags "技巧,MCP"
# 浏览帖子(支持热度排序)
cc-chat browse --sort hot --limit 20
# 搜索
cc-chat search "MCP" --limit 10
# 查看用户主页
cc-chat user --comments
# 评论和回复
cc-chat comment --text "评论内容"
cc-chat reply --post-id --text "回复内容"
# 投票
cc-chat upvote
cc-chat downvote
# 收藏
cc-chat save
cc-chat saved
# 通知
cc-chat notifications --unread
cc-chat mark-read
```
## 📋 完整命令列表
| 命令 | 说明 | 示例 |
|------|------|------|
| `login` | 登录(GitHub OAuth) | `cc-chat login --username "用户名"` |
| `post` | 发帖 | `cc-chat post --title "标题" --content "内容" --tags "技巧,MCP"` |
| `browse` | 浏览帖子 | `cc-chat browse --sort hot --tag MCP --limit 20` |
| `search` | 搜索帖子 | `cc-chat search "关键词" --limit 10` |
| `tags` | 查看所有标签 | `cc-chat tags` |
| `user` | 查看用户主页 | `cc-chat user --comments` |
| `comment` | 评论帖子 | `cc-chat comment --text "评论"` |
| `reply` | 回复评论 | `cc-chat reply --post-id --text "回复"` |
| `upvote` | 点赞帖子 | `cc-chat upvote ` |
| `downvote` | 踩帖子 | `cc-chat downvote ` |
| `upvote-comment` | 点赞评论 | `cc-chat upvote-comment ` |
| `downvote-comment` | 踩评论 | `cc-chat downvote-comment ` |
| `save` | 收藏帖子 | `cc-chat save ` |
| `unsave` | 取消收藏 | `cc-chat unsave ` |
| `saved` | 查看收藏列表 | `cc-chat saved --limit 20` |
| `notifications` | 查看通知 | `cc-chat notifications --unread` |
| `mark-read` | 标记已读 | `cc-chat mark-read ` |
| `mark-read-all` | 全部标记已读 | `cc-chat mark-read-all` |
| `delete-post` | 删除帖子 | `cc-chat delete-post ` |
| `delete-comment` | 删除评论 | `cc-chat delete-comment ` |
## 💡 适合分享什么?
- 💡 **使用技巧** - Claude Code 的使用心得和技巧
- 🔧 **MCP 配置** - Model Context Protocol 插件和配置
- 🎉 **项目展示** - 用 Claude Code 做的有趣项目
- ❓ **问题求助** - 遇到的问题和 bug
- 📖 **教程文章** - 深度教程和最佳实践
- 🐛 **Bug 报告** - Claude Code 的问题反馈
- 💭 **想法建议** - 功能建议和讨论
## 🏗️ 技术架构
```mermaid
graph TB
subgraph Client["🖥️ 客户端"]
Claude["🤖 Claude
(自然语言)"]
Web["🌐 Web
(Next.js 15)"]
CLI["💻 CLI
(Commander.js)"]
end
subgraph Backend["⚡ 后端服务"]
API["Fastify API
(TypeScript)"]
DB[(PostgreSQL
数据存储)]
end
subgraph Automation["🤖 内容同步 (GitHub Actions)"]
Sync["Python 脚本
(每 6 小时)"]
Reddit[Reddit API
内容抓取]
OpenAI[OpenAI API
智能翻译]
end
subgraph Auth["🔐 认证"]
GitHub[GitHub OAuth]
end
subgraph Deploy["☁️ 部署平台"]
Railway[Railway
API 托管]
Vercel[Vercel
Web 托管]
end
Claude --> CLI
CLI --> API
Web --> API
API --> DB
API --> GitHub
Sync --> Reddit
Reddit --> OpenAI
OpenAI --> Sync
Sync --> API
API --> Railway
Web --> Vercel
style Claude fill:#8b5cf6,stroke:#7c3aed,color:#fff
style Web fill:#3b82f6,stroke:#2563eb,color:#fff
style CLI fill:#10b981,stroke:#059669,color:#fff
style API fill:#f59e0b,stroke:#d97706,color:#fff
style DB fill:#ef4444,stroke:#dc2626,color:#fff
style Sync fill:#ec4899,stroke:#db2777,color:#fff
style Reddit fill:#f97316,stroke:#ea580c,color:#fff
style OpenAI fill:#06b6d4,stroke:#0891b2,color:#fff
style GitHub fill:#6366f1,stroke:#4f46e5,color:#fff
style Railway fill:#0f172a,stroke:#1e293b,color:#fff
style Vercel fill:#000000,stroke:#171717,color:#fff
```
**技术栈:**
- **CLI**: TypeScript + Commander.js + Chalk
- **Web**: Next.js 15 + React 19 + TailwindCSS
- **API**: Fastify + PostgreSQL + Redis
- **认证**: GitHub OAuth
- **部署**: Railway (API) + Vercel (Web)
- **自动化**: GitHub Actions
## 🌐 在线访问
- 🌐 **网站**: https://www.cc-chat.dev
- 🚀 **API**: https://api.cc-chat.dev
- 📦 **npm**: https://www.npmjs.com/package/@optima-chat/cc-chat
## 🛠️ 本地开发
### 克隆仓库
```bash
git clone https://github.com/Optima-Chat/cc-chat.git
cd cc-chat
```
### 启动后端(Docker Compose)
```bash
docker compose up -d
```
### 开发 CLI
```bash
cd cli
npm install
npm run dev
```
### 开发 Web
```bash
cd web
npm install
npm run dev
```
详见:
- [API 开发文档](./api/README.md)
- [CLI 开发文档](./cli/README.md)
- [Web 开发文档](./web/README.md)
- [技术方案](./docs/tech-spec.md)
## 📦 部署
### 后端 API
- ✅ **Railway**(推荐)- 一键部署,$5/月免费额度
- ✅ **Render** - 免费部署
- ✅ **VPS** - 自托管部署
详见 [部署指南](./docs/deployment.md)
### Web 前端
- ✅ **Vercel**(推荐)- Next.js 官方平台,自动部署
- 推送到 main 分支即可自动部署
详见 [Web 部署文档](./web/README.md)
## 🗺️ 开发路线图
- [x] **Phase 1: 核心功能**
- [x] CLI 工具
- [x] 发帖、评论、回复
- [x] 投票系统
- [x] 热度排序(Hot/New/Top/Comments)
- [x] 标签系统
- [x] 搜索功能
- [x] **Phase 2: 社区功能**
- [x] 用户主页
- [x] 收藏功能
- [x] 通知系统(@提及、回复)
- [x] 嵌套评论
- [x] 代码高亮
- [x] **Phase 3: 内容生态**
- [x] Reddit 自动同步
- [x] 智能翻译(OpenAI API)
- [x] 去重机制
- [ ] **Phase 4: 增强功能**(规划中)
- [ ] 用户设置(头像、简介)
- [ ] 举报机制
- [ ] 管理后台
- [ ] 邮件通知
- [ ] RSS 订阅
详见 [产品路线图](./docs/product-roadmap.md)
## 🤝 贡献指南
我们欢迎所有形式的贡献!
### 参与方式
- 🐛 **报告 Bug** - [提交 Issue](https://github.com/Optima-Chat/cc-chat/issues/new)
- 💡 **功能建议** - [发起讨论](https://github.com/Optima-Chat/cc-chat/discussions)
- 📝 **改进文档** - 完善 README 和文档
- 💻 **贡献代码** - 提交 Pull Request
### 开发流程
1. Fork 本仓库
2. 创建功能分支 (`git checkout -b feature/AmazingFeature`)
3. 提交代码 (`git commit -m 'Add some AmazingFeature'`)
4. 推送到分支 (`git push origin feature/AmazingFeature`)
5. 开启 Pull Request
详见 [贡献指南](./CONTRIBUTING.md)
## 📄 开源协议
[MIT License](./LICENSE)
## 🙏 致谢
- [Claude Code](https://claude.ai/code) - 强大的 AI 编程助手
- [Anthropic](https://www.anthropic.com/) - Claude 背后的公司
- 所有贡献者和社区成员
## 📮 联系我们
- 网站:https://www.cc-chat.dev
- GitHub:https://github.com/Optima-Chat/cc-chat
- Issue:https://github.com/Optima-Chat/cc-chat/issues
---
**🌟 如果觉得有用,欢迎 Star!**
Made with ❤️ by the CC Chat community