chore: 项目已迁移至 Gitee/GitHub,仅保留迁移说明 (tombstone)

This commit is contained in:
shuiyuPyLab committed 2026-08-09 09:42:15 +08:00
1 parent b36e4852f8
commit 9531f2ef83
1 file changed
+13 -155
+13 -155
View File
@@ -1,160 +1,18 @@
# Codemao CLI
# 项目已迁移 ✨
编程猫 (Codemao) 社区命令行工具。无需登录即可访问公开 API,解析 BCM 作品文件。
你好呀~这个仓库已经搬到更好用的地方啦。
## 安装
为了让代码管理更清爽、多平台同步更省心,我们把原先分散的镜像统一收拢到
**Gitee** 与 **GitHub** 主仓维护,这里就只保留这张"迁移小纸条"咯。
```bash
npm install -g codemao-cli
```
📦 新家在这里:
- Gitee:https://gitee.com/shuiyu1123/codemao-cli
- GitHub:https://github.com/shuiyu67/codemao-cli
或直接运行:
📋 内部评估:
- 镜像分散在多个平台,重复维护成本高、容易漏更;
- 自托管 Gitea 实例为个人非管理员环境,长期可用性与备份缺乏保障;
- 代码已稳定收拢至 Gitee / GitHub 主仓,原镜像不再承载更新职责;
- 统一主仓后便于协作、CI 与备份,减少多端同步负担。
```bash
npx codemao-cli help
```
## 功能
| 命令 | 说明 |
|------|------|
| `codemao sample list` | 列出 14 个官方示例作品 |
| `codemao sample download <id>` | 下载示例 BCM 文件 |
| `codemao bcm info <file>` | 解析 BCM 文件摘要 |
| `codemao bcm actors <file>` | 列出所有角色 |
| `codemao bcm blocks <file>` | 列出所有积木 |
| `codemao bcm extract <file>` | 提取资源 URL |
| `codemao work list` | 列出用户作品 (需登录) |
| `codemao download <template>` | 下载 BCM 模板 |
| `codemao endpoints [filter]` | 搜索 62 个 API 端点 |
| `codemao domains` | 显示 13 个域名 |
| `codemao api <path>` | 直接调用 API |
## 快速开始
```bash
# 列出示例作品
codemao sample list
# 下载 "脸萌" 示例
codemao sample download 2
# 查看作品结构
codemao bcm info 脸萌.bcmkn
# 提取所有图片/音频 URL
codemao bcm extract 脸萌.bcmkn
# 下载默认模板
codemao download default-v
```
## BCM 文件格式
BCM (Block Code Metadata) 是编程猫的积木作品文件格式,纯 JSON 结构:
```json
{
"projectName": "我的作品",
"version": "0.18.0",
"toolType": "KN",
"stageSize": { "width": 562, "height": 900 },
"scenes": {
"scenesDict": { "scene-uuid": { "name": "背景", "actorIds": [...] } }
},
"actors": {
"actorsDict": { "actor-uuid": { "name": "角色", "nekoBlockJsonList": [...] } }
},
"styles": {
"stylesDict": { "style-uuid": { "name": "造型", "url": "https://..." } }
},
"audios": { "audiosDict": {} },
"variables": { "variablesDict": {} },
"broadcasts": { "broadcastsDict": {} },
"procedures": { "proceduresDict": {} }
}
```
### 积木结构
```json
{
"type": "sprite_on_tap",
"id": "block-uuid",
"fields": { "type": "mouse_click", "sprite": "actor-uuid" },
"parent_id": "",
"next": { "type": "self_prev_next_style", "id": "..." }
}
```
### 已知积木类型
| 类型 | 说明 |
|------|------|
| `sprite_on_tap` | 角色点击事件 |
| `event_when_run` | 绿旗点击 |
| `event_when_key` | 按键事件 |
| `move` | 移动 |
| `turn_right` / `turn_left` | 转向 |
| `goto_xy` | 移到坐标 |
| `show` / `hide` | 显示/隐藏 |
| `say` | 说话 |
| `wait` | 等待 |
| `repeat` | 重复 |
| `forever` | 重复执行 |
| `if` / `if_else` | 条件判断 |
| `self_prev_next_style` | 切换造型 |
## API 端点
完整端点列表 (62 个):
```bash
codemao endpoints # 全部
codemao endpoints ranking # 搜索
codemao search 作品 # 搜索
```
### 公开端点 (无需登录)
| 端点 | 说明 |
|------|------|
| `GET /neko/sample/list` | 示例作品列表 |
| `GET /neko/sample/detail` | 示例作品详情 |
| `GET /coconut/clouddb/currentTime` | 云数据库时间 |
| `GET /tiger/online/check` | 在线检查 |
### 需认证端点
设置环境变量:
```bash
export CODEMAO_COOKIE="your_cookie_value"
```
从浏览器开发者工具获取 Cookie。
## 域名
| 名称 | 域名 | 用途 |
|------|------|------|
| creation | api-creation.codemao.cn | 创作服务 |
| api | api.codemao.cn | 主 API |
| open | open-service.codemao.cn | 开放服务 |
| ai | cr-aichat.codemao.cn | AI 服务 |
| cdn | creation.codemao.cn | CDN 资源 |
| staticCdn | static.codemao.cn | 静态资源 |
| bcmcdn | creation.bcmcdn.com | BCM CDN |
## 开发
```bash
git clone https://gitee.com/shuiyu1123/codemao-cli
cd codemao-cli
npm install
npm test
```
## License
MIT
旧镜像不再更新,但代码都好好的在新家继续生长。感谢你一路的关注与陪伴 💛