vault backup: 2026-05-28 13:58:44
This commit is contained in:
@@ -322,39 +322,81 @@ for module in core_modules:
|
|||||||
# 其他项目用命令行
|
# 其他项目用命令行
|
||||||
|
|
||||||
## AssetMaker
|
## AssetMaker
|
||||||
```bash
|
|
||||||
|
> **2026-05-28 验证通过** 版本 graphifyy 0.8.22 + watchdog
|
||||||
|
|
||||||
|
### 前置条件
|
||||||
|
|
||||||
|
1. 确保 `.graphifyignore` 已放在项目根目录(`D:\AI\Website\CharacterMaker\.graphifyignore`),内容:
|
||||||
|
|
||||||
|
```
|
||||||
|
frontend/public/
|
||||||
|
frontend/dist/
|
||||||
|
**/dist/
|
||||||
|
**/build/
|
||||||
|
**/node_modules/
|
||||||
|
**/*.min.js
|
||||||
|
**/*.min.css
|
||||||
|
**/*.map
|
||||||
|
**/*.lock
|
||||||
|
blender/
|
||||||
|
backend/server/uploads/
|
||||||
|
docs/graphify/
|
||||||
|
.claude/
|
||||||
|
.worktrees/
|
||||||
|
mongo-data/
|
||||||
|
redis-data/
|
||||||
|
graphify-out/
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 安装 watchdog(watch 模式依赖):
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
pip install watchdog
|
||||||
|
```
|
||||||
|
|
||||||
|
### 初始构建(首次或全量重建)
|
||||||
|
|
||||||
|
```
|
||||||
|
/graphify D:\AI\Website\CharacterMaker --directed --no-viz
|
||||||
|
```
|
||||||
|
|
||||||
|
- `--directed`:构建有向图(保留边方向)
|
||||||
|
- `--no-viz`:跳过 HTML 可视化,只生成 GRAPH_REPORT.md + graph.json
|
||||||
|
- 输出位置:`D:\AI\Website\CharacterMaker\graphify-out\`
|
||||||
|
- **注意**:`--output` 不是有效 flag,graphify 固定输出到项目根目录的 `graphify-out/`
|
||||||
|
- **注意**:`--ignore` 不是有效 flag,排除规则一律通过 `.graphifyignore` 文件控制
|
||||||
|
|
||||||
|
### watch 模式(文件变更时自动更新图谱)
|
||||||
|
|
||||||
|
Claude Code 中运行(通过 skill 调度):
|
||||||
|
|
||||||
|
```
|
||||||
|
/graphify D:\AI\Website\CharacterMaker --watch
|
||||||
|
```
|
||||||
|
|
||||||
|
或直接在终端运行(无需 Claude Code):
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
python -m graphify.watch D:\AI\Website\CharacterMaker --debounce 3
|
||||||
|
```
|
||||||
|
|
||||||
|
**行为说明:**
|
||||||
|
- 代码文件变更(.ts/.js/.py 等)→ 自动 AST 重建 + 聚类更新,无需 LLM
|
||||||
|
- 文档/图片变更 → 写入 `graphify-out/needs_update` 标记,提示手动 `/graphify --update`
|
||||||
|
- 自动读取 `.graphifyignore` 排除规则
|
||||||
|
- `--debounce 3`:等待 3 秒无新变更后才触发(避免频繁重建)
|
||||||
|
- Ctrl+C 停止
|
||||||
|
|
||||||
|
### 原错误命令(备忘,不可用)
|
||||||
|
|
||||||
|
以下写法中的 `--output` 和 `--ignore` 在 v0.8.22 中不存在:
|
||||||
|
|
||||||
|
```
|
||||||
|
# 错误!--output 和 --ignore 不是有效 flag
|
||||||
/graphify D:\AI\Website\CharacterMaker \
|
/graphify D:\AI\Website\CharacterMaker \
|
||||||
--directed \
|
--directed \
|
||||||
--no-viz \
|
--no-viz \
|
||||||
--output D:\AI\Website\CharacterMaker\docs\graphify \
|
--output D:\AI\Website\CharacterMaker\docs\graphify \
|
||||||
--ignore "frontend/public/**,frontend/dist/**,**/dist/**,**/build/**,**/node_modules/**,**/*.min.js
|
--ignore "..."
|
||||||
,**/*.min.css,**/*.map,**/*.lock,blender/**,backend/server/uploads/**,docs/graphify/**,.claude/**,.wo
|
```
|
||||||
rktrees/**,mongo-data/**,redis-data/**"
|
|
||||||
|
|
||||||
/graphify D:\AI\Website\CharacterMaker --watch
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
/graphify D:\AI\Website\CharacterMaker --directed --no-viz
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
.graphifyignore(放到项目根目录
|
|
||||||
D:\AI\Website\CharacterMaker\.graphifyignore):
|
|
||||||
|
|
||||||
frontend/public/
|
|
||||||
frontend/dist/
|
|
||||||
**/dist/
|
|
||||||
**/build/
|
|
||||||
**/node_modules/
|
|
||||||
**/*.min.js
|
|
||||||
**/*.min.css
|
|
||||||
**/*.map
|
|
||||||
**/*.lock
|
|
||||||
blender/
|
|
||||||
backend/server/uploads/
|
|
||||||
docs/graphify/
|
|
||||||
.claude/
|
|
||||||
.worktrees/
|
|
||||||
mongo-data/
|
|
||||||
redis-data/
|
|
||||||
Reference in New Issue
Block a user