rename to syncAgentRule.mjs

This commit is contained in:
jtl959
2026-08-20 11:29:00 +08:00
parent 7f71675deb
commit f7b3414e51

View File

@@ -1,6 +1,8 @@
// 从 https://git.tic.cc/opx/sysconfig/ 同步 agents/AGENTS.md 和 agents/CLAUDE.md // 功能:从 https://git.tic.cc/opx/sysconfig/ 同步 agents/AGENTS.md 和 agents/CLAUDE.md
// 到本项目根目录(覆盖现有文件)。 // 到本项目根目录(覆盖现有文件)。
// 使用 Node 内置 fetch跨 Windows / Linux / macOS 平台,无需额外工具。 // 使用 Node 内置 fetch跨 Windows / Linux / macOS 平台,无需额外工具。
// 调用:在 package.json 的 scripts 里添加 "syncAgents": "node -e \"fetch('https://git.tic.cc/opx/sysconfig/raw/branch/main/agents/syncAgents.mjs').then(r=>{if(!r.ok)throw new Error('HTTP '+r.status);return r.text()}).then(async t=>{await import('data:text/javascript;base64,'+Buffer.from(t).toString('base64'))})\""
import { writeFile } from 'node:fs/promises'; import { writeFile } from 'node:fs/promises';
const BASE_URL = 'https://git.tic.cc/opx/sysconfig/raw/branch/main/agents/'; const BASE_URL = 'https://git.tic.cc/opx/sysconfig/raw/branch/main/agents/';