Skip to content

pantoken / ai/pantoken-ai/src / installAgentAssets

Hàm: installAgentAssets()

installAgentAssets(tool, dir?): string[]

Alpha

Ghi các tài sản agent của pantoken cho một công cụ vào repo người tiêu dùng.

Tham số

tool

AgentTool | "all"

Một AgentTool cụ thể, hoặc "all" cho mọi tài sản.

dir?

string = "."

Thư mục đích (mặc định ".").

Trả về

string[]

Các đường dẫn được ghi.

Các ví dụ

Cài đặt tài sản của một công cụ vào một repo

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

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

Cài đặt mọi tài sản vào thư mục hiện tại

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

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