Skip to content

pantoken / ai/pantoken-ai/src / installAgentAssets

函式: installAgentAssets()

installAgentAssets(tool, dir?): string[]

Alpha(內測)

將 pantoken 的 agent 資產寫入消費者倉庫(針對某個工具)。

參數

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