Skip to content

pantoken / ai/pantoken-ai/src / installAgentAssets

函数: installAgentAssets()

installAgentAssets(tool, dir?): string[]

Alpha

将 pantoken 的代理资产为某个工具写入到消费者仓库。

参数

tool

AgentTool | "all"

特定的 AgentTool,或 "all" 表示每个资产。

dir?

string = "."

目标目录(默认 ".")。

返回值

string[]

写入的路径。

示例

将单个工具的资产安装到仓库中

ts
import { installAgentAssets } from "@pantoken/ai";

const written = installAgentAssets("cursor", "./my-app");
// → ["my-app/.cursor/rules/pantoken.mdc"]

将所有资产安装到当前目录中

ts
import { installAgentAssets } from "@pantoken/ai";

installAgentAssets("all");
// writes AGENTS.md, llms.txt, and the Cursor/Copilot/Windsurf/Claude assets